CN114095998B - Service information synchronization method for terminal in local area network and terminal - Google Patents

Service information synchronization method for terminal in local area network and terminal Download PDF

Info

Publication number
CN114095998B
CN114095998B CN202010762661.3A CN202010762661A CN114095998B CN 114095998 B CN114095998 B CN 114095998B CN 202010762661 A CN202010762661 A CN 202010762661A CN 114095998 B CN114095998 B CN 114095998B
Authority
CN
China
Prior art keywords
terminal
service information
terminals
local area
area network
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.)
Active
Application number
CN202010762661.3A
Other languages
Chinese (zh)
Other versions
CN114095998A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202010762661.3A priority Critical patent/CN114095998B/en
Publication of CN114095998A publication Critical patent/CN114095998A/en
Application granted granted Critical
Publication of CN114095998B publication Critical patent/CN114095998B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • H04L41/0273Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using web services for network management, e.g. simple object access protocol [SOAP]
    • H04L41/028Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using web services for network management, e.g. simple object access protocol [SOAP] for synchronisation between service call and response

Abstract

The application provides a service information synchronization method for a terminal in a local area network and the terminal. The method and the device belong to the technical field of communication and are used for synchronizing service information among terminals in a dynamic and complex local area network, the terminals in the local area network all adopt a unified preset protocol for communication, and after the synchronization of the service information is completed, each terminal in the local area network can acquire the service information of other terminals in the network. By the aid of the synchronization method, service information of all terminals can be synchronized in a complex local area network, assigned task targets can be completed cooperatively, and experience is improved.

Description

Service information synchronization method for terminal in local area network and terminal
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a service information synchronization method for a terminal in a local area network and a terminal.
Background
With the rapid development of information network construction and the wide popularization of intelligent devices, especially the development of Local Area Networks (LANs) in families and the expansion of information demands, a plurality of intelligent devices are usually owned by a family (or natural person), and the plurality of intelligent devices are different in network topology by various communication methods (such as optical fiber, wireless network (wireless fidelity, wi-Fi), bluetooth, short-range wireless communication technology (near field communication NFC), infrared, google mobile service (GoogleMobile Service GMS), code division multiple access (code division multiple access, CDMA), long-term evolution (Long Term Evolution, LTE), 5G and the like.
Therefore, the development trend that a plurality of devices are provided for users to cooperatively complete a function becomes an application is that a mobile phone is used as a game handle to control a game on a television, sound is played by using sound, and vibration of a watch is used as game feedback; if the intelligent television plays the exercise action, the household camera shoots the exercise personnel action, and the PC performs intelligent analysis on whether the action is standard or not. In order to cooperatively complete a certain function, remote services on other devices need to be called through application programs or services on the devices, and before the remote services are called, a service list provided on the other devices needs to be known, and the service list comprises information such as interface types, version numbers, service states, dependency items of the services and the like.
However, in the prior art, management is performed through a central node, all services are registered on the central node, and before a network application invokes a service, a mode of querying a service address from the central node and a mode of querying a remote service state by point-to-point are not suitable for service information synchronization under dynamic and various complex local area network conditions.
Disclosure of Invention
In view of this, the present application provides a service information synchronization method for a terminal in a local area network and a terminal, which can solve the problem of service information synchronization between terminals under dynamic and various complex local area network conditions, so as to realize that the terminals under the complex local area network can cooperatively complete a function.
Some embodiments of the present application provide a service information synchronization method and a terminal device for a terminal in a local area network. The present application is described in terms of various aspects, embodiments and advantages of which are referred to below.
In a first aspect, the present application provides a service information synchronization method for a terminal in a local area network, including: the terminals are connected through a plurality of different communication connection modes, and all terminals in the local area network of the application use a unified preset protocol to synchronize service information among the terminals, wherein the service information comprises information structure data of equipment of the terminals and service information structure data of applications in the terminals. According to the preset protocol, each terminal of the plurality of terminals in the local area network has a unique identifier conforming to a preset format, wherein the unique identifier conforming to the preset format is calculated at least based on all addresses of the terminals in the network in communication connection with other terminals. For example, a hash value of 4 characters is calculated at least based on all addresses of the terminal in the network in communication connection with other terminals, the hash value is a unique identifier of the terminal, the unique identifier of the terminal device in communication with the hash value is informed in the communication process, so that the other terminals connected with the hash value can determine that the same terminal is connected, and service information of the other terminals is acquired from the terminal. Each of the terminals synchronizes the service information stored in the terminal based on the unique identification conforming to the preset format and at least one terminal directly connected with the unique identification, and the terminals complete synchronization, so that the service information of all the terminals in the local area network is stored in each of the terminals.
According to the method of the embodiment of the application, the terminal devices adopt a unified preset protocol, each terminal can have service information of all terminals in the local area network, the terminals in the local area network need to complete a function, such as a game, can know service information of each other and addresses of the terminals with the service information, and can directly call each other's service to cooperatively complete a task. The user can complete a function according to own terminal cooperation, so that the user experience is improved.
In one possible implementation manner of the first aspect, each terminal of the plurality of terminals of the present application synchronizes service information stored in the terminal of the present application with at least one terminal directly connected thereto, including: according to the method and the system, each terminal determines the transmission channel of at least one terminal directly connected with the terminal, for example, the connection mode of Bluetooth and WIFI p2p between the two terminals is determined to be a point-to-point transmission mode, and service information stored in the terminal is synchronized based on the transmission channel of the method and the system through the point-to-point transmission channel, so that the service information of each terminal can be synchronized rapidly and accurately.
In one possible implementation of the first aspect, when it is determined that a new terminal joins the local area network of the application, a plurality of terminals of the application determine transmission channels with the new terminal, and initiate service information synchronization with the new terminal of the application, the plurality of terminals of the application complete synchronization, so that each terminal of the plurality of terminals of the application stores service information of the new terminal of the application, and each new terminal of the application stores service information of the terminal of the application.
In one possible implementation of the first aspect, after determining that service information of at least one terminal in the local area network is changed, performing information synchronization by using a differential synchronization method, that is, obtaining a service information list of the terminal that generates service information change, and determining information content of a changed portion in the service information list; and synchronizing the information content of the changed part to a stored service information list corresponding to the terminal which generates the service information change by the terminals except the terminal which generates the service information change. The method can effectively avoid a large amount of repeated data in the service information synchronization process, and reduce the synchronization data amount.
In a possible implementation manner of the first aspect, according to the preset protocol of the present application, each of the plurality of terminals in the local area network of the present application has a unique identifier conforming to a preset format, and the unique identifier of the preset format of the present application is obtained at least based on hash values calculated by all addresses of the terminal of the present application in communication connection with other terminals in the network. And each terminal in the local area network uniformly integrates all addresses connected with other terminals together to serve as unique identifiers of the equipment, so that the connection relation between the terminals can be obtained in a one-to-one correspondence manner in the communication process of each terminal, for example, the terminals are connected with other terminals through the same or multiple terminals, service information of each terminal is obtained, and the synchronization of the service information among all terminals of the multiple terminals on the dynamic and various complex local area networks is realized. And the unique identification is transmitted and stored in the form of hash value, so that the transmission is convenient due to fewer bytes.
In a possible implementation of the first aspect, the basic format of the preset protocol of the present application includes a definition of an action of the terminal and a type of an object for which the action is directed. The terminals can read the intention of the opposite side by defining based on the protocol action so as to select direct interaction data or realize the data interaction of the two sides by sending a service request.
In one possible implementation of the first aspect, the types of objects for which the actions of the present application are directed include a service list feature value, a service list, a service feature value, and service information. The service list characteristic value and the service characteristic value are represented by hash values, and the hash values are calculated by the terminal based on the service list.
In a possible implementation manner of the first aspect, the application actions are used to implement a data exchange process between terminals in the local area network of the application, and specifically include a handshake action, a fetching action, and a sending action between the terminals of the application.
In one possible implementation of the first aspect, service information stored in the terminal of the present application that is synchronized among a plurality of terminals of the present application is service information that allows a synchronized application for each terminal, so as to ensure information security of each terminal.
In one possible implementation manner of the first aspect, the plurality of different communication connection manners of the present application includes: at least two of bluetooth, wifi, NFC, infrared, code division multiple access, 5G, GMS, and long term evolution communication technologies.
In a second aspect, the present application provides a service information synchronization method for a terminal in a local area network, which is used for a first terminal in the local area network, and the method includes: the first terminal and the second terminals in the local area network are connected by a plurality of different communication connection modes, and service information synchronization between the terminals is carried out by using a unified preset protocol in the local area network; the first terminal and at least one second terminal directly connected with the first terminal synchronize service information stored in the second terminal, and when the first terminal completes synchronization, the service information of all terminals in the local area network is stored in the first terminal.
According to the method of the embodiment of the application, the first terminal and the plurality of second terminals adopt a unified preset protocol, the first terminal can have service information of all terminals in the local area network, the terminals in the local area network need to complete a function, such as a game, the first terminal can have service information of all local terminals and addresses of the terminals corresponding to the service information, and services with the required terminals can be directly called to cooperatively complete a task. And the experience of the user is improved.
In one possible implementation manner of the second aspect, the synchronizing, by the first terminal and at least one second terminal directly connected to the first terminal, service information stored in the second terminal of the present application includes: the first terminal determines a transmission channel of at least one second terminal directly connected with the first terminal, for example, a connection mode between two terminals through Bluetooth and WIFI p2p, namely, a point-to-point transmission mode is determined as the connection mode, and service information stored in the second terminal is synchronized based on the transmission channel of the application through the point-to-point transmission channel.
In one possible implementation of the second aspect, when it is determined that a new second terminal joins the local area network of the present application, the first terminal determines a transmission channel with the new second terminal and initiates service information synchronization with the new second terminal of the present application, and the first terminal completes synchronization, so that storage of service information of the new second terminal of the present application is added in the first terminal of the present application, so that service information of all terminals entering the local area network can be synchronized.
In one possible implementation manner of the second aspect, when the first terminal of the present application joins the local area network for the first time, the first terminal of the present application determines that the connection of the second terminal connected to the first terminal of the present application is an IP connection, and the first terminal of the present application broadcasts that the service is on line, so as to wait for the second terminal in the network to initiate a synchronization request to the second terminal of the network, so that service information of all terminals in the local area network of the present application is stored in the first terminal of the present application.
In one possible implementation manner of the second aspect, it is determined that service information of at least one second terminal in the local area network is changed, and the first terminal acquires a service information list of the terminal with the changed service information, and determines information content of a changed portion in the service information list; the first terminal synchronizes the information content of the changed part into a stored service information list corresponding to the second terminal which is changed by the service information. The method can effectively avoid a large amount of repeated data in the service information synchronization process, and reduce the synchronization data amount.
In a possible implementation manner of the second aspect, according to the preset protocol of the present application, the first terminal of the present application in the local area network has a unique identifier conforming to a preset format, and the unique identifier of the preset format of the present application is obtained at least based on hash values calculated by all addresses of the first terminal of the present application in communication connection with the second terminal of the present application in the network. The first terminal combines the connection addresses of all the second terminals directly connected with the first terminal together to serve as the unique identifier of the equipment, so that each second terminal connected with the first terminal can acquire the connection relation between the second terminals in a one-to-one correspondence manner in the communication process, and if the second terminal is acquired to be connected with other terminals through the same or multiple terminals, service information of each second terminal is acquired, and synchronization of the service information among all terminals of the multiple terminals on a dynamic and various complex local area network is realized. And the unique identification is transmitted and stored in the form of hash value, so that the transmission is convenient due to fewer bytes.
In a possible implementation of the second aspect, the basic format of the preset protocol of the present application includes a definition of an action of the terminal and a type of an object for which the action is directed. The terminals can read the intention of the opposite side by defining based on the protocol action so as to select direct interaction data or realize the data interaction of the two sides by sending a service request.
In one possible implementation of the second aspect, the types of objects for which the actions of the present application are directed include service list feature values, service lists, service feature values, and service information. The service list characteristic value and the service characteristic value are represented by hash values, and the hash values are calculated by the terminal based on the service list.
In a possible implementation manner of the second aspect, the application actions are used to implement a data exchange procedure between terminals in the application network, and specifically include a handshake action, a fetching action, and a sending action between the terminals of the application.
In one possible implementation of the second aspect, the service information stored in the second terminal of the present application that is synchronized by the first terminal of the present application is service information that allows the synchronized application by the second terminal of the present application, so as to ensure information security of each terminal.
In one possible implementation manner of the second aspect, a plurality of different communication connection manners of the present application include: at least two of bluetooth, wifi, NFC, infrared, code division multiple access, 5G, GMS, and long term evolution communication technologies.
In a third aspect, the present application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the second aspect of the present application described above.
In a fourth aspect, the present application provides an electronic device, the device comprising:
a memory for storing instructions for execution by one or more processors of the device, an
A processor, which is one of the processors of the device, for performing the method of the second aspect described above.
In a fifth aspect, the present application also provides a computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the method of the second aspect.
Drawings
FIG. 1 is a scenario diagram of information synchronization of multiple terminals under a complex network according to one embodiment of the present application;
fig. 2 is a schematic structural diagram of a mobile phone according to an embodiment of the present application;
FIG. 3 is a block diagram of the software architecture of a mobile phone according to one embodiment of the present application;
FIG. 4a is a schematic diagram of a ring network topology type according to one embodiment of the present application;
FIG. 4b is a schematic diagram of a star network topology type according to another embodiment of the present application;
fig. 5 is a flowchart of a service information synchronization method for a terminal in a local area network according to an embodiment of the present application;
fig. 6 is a schematic diagram of a handshake process between two terminal devices according to an embodiment of the present application;
fig. 7 is a schematic diagram of a connection manner included in a terminal according to an embodiment of the present application;
fig. 8 is a schematic diagram of a process of terminal device data interaction according to an embodiment of the present application;
FIG. 9a is a game scenario diagram of one embodiment of the present application;
FIG. 9b is a schematic diagram illustrating operation of a mobile phone interface according to one embodiment of the present application;
FIG. 10 is a flowchart of synchronizing terminal information in a mobile phone and a local area network according to one embodiment of the present application;
FIG. 11 is a flowchart of synchronizing service information between a mobile phone and a terminal with changed service information according to an embodiment of the present application;
FIG. 12 is a schematic diagram of the differential synchronization architecture according to one embodiment of the present application;
fig. 13 is a schematic structural diagram of a terminal device according to an embodiment of the present application;
fig. 14 is a block diagram of an apparatus according to some embodiments of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
It is to be appreciated that as used herein, the term "module" may refer to or include an Application Specific Integrated Circuit (ASIC), an electronic circuit, a processor (shared, dedicated, or group) and/or memory that execute one or more software or firmware programs, a combinational logic circuit, and/or other suitable hardware components that provide the described functionality, or may be part of such hardware components.
It is to be appreciated that in various embodiments of the present application, the processor may be a microprocessor, a digital signal processor, a microcontroller, or the like, and/or any combination thereof. According to another aspect, the processor may be a single core processor, a multi-core processor, or the like, and/or any combination thereof.
It should be noted that, the terminal in the present application may be a terminal device with a communication function, such as a mobile phone, a tablet computer, a desktop PC, a notebook computer, a high-definition television, a player, a sound box, an electronic book, and the like.
Embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Fig. 1 shows a scenario diagram of information synchronization of a plurality of terminals under a complex network. Referring to fig. 1, the scene includes a television 101, a tablet 102, a mobile phone 103, a watch 104, a speaker 105, an electronic book 106, a lightweight electronic device 107, and a notebook 108. A plurality of different connection states are adopted between the terminals, including WiFi connection, bluetooth connection and NFC connection. For example, for WiFi connection, the television 101 may be connected to the tablet 102, the computer 108, and the mobile phone 103 through a wireless router via a wireless network; for bluetooth connection, the mobile phone 103 and the watch 104 and the voice box can be in bluetooth connection, the television 101 and the electronic book 106 can be in bluetooth connection, and the lightweight electronic device 107 can be in bluetooth connection with the television 101 and the notebook computer 108 respectively; the sound box 105 and the electronic book 106 may be NFC connected. And the operating systems adopted by the devices are different. Wherein, television 101 adopts a hong operation system (Harmony Operating System, HMOS) and an emotion operation system (Emotion User Interface, EMUI), tablet computer 103 and mobile phone 103 adopt EMUI systems, watch 104, sound box 105 and electronic book 106 adopt HMOS 1.0 systems, lightweight electronic equipment is no system equipment, and notebook computer 108 adopts window 10 systems. The terminals may be connected by other connection methods, such as optical fiber, infrared, GMS, CDMA, LTE, or 5G.
In the local area network composed of the plurality of terminals, the network is dynamic, various and complex because the system used by each terminal and the software running on each terminal are different in types and quantity, different in connection modes, and even a newly added terminal or the like may exist in the local area network.
In such a complex network scenario, if an activity item needs to be cooperatively completed by using a plurality of terminals in the local area network, for example, when a game is completed, it is required that each terminal can query at any time which service information is available between each terminal, and call a responding device to cooperatively complete an action of the game, for example, a mobile phone runs and controls the game, a television displays a main game picture, a watch records the time of the game, or sends a vibration prompt, and a sound effect of the game is played by a sound box.
According to the method and the system, the service information management function is built in each terminal, all service information in the local and/or remote terminals is managed through the service information management function, and all terminals communicate by adopting a unified preset protocol when the service information is synchronized through the service management function, so that the service information of all terminals in the local area network is stored in each terminal.
In contrast, in the synchronization process of service information in the prior art, all services are registered on a fixed central node, service management is implemented through the central node, service information of each terminal is queried and synchronized, the complex and dynamic local area network is not provided with the fixed central node, and some terminals are not connected with the central node and cannot be queried and synchronized. In addition, another service mode in the prior art is to query and synchronize service information through a point-to-point connection mode, and the queried result cannot be shared by other terminals. Thus, the two methods of synchronizing service information are not suitable for the dynamic, complex synchronization of service information for each terminal in a local area network as described in this application.
By utilizing the technical scheme, even in the complex network environment, the user can connect the terminal equipment owned by the user according to the actual needs of the user by a plurality of connection modes so as to complete an activity item which needs to be completed by the user, and the experience of the user is improved.
The service information synchronized by each terminal in the present application is service information of an application to which each terminal is permitted to synchronize. When the service information setting authority of the terminal does not allow access or information synchronization, other terminals cannot synchronize the service information.
Taking a mobile phone as an example, the structure of the terminal device and the service information synchronization process are described, and fig. 2 shows a schematic diagram of the structure of the mobile phone. Referring to fig. 2, the mobile phone 100 may include an antenna 1, an antenna 2, a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, a mobile communication module 150, a wireless communication module 160, a sensor module 180, keys 190, a camera 193, and a display 194. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It should be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the mobile phone 100. In other embodiments of the present application, the handset 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components may be provided. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In one embodiment of the present application, the processor 110 may store the data for implementing the root through a set memory According to the instructions of the service information synchronization method of the application. After the instructions are executed, the mobile phone 100 may be in a local area network The service information of other terminals in the network is synchronized to the local and the service information of the network is sent to other terminals to realize the local exchange In the domain network, each terminal stores service information of all terminals.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function.
In some embodiments, the Bluetooth module of the wireless communication module 160 of the mobile phone 100 is within the same LAN The Bluetooth module of the other terminal realizes a point-to-point communication mode, and the mobile phone 100 and the other terminals all adopt unified pre-preparation A protocol is set, and according to the preset protocol,each of the plurality of terminals in the local area network has a unique number conforming to a preset formatThe identification, the mobile phone 100 can directly obtain the self and other terminals stored by the terminal from the terminal directly connected with the mobile phone And the mobile phone 100 can transmit its own service information to the terminal directly connected thereto, thereby realizingNow hand The machine 100 synchronizes service information with the terminal to which it is connected.
The wireless communication function of the mobile phone 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the handset 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc. applied to the handset 100.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc. applied to the handset 100.
In some embodiments, antenna 1 and mobile communication module 150 of handset 100 are coupled, antenna 2 and wireless communication module Block 160 is coupled so that the mobile phone 100 can communicate with it in a local area network via wireless communication technology and using a unified preset protocol He communicates with the terminal.
The wireless communication techniques may also include, among other things, global system for mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The software system of the mobile phone 100 may employ a layered architecture, an event driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In this embodiment, taking an Android system with a layered architecture as an example, a software structure of the mobile phone 100 is illustrated.
Fig. 3 is a software configuration block diagram of the mobile phone 100 according to the embodiment of the present application.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run) and system libraries, and a kernel layer, respectively.
The application layer may include a series of application packages.
As shown in fig. 3, the application package may include applications for cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, etc.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 3, the application framework layers may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and A service information management module, etc.
The service information management module provides information service management function for the mobile phone 100, and manages own service information of the mobile phone 100 After synchronizing with other terminalsThe mobile phone 100 may have service information of other terminals through the service information management module The mobile phone 100 can realize synchronization of service information with other terminals in the same local area network, so that the mobile phone 100 can know that other terminals have And (3) the application or the function exists, and further, the application corresponding to the service information of each terminal is called according to the requirement. For example, mobile phone 100 and the sound box is connected through Bluetooth, and the service information management function of the mobile phone 100 performs service information with the sound box through a Bluetooth module Step, and store the service information locally, when the user is playing the game, the mobile phone 100 searches the locally stored service information The sound box is informed to have the function of playing the audio, and the playing function of the sound box is started so as to enter the sound effect of the game through the sound box And (5) performing row external placement.
The service information management module may be provided in a system library, which is not limited herein.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
A service information synchronization method for a terminal in a local area network is described in a specific embodiment.
Fig. 4a and 4b show architecture diagrams of a local area network according to an embodiment of the present application. The architecture diagram of the local area network may specifically include a ring network topology type as shown in fig. 4a, a star network topology type as shown in fig. 4b, a topology type as combined in fig. 4a and 4b, and the like. And the system and service functions owned by the terminals a to D in the local area network are also different, so as to form a dynamic, various and complex local area network. Wherein terminals a to D are connected via a plurality of different communication connections. The plurality of different communication connections may include at least two of bluetooth, wiFi, NFC, infrared, code division multiple access, 5G, GMS, and long term evolution communication technologies. Specifically, the network may be a local area network composed of a mobile phone, a television and a watch, where the mobile phone, the television and the watch all adopt the same communication protocol, and the mobile phone is connected with the television through an intermediary end, such as a router, and the mobile phone is connected with the watch through bluetooth point-to-point. A new terminal may also be added to the local area network. The method of synchronizing service information applied to a plurality of terminals in the local area network is described below in connection with the network architecture in fig. 4 a. Fig. 5 shows a flow chart of a service information synchronization method for a terminal in a local area network. As shown in fig. 5, the method includes:
Step S510 to step S513, the plurality of terminals connected via a plurality of different communication connection modes use a unified preset protocol to synchronize service information between the terminals. Wherein, in step S510, terminal a establishes a connection with terminal B, such as a WiFi connection. In step S511, terminal a establishes a connection, e.g., a WiFi connection, with terminal C. In step S512, terminal C establishes a connection, e.g. a bluetooth connection, with terminal D. In step S513, terminal B establishes a connection, e.g. a bluetooth connection, with terminal D. In this way, terminals a, B, C and D establish a ring network topology as shown in fig. 4a through two different connection means, wiFi and bluetooth.
In steps S521 to S524, each of the plurality of terminals synchronizes the service information stored in the terminal directly connected thereto. The service information may be service information corresponding to a function or an application owned by each terminal, for example, a payment function owned by a payment device, an play function owned by a sound box, an application for data analysis and processing owned by a mobile phone, a large screen display function owned by a television, and the like.
According to the embodiment of the application, the terminals can adopt a unified preset protocol to realize the synchronization of service information of all terminals in the local area network, so that the problem that the terminals cannot be synchronized normally due to the difference of different connection modes, operating systems and the like is solved. In step S520, the terminal a and the terminal B synchronize service information based on the unified preset protocol. At this time, both terminals a and B will store service information of terminals a and B. In step S521, the terminal a and the terminal C perform synchronization of service information. Thus, both terminals a and C will store service information for terminals a, B and C. In step S522, the terminal C and the terminal D perform synchronization of service information. Thus, both terminals C and D will store service information for terminals a, B, C, D. In step S523, the terminal D and the terminal B perform synchronization of service information. In this way, terminal B will also store service information for terminals a, B, C, D. In step S524, the terminal a and the terminal B perform synchronization of the service information again. Thus, terminal a will also store service information for a, B, C, D.
When the plurality of terminals complete the synchronization, so that each of the plurality of terminals a, B, C, D stores service information of all terminals in the local area network. The terminals A, B, C and D all store the service information of other terminals in the local area network, so that the functions and the like in the corresponding terminals can be inquired and called in the terminal, and the service information management function in the terminal is realized.
By setting the service information management function in each terminal, after a plurality of terminals form a dynamic and complex local area network, when the terminals need to cooperatively complete a task target, the terminals can know which functions are provided with each other and call the functions, and a user can complete the task target to be completed through the terminals, so that the user experience is improved.
It should be noted that, in the above flowcharts, the order of steps S510 to S513 in the process of establishing a connection is merely an exemplary illustration, and the present application is not limited thereto, and may be other orders or synchronous completion.
It should be noted that, in the process of synchronizing the service information, steps S520 to S524 are merely exemplary descriptions, and the present application is not limited thereto, and may be performed in other sequences or synchronously.
In the service information synchronization method, details of a unified protocol used by each terminal to synchronize service information and a service information management function in each terminal are described below.
In one embodiment of the present application, the terminals in the local area network communicate using a unified preset protocol. The preset protocol may be preset in the production process, or may be added or changed after the terminal is produced and shipped, for example, an application for implementing unified use of the preset protocol is downloaded in each terminal, so as to implement unified use of the preset protocol by each terminal. When the terminals need service information synchronization, each terminal adopts a unified preset protocol, initiates or receives a service information synchronization request, and receives or transmits a response aiming at the service information synchronization request, so that the synchronization of the service information is realized. The preset protocol may include definitions of a service information synchronization protocol, specifically including definitions of a protocol basic format, a protocol header, an action, an object type, a handshake protocol, a get action protocol, a send action protocol, etc., and specifically, the definition of the protocol basic format is shown in table 1 below.
Table 1 protocol basic format
Protocol header Action Object type Quantity of Object size Data
6byte 1byte 1byte 2byte 2byte
Wherein the protocol header may be represented by 6 bytes as shown in table 4 below.
Table 2 protocol header definitions
Figure BDA0002613506520000091
The letter DSIS in table 2 is an abbreviation for device service information synchronous device service information synchronization, and in the device communication process, a message with the identifier is used to represent a request message or a response message for service information synchronization. It should be noted that the protocol header may be other numbers or letters, which are not limited herein.
The definition of the actions in the protocol basic format in table 1 may be represented by one byte, wherein the specific definition is detailed in table 3.
TABLE 3 definition of actions
Value taking Description of the invention
0 Handshaking
1 Get
2 Put
Reservation of
The handshake shown in table 3 is denoted 0, get is denoted 1, put is denoted 2. As an exemplary scenario, terminal a wants to acquire service information of terminal B, first handshake to establish a connection, then terminal a sends a get request to terminal B, the get request indicates the object type to be acquired, and terminal B responds to the request and then sends (put) data corresponding to the object type in the request to terminal a. The specific definitions for the handshake, get, and put protocols in action according to one embodiment of the present application are shown in tables 4-6.
Table 4 handshake protocol definitions
Protocol header Action Object type Quantity of
6byte 0 0 0
The connection relationship of the two devices is determined by a handshake protocol before the two terminal devices communicate. As shown in fig. 6, a schematic diagram of a handshake procedure between two terminal devices, device 601 sends handshake request data to device 602, and device 602 responds to the handshake data and establishes a connection.
The definition of the get action protocol as the terminal is to implement is exemplarily shown in table 5 below.
Table 5get action protocol definition
Protocol header Action Object type Quantity of Object identification
6byte 1 1~255 0
The object identifier of the get may include a device list, device information, a service list, service information, and a corresponding feature value. Specific description of object identification is described in detail in the following embodiments. The protocol definition is exemplarily shown in table 6 below, if the terminal is to implement the put action.
TABLE 6put action protocol definition
Protocol header Action Object type Quantity of Object size Object data
6byte 2 1~255 0~65535 0~65535
The object data in table 6 may include device information structure and service information structure data, among others. Among them, the device information structure and the service information structure data are specifically described in the following embodiments. With respect to the object types described in table 1, the following table 7 is exemplary.
TABLE 7 object type definition
Figure BDA0002613506520000101
Figure BDA0002613506520000111
In table 7, the object type indicates an object of transmission or reply of an action, for example, when the terminal a transmits a get request to the terminal B, the object type 1,1 in the request represents a device list feature value, and the terminal B responds to the request to send data put corresponding to the device list feature value to the terminal B. The device list feature value in table 7 is a hash value calculated by the terminal based on the device list, the device feature value is a hash value calculated by the terminal based on the device information, and the service feature value is a hash value calculated by the terminal based on the service information. That is, when the value of the object type in the request is 1, 3, 5 or 7, then the data of the reply object type is the device list feature value, the device feature value, the service list feature value or the service feature value after responding to the request. By adopting the characteristic value mode, when the service information of the terminal is changed, only the data with different characteristic values are synchronized, so that the data transmission efficiency can be improved. For example, when the service information of the terminal B is changed, in order to avoid repeated synchronization of the data, the changed data is first found. The terminal A firstly requests the characteristic value of the equipment list, the terminal B sends the characteristic value (hash value) of the equipment list to the terminal A, the terminal A compares the characteristic value of the equipment list with the characteristic value of the equipment list of the terminal B before the change, when the two characteristic values of the equipment list are found to be different, the terminal A indicates that the equipment list is changed, at the moment, the terminal A sends a request to the terminal B, the value of the object type contained in the request is 2, the value 2 is expressed as the equipment list, and the terminal B sends the equipment list of the terminal A according to the request, so that the synchronization of the equipment lists among the terminals is realized. If the characteristic values of the two device lists before and after the change are the same, the device characteristic values can be directly requested for comparison without requesting the device list. Thereby realizing the synchronization of the service information. The method can effectively reduce the data transmission quantity and improve the data transmission efficiency.
The identification of objects in the get action protocol is described below as shown in Table 8.
Table 8 get's object identification
Object type Identification mark
List of devices feature values 0
List of devices 0
Device characteristic value DeviceID
Device information DeviceID
Service list feature values DeviceID
Service list DeviceID
Service characteristic value ServiceID
Service information ServiceID
The device feature value, the device information, the service list feature value, and the identifier corresponding to the service list in table 8 are the device unique identifier "DeviceID", and the service feature value and the service information identifier are the unique identifier "ServiceID" of the service. That is, in the process of Get a service information, firstly, the DeviceID is obtained to determine a designated device, and service information corresponding to ServiceID is found in the service list of the device, so as to obtain service information on a specific designated device. The unique identification of the device comprises a set of all addresses based on the communication connection of the terminal and other terminals in the network, each terminal can calculate the set of all addresses of the terminal and other terminals in the local area network into a 4-byte hash value according to a hash algorithm, and in the transmission process, the resource occupation ratio is small, so that the transmission is convenient.
Referring to fig. 7, fig. 7 shows a schematic diagram of a connection manner included in the terminal. As shown in fig. 7, the terminal device a is connected with the terminal device B through bluetooth in the local area network and is connected with the device C through wifi, all unique identifiers of the terminal device a include an IP address of the wifi connection, an address of the bluetooth connection, a product Serial Number (SN) fixed by itself and a mobile device identification code (International Mobile Equipment Identity, IMEI), the terminal device a calculates the unique identifiers into hash values of 4 bytes through a hash algorithm, if Ox35fe is obtained after calculation, the Ox35fe is used as the unique identifier of the terminal device a to inform other terminals, and all unique identifiers of the terminal device B include the bluetooth address connected with the device a and the product serial number fixed by the device B itself. The terminal device B calculates all unique identifiers owned by the terminal device B through a hash algorithm to obtain a 4-byte hash value, such as Ox24cc, and informs other terminals of Ox24cc as the unique identifier of the terminal device B. All unique identifiers of the terminal equipment C comprise ip addresses connected with the terminal equipment A through WiFi, the terminal equipment C calculates all unique identifiers owned by the terminal equipment C through a hash algorithm to obtain 4-byte hash values, such as Oxad27, and the Oxad27 is used as the unique identifier of the terminal equipment C to inform other terminals. Under various connection states, each device has a unique identifier, so that the devices can conveniently know the addresses of each other and synchronize the service information of each other, and the transmission speed is high by adopting the hash value identification mode with only a few bytes.
According to the preset protocol, the communication process can be realized between terminals in a dynamic and complex local area network, and the service information can be synchronized.
The following describes the process of data interaction between devices with reference to fig. 6 and 8, and fig. 8 shows a schematic diagram of the process of data interaction between terminal devices, and as shown in fig. 8, after handshake between the terminal 601 and the terminal 602, the terminal 601 initiates a get request to obtain service information from the terminal 602. The request includes an object type required by the terminal 601, for example, a device feature value or device information. And the object type identifies a corresponding device address or service address. That is, the terminal device 601 informs the terminal 602 of the object type to be acquired and the address corresponding to the object type by means of transmitting the request, and when the terminal 602 receives the request, data corresponding to the object type, such as a device characteristic value (hash value calculated based on the device information), is transmitted to the terminal 601 according to the address in the request, and the terminal 601 stores the object data locally. And when the terminal 601 sends a request, its own service information is sent to the terminal 602, and the terminal 602 synchronizes the acquired service information to the local. In addition, the terminal 602 may actively transmit service information to the terminal 601.
In the embodiment of the present application, the service information management function provided for each terminal in the local area network can manage the service information of the other terminal. Wherein the management of the service information by the service information management function comprises a definition of a service information data structure, which further may comprise a device information structure and a service information structure. The service information management function of each terminal can manage its own service information data structure in the form shown in tables 9 and 10, and exemplary contents thereof can be seen from tables 9 and 10.
TABLE 9 device information Structure
Figure BDA0002613506520000121
Figure BDA0002613506520000131
The device information structure in table 9 may include a list of devices and service information, where the fields in the service information that must be filled include a version number of the device information description, a unique identifier of the device, and field information such as a list of externally accessible services, where a record in "serviceist" may be accessed by other devices, and other devices may only access services in this list.
Exemplary contents of the service information structure of each terminal may be as shown in table 10.
Table 10 service information structure
Figure BDA0002613506520000132
The service information structure in table 10 includes descriptions of service information and interface types possessed by the terminal, and in particular, the service information may include a version number such as "hh.mm.11" for the description of the service information; service unique identifiers, such as "domain name, company name, class, service name"; service interface version numbers, such as "hhh.mmm.111.Ext"; the interface type list is supported, and other service lists are relied on, and the interface type standard can be AIDL, HIDL, ZIDL, RESTFUL, customizable extension type and the like. After service information of a plurality of terminals in a local area network is synchronized, each terminal can store a device information structure and a service information structure which are in one-to-one correspondence with each terminal, each terminal finds out the terminal device through unique identifiers of the device information in the service information, and the function of each terminal is known.
The following describes a service information synchronization method for a terminal in a local area network according to the present application, taking a game scenario as an example.
Referring to fig. 9a, fig. 9a shows a game scene graph. The scene comprises a local area network consisting of a mobile phone 901, a television 902, a sound box 903 and a watch 904, wherein the mobile phone 901 is connected with the television 902 through WiFi, the sound box 903 is connected with the television 902 and the mobile phone 901 through Bluetooth, and the watch 904 is connected with the mobile phone 901 through WiFi p2p point-to-point. The devices all use the preset protocol described in the above embodiments to communicate, so as to realize synchronization of service information. The service information of the television 902 includes a large screen display function, the service information of the sound box 903 is provided with an external play function, the mobile phone 901 has a handle control function, and the watch 904 has a vibration function. After the service information synchronization is finished, the user can view the service information on each device through the mobile phone 901 and select a corresponding function to complete the game. As shown in the operation schematic diagram of the mobile phone interface in fig. 9b, the user clicks the watch by using the name of the synchronized terminal displayed on the mobile phone interface 910, the mobile phone interface 920 displays the vibration function of the watch 904, and after clicking the vibration function, the mobile phone 901 receives the instruction of the user to call the application corresponding to the vibration function of the watch, so as to start the scene of setting vibration in the game scene. Also, by this mode, the mobile phone 901 turns on the large screen display function of the television 902, the game handle function of the mobile phone 901 and the play function of the speaker 903, and the game designated by the user is completed cooperatively by the four terminals. And the experience of the user is improved.
The following describes a service information synchronization procedure between a mobile phone and other terminals in various scenarios, with reference to the scenario shown in fig. 9a as an example.
Scenario 1, when handset 901 is newly joining a local area network. Referring to fig. 10, fig. 10 shows a flowchart of synchronization between a mobile phone and terminal information in a local area network, which may specifically include:
in step S1001, the mobile phone 901 generates a unique identifier. Specifically, the mobile phone 901 integrates the ip address connected to the television, the bluetooth address connected to the sound box 903, the address connected to the WiFi p2p of the watch 904, and the IMEI identifier of the mobile phone together to calculate, obtain a 4-byte hash value, and uses the hash value as a unique identifier for notifying other terminals.
In step S1002, the connection mode of the device to the local area network is determined, i.e. the point-to-point connection mode or the WiFi connection through the intermediary is determined. When the mobile phone 901 determines that the network access mode is a point-to-point connection mode, as in the scenario shown in fig. 9a, the mobile phone 901 determines that it is connected to the sound box 903 by bluetooth and is connected to the watch 904 by WiFi p2p, and step S1003 is executed, that is, a transmission channel is determined, and service information synchronization is initiated to the sound box 903 and the watch 904. After synchronization is completed, handset 901 stores its own service information, speaker 903, and watch 904, respectively.
When the mobile phone 901 determines that the network connection mode is not the point-to-point connection, step 1004 is executed to continuously determine whether the network connection mode is the IP connection, and when the mobile phone 901 determines that the network connection mode is the IP connection, for example, the mobile phone 901 determines that the network connection mode is the WiFi connection, step 1005 is executed by the mobile phone 901, that is, the broadcast service is on line and waits to be synchronized. After receiving the service online notification of the mobile phone 901, the television 902 in the local area network actively initiates a service information synchronization request to the mobile phone 901, where the service information request includes a unique identifier of the television and own service information data, and the mobile phone 901 responds to the service information synchronization request, sends own service information to the television 902, and stores the service information of the television 902 locally. And (5) completing the synchronization process of the two.
If the network method of the connection determined by the mobile phone is neither point-to-point connection nor ip connection, step S1006 is executed, and it is determined that the connection is abnormal, and synchronization is terminated.
The order of judgment in steps S1002 and S1004 may be changed, and is not limited herein.
Scene 2, when a new terminal is added in the local area network, the network equipment mobile phone 901 receives the broadcast online service of the new terminal, and after determining the transmission channel, actively initiates service information synchronization to the new terminal, wherein the service information comprises unique identification generated by the mobile phone 901, and the specific generation method can be referred to scene 1 and is not described herein. And after the new equipment responds to the service request, the service information synchronization of the new equipment and the new equipment is realized.
Scene 3, when a service information change occurs in a terminal in a local area network, referring to fig. 11, fig. 11 shows a flowchart of synchronization of a mobile phone with service information of the terminal with the service information change. The following steps are described by taking the mobile phone as an execution main body, and specifically comprise the following steps:
step S1101, a terminal list in the local area network is acquired.
Step S1102 judges whether the service information of all terminals in the terminal list has been completed synchronously. When it is determined that the service information of all the terminals has been completed in synchronization, step S1103 is executed, and the synchronization is ended. When judging that the service information of the terminal is not synchronized, executing the synchronization of the service information of the changed part of the terminal, and specifically comprising the following steps:
step S1104, obtaining changed service information of the terminal.
In step S1105, a transmission channel with the terminal is determined, and the channel determination may first determine that the connection mode is confirming the transmission channel.
Step S1106, initiate service information synchronization, and complete information synchronization. After the synchronization of the changed service information is finished, the mobile phone terminal can continuously monitor the terminal equipment in the local area network to change the service information so as to synchronize the service information among the terminals in time.
In the process of information synchronization, a large amount of repeated data exists, and in order to reduce the amount of synchronization data, each terminal can use a differential synchronization method to search step by step, so that only the changed service information is synchronized. The following describes an example of the change of the service information of the wristwatch.
Referring to fig. 12 in conjunction with fig. 9, fig. 12 shows a schematic diagram of the structure of differential synchronization. As shown in fig. 12, includes a handset 901 and a wristwatch 904. The handset 901 compares the pre-change service information of its previously stored watch with the stored post-change service information. The service information structure table is first compared as shown in fig. 12, and the table may refer to the table shown in table 2. The mobile phone 901 communicates with the watch 904 by adopting a preset protocol, during the communication process, the mobile phone 901 firstly obtains the hash value Ox34d3 of the service information structure table of the watch 904, compares the hash value Ox34d3 with the hash value Ox258c of the service information structure table before the change of the watch 904, judges whether the two are the same, if the two are different, the information in the table is changed, sequentially judges whether the hash values of the service information lists of the two devices are the same, and when the hash values of the service information lists are different, the hash values of the service content in the list are judged to be the same after the hash values are confirmed to be different, until different service contents are found, and the service contents are updated into the service information corresponding to the watch 904 in the mobile phone 901.
It should be noted that, the synchronization process of the service information of other terminals in the present application is the same as that of the mobile phone, and specific reference may be made to the synchronization process of the service information of the mobile phone, which is not described herein.
In addition, as shown in fig. 13, fig. 13 shows a schematic structural diagram of a terminal device of the present application. The terminal device includes:
memory 1301 for storing instructions for execution by one or more processors of the device, an
A processor 1302, configured to perform the service information synchronization method of the foregoing embodiment.
The present application also provides a computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the communication method of the above embodiments.
Referring now to fig. 13, shown is a block diagram of an apparatus 1200 in accordance with one embodiment of the present application. The device 1200 may include one or more processors 1201 coupled to a controller hub 1203. For at least one embodiment, the controller hub 1203 communicates with the processor 1201 via a multi-drop Bus, such as a Front Side Bus (FSB), a point-to-point interface, such as a fast channel interconnect (Quick Path Interconnect, QPI), or similar connection 1206. The processor 1201 executes instructions that control general types of data processing operations. In one embodiment, controller Hub 1203 includes, but is not limited to, a graphics memory controller Hub (Graphics Memory Controller Hub, GMCH) (not shown) and an Input Output Hub (IOH) (which may be on separate chips) (not shown), where the GMCH includes memory and graphics controllers and is coupled with the IOH.
The device 1200 may also include a coprocessor 1202 and memory 1204 coupled to the controller hub 1203. Alternatively, one or both of the memory and GMCH may be integrated within the processor (as described herein), with the memory 1204 and co-processor 1202 being directly coupled to the processor 1201 and the controller hub 1203, the controller hub 1203 being in a single chip with the IOH. The memory 1204 may be, for example, dynamic random access memory (Dynamic Random Access Memory, DRAM), phase change memory (Phase Change Memory, PCM), or a combination of both. In one embodiment, the coprocessor 1202 is a special-purpose processor, such as, for example, a high-throughput MIC processor (Many Integerated Core, MIC), a network or communication processor, compression engine, graphics processor, general-purpose graphics processor (General Purpose Computing on GPU, GPGPU), embedded processor, or the like. Optional properties of the co-processor 1202 are shown in fig. 13 with dashed lines.
Memory 1204, as a computer-readable storage medium, may include one or more tangible, non-transitory computer-readable media for storing data and/or instructions. For example, memory 1204 may include any suitable non-volatile memory, such as flash memory, and/or any suitable non-volatile storage device, such as one or more Hard Disk Drives (HDDs), one or more Compact Disc (CD) drives, and/or one or more digital versatile Disc (Digital Versatile Disc, DVD) drives.
In one embodiment, the device 1200 may further include a network interface (Network Interface Controller, NIC) 1206. The network interface 1206 may include a transceiver to provide a radio interface for the device 1200 to communicate with any other suitable device (e.g., front end module, antenna, etc.). In various embodiments, the network interface 1206 may be integrated with other components of the device 1200. The network interface 1206 may implement the functions of the communication units in the above-described embodiments.
Device 1200 may further include an Input/Output (I/O) device 1205. The I/O1205 may include: a user interface, the design enabling a user to interact with the device 1200; the design of the peripheral component interface enables the peripheral component to also interact with the device 1200; and/or sensors are designed to determine environmental conditions and/or location information associated with the device 1200.
It is noted that fig. 13 is merely exemplary. That is, although the apparatus 1200 is shown in fig. 13 as including a plurality of devices such as the processor 1201, the controller hub 1203, the memory 1204, etc., in practical applications, the apparatus using the methods of the present application may include only a part of the devices of the apparatus 1200, for example, may include only the processor 1201 and the NIC1206. The nature of the alternative device is shown in dashed lines in fig. 13.
According to some embodiments of the present application, the memory 1204, which is a computer readable storage medium, stores instructions that when executed on a computer cause the system 1200 to perform the service information synchronization method according to the above embodiments, and specific reference may be made to the method of the above embodiments, which is not described herein.
Embodiments of the mechanisms disclosed herein may be implemented in hardware, software, firmware, or a combination of these implementations. Embodiments of the present application may be implemented as a computer program or program code that is executed on a programmable system including at least one processor, a storage system (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device.
Program code may be applied to input instructions to perform the functions described herein and generate output information. The output information may be applied to one or more output devices in a known manner. For purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (Digital Signal Processor, DSP), microcontroller, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or microprocessor.
The program code may be implemented in a high level procedural or object oriented programming language to communicate with a processing system. Program code may also be implemented in assembly or machine language, if desired. Indeed, the mechanisms described in the present application are not limited in scope to any particular programming language. In either case, the language may be a compiled or interpreted language.
In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried by or stored on one or more transitory or non-transitory machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed over a network or through other computer readable media. Thus, a machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including, but not limited to, floppy diskettes, optical disks, compact disk Read-Only memories (Compact Disc Read Only Memory, CD-ROMs), magneto-optical disks, read-Only memories (ROMs), random Access Memories (RAMs), erasable programmable Read-Only memories (Erasable Programmable Read Only Memory, EPROMs), electrically erasable programmable Read-Only memories (Electrically Erasable Programmable Read Only Memory, EEPROMs), magnetic or optical cards, flash Memory, or tangible machine-readable Memory for transmitting information (e.g., carrier waves, infrared signal digital signals, etc.) in an electrical, optical, acoustical or other form of propagated signal using the internet. Thus, a machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).
In the drawings, some structural or methodological features may be shown in a particular arrangement and/or order. However, it should be understood that such a particular arrangement and/or ordering may not be required. Rather, in some embodiments, these features may be arranged in a different manner and/or order than shown in the drawings of the specification. Additionally, the inclusion of structural or methodological features in a particular figure is not meant to imply that such features are required in all embodiments, and in some embodiments, may not be included or may be combined with other features.
It should be noted that, in the embodiments of the present application, each unit/module is a logic unit/module, and in physical aspect, one logic unit/module may be one physical unit/module, or may be a part of one physical unit/module, or may be implemented by a combination of multiple physical units/modules, where the physical implementation manner of the logic unit/module itself is not the most important, and the combination of functions implemented by the logic unit/module is the key to solve the technical problem posed by the present application. Furthermore, to highlight the innovative part of the present application, the above-described device embodiments of the present application do not introduce units/modules that are less closely related to solving the technical problems presented by the present application, which does not indicate that the above-described device embodiments do not have other units/modules.
It should be noted that in the examples and descriptions of this patent, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
While the present application has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.

Claims (23)

1. A service information synchronization method for a terminal in a local area network, for a plurality of terminals in the same local area network, the method comprising:
the terminals are connected through a plurality of different communication connection modes, and all the terminals in the local area network use a unified preset protocol to synchronize service information among the terminals;
according to the preset protocol, each terminal of the plurality of terminals in the local area network has a unique identifier conforming to a preset format, wherein the unique identifier conforming to the preset format is calculated at least based on all addresses of the terminals in the network in communication connection with other terminals;
each of the plurality of terminals synchronizes service information stored in the terminal with at least one terminal directly connected thereto based on a unique identification conforming to a preset format;
and the plurality of terminals complete synchronization so that each terminal in the plurality of terminals stores service information of all terminals in the local area network.
2. The method according to claim 1, wherein each of the plurality of terminals synchronizes service information stored in the terminal with at least one terminal directly connected thereto, comprising:
And each terminal determines a transmission channel of at least one terminal directly connected with the terminal, and synchronizes service information stored in the terminal based on the transmission channel.
3. The method of claim 1, wherein when it is determined that a new terminal joins the local area network, a plurality of the terminals determine a transmission path with the new terminal and initiate service information synchronization with the new terminal,
the plurality of terminals complete synchronization such that each of the plurality of terminals stores service information of the new terminal, which stores service information of each of the terminals.
4. The method of claim 1, wherein the service information of at least one terminal in the local area network is determined to be changed,
a terminal except for the terminal with the service information change acquires a service information list of the terminal with the service information change and determines information content of a change part in the service information list;
and synchronizing the information content of the changed part to a stored service information list corresponding to the terminal which generates the service information change by the terminals except the terminal which generates the service information change.
5. Method according to claim 1, characterized in that the unique identification of the preset format is obtained at least on the basis of hash values calculated by all addresses of the terminal in the network in communication connection with other terminals.
6. The method according to claim 1, characterized in that the basic format of the preset protocol comprises a definition of the actions of the terminal and the type of object for which the actions are directed.
7. The method of claim 6, wherein the type of object for which the action is directed includes a service list feature value, a service list, a service feature value, and service information.
8. The method according to claim 6, wherein said actions are for enabling a data exchange procedure between terminals in said network, in particular comprising a handshake action, a take action and a send action between said terminals.
9. The method of claim 1, wherein service information stored in the terminals is synchronized among the plurality of terminals.
10. The method of claim 1, wherein the plurality of different communication connections comprises: at least two of bluetooth, wifi, NFC, infrared, code division multiple access, 5G, GMS, and long term evolution communication technologies.
11. A service information synchronization method for a terminal in a local area network, for a first terminal in the local area network, the method comprising:
the first terminal and a plurality of second terminals in the local area network are connected in a plurality of different communication connection modes, service information between the first terminal and the plurality of second terminals is synchronized by using a unified preset protocol in the local area network, and the first terminal in the local area network has a unique identifier conforming to a preset format according to the preset protocol, wherein the unique identifier of the preset format is calculated at least based on all addresses of the first terminal, which are in communication connection with the second terminals in the network;
the first terminal synchronizes service information stored in at least one second terminal directly connected thereto with the second terminal,
and when the first terminal completes synchronization, the service information of all terminals in the local area network is stored in the first terminal.
12. The method according to claim 11, wherein the first terminal and at least one second terminal directly connected thereto synchronize service information stored in the second terminal, comprising:
The first terminal determines a transmission channel of at least one second terminal directly connected thereto, and synchronizes service information stored in the second terminal based on the transmission channel.
13. The method of claim 11, wherein when it is determined that a new second terminal joins the local area network, the first terminal determines a transmission channel with the new second terminal and initiates service information synchronization with the new second terminal,
and the first terminal completes synchronization so as to increase the storage of the service information of the new second terminal in the first terminal.
14. The method of claim 11, wherein when the first terminal is first joining the local area network, the first terminal determines that the connection of the second terminal connected thereto is an IP connection;
the first terminal broadcasts service online to wait for a second terminal in the network to initiate a synchronous request to the second terminal, so that the first terminal stores service information of all terminals in the local area network.
15. The method of claim 11, wherein the service information of at least one second terminal in the local area network is determined to be changed,
The first terminal acquires a service information list of the terminal with the changed service information and determines the information content of the changed part in the service information list;
and the first terminal synchronizes the information content of the changed part into a stored service information list corresponding to the second terminal which is changed by the service information.
16. The method according to claim 11, wherein the unique identification in the preset format is obtained based at least on hash values calculated by all addresses of the first terminal in the network in communicative connection with the second terminal.
17. The method according to claim 11, wherein the basic format of the preset protocol includes a definition of an action of the terminal and a type of an object for which the action is directed.
18. The method of claim 17, wherein the type of object for which the action is directed includes a service list feature value, a service list, a service feature value, and service information.
19. The method according to claim 17, wherein said actions are for enabling a data exchange procedure between terminals in said network, in particular comprising a handshake action, a take action and a send action between said terminals.
20. The method according to claim 11, wherein the service information stored in the second terminal to which the first terminal is synchronized is service information of an application to which the second terminal is allowed to synchronize.
21. The method of claim 11, wherein the plurality of different communication connections comprises: at least two of bluetooth, wifi, NFC, infrared, code division multiple access, 5G, GMS, and long term evolution communication technologies.
22. An electronic device, the device comprising:
a memory for storing instructions for execution by one or more processors of the device, an
A processor, being one of the processors of a device, for performing the method of any of claims 11-21.
23. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, causes the processor to perform the method of any of claims 11-21.
CN202010762661.3A 2020-07-31 2020-07-31 Service information synchronization method for terminal in local area network and terminal Active CN114095998B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010762661.3A CN114095998B (en) 2020-07-31 2020-07-31 Service information synchronization method for terminal in local area network and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010762661.3A CN114095998B (en) 2020-07-31 2020-07-31 Service information synchronization method for terminal in local area network and terminal

Publications (2)

Publication Number Publication Date
CN114095998A CN114095998A (en) 2022-02-25
CN114095998B true CN114095998B (en) 2023-06-20

Family

ID=80295104

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010762661.3A Active CN114095998B (en) 2020-07-31 2020-07-31 Service information synchronization method for terminal in local area network and terminal

Country Status (1)

Country Link
CN (1) CN114095998B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902499A (en) * 2012-12-25 2014-07-02 联想(北京)有限公司 Processing method and electronic device
CN104052768A (en) * 2013-03-13 2014-09-17 彭涛 Distributed multi-point synchronization system and synchronization method thereof
WO2014178218A1 (en) * 2013-04-30 2014-11-06 ソニー株式会社 Information processing apparatuses, wireless communication system, information processing method, and program
CN104869560A (en) * 2014-02-26 2015-08-26 宇龙计算机通信科技(深圳)有限公司 Message notification method, message notification device, mobile equipment and message notification system
CN105530277A (en) * 2014-09-30 2016-04-27 宇龙计算机通信科技(深圳)有限公司 Method and device for cooperative work of devices
CN106255176A (en) * 2016-08-04 2016-12-21 深圳键桥通讯技术股份有限公司 The method that smart machine is accessed wireless network
CN106603716A (en) * 2016-12-30 2017-04-26 Tcl集团股份有限公司 Synchronization method of intelligent device state, intelligent device and control terminal thereof
CN106851775A (en) * 2017-02-03 2017-06-13 惠州Tcl移动通信有限公司 Interconnecting method and system based on Wi FiAware agreements
CN107241207A (en) * 2016-03-29 2017-10-10 中兴通讯股份有限公司 device management method and device
CN107995071A (en) * 2017-11-24 2018-05-04 张博文 A kind of more equipment integration of operation systems of non-stop layer
CN108200141A (en) * 2017-12-28 2018-06-22 沈阳美行科技有限公司 A kind of car data-sharing systems and method
CN108810129A (en) * 2018-06-06 2018-11-13 朔联科技(上海)有限公司 Internet of Things network control system and method, terminal device and local network services equipment
CN110191462A (en) * 2019-05-28 2019-08-30 北京小米移动软件有限公司 A kind of method, apparatus, medium and the equipment of determining mobile terminal
CN110351383A (en) * 2019-07-18 2019-10-18 深圳市元征科技股份有限公司 Method for processing business, equipment and readable storage medium storing program for executing
CN110611905A (en) * 2019-08-09 2019-12-24 华为技术有限公司 Information sharing method, terminal device, storage medium, and computer program product

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902499A (en) * 2012-12-25 2014-07-02 联想(北京)有限公司 Processing method and electronic device
CN104052768A (en) * 2013-03-13 2014-09-17 彭涛 Distributed multi-point synchronization system and synchronization method thereof
WO2014178218A1 (en) * 2013-04-30 2014-11-06 ソニー株式会社 Information processing apparatuses, wireless communication system, information processing method, and program
CN104869560A (en) * 2014-02-26 2015-08-26 宇龙计算机通信科技(深圳)有限公司 Message notification method, message notification device, mobile equipment and message notification system
CN105530277A (en) * 2014-09-30 2016-04-27 宇龙计算机通信科技(深圳)有限公司 Method and device for cooperative work of devices
CN107241207A (en) * 2016-03-29 2017-10-10 中兴通讯股份有限公司 device management method and device
CN106255176A (en) * 2016-08-04 2016-12-21 深圳键桥通讯技术股份有限公司 The method that smart machine is accessed wireless network
CN106603716A (en) * 2016-12-30 2017-04-26 Tcl集团股份有限公司 Synchronization method of intelligent device state, intelligent device and control terminal thereof
CN106851775A (en) * 2017-02-03 2017-06-13 惠州Tcl移动通信有限公司 Interconnecting method and system based on Wi FiAware agreements
CN107995071A (en) * 2017-11-24 2018-05-04 张博文 A kind of more equipment integration of operation systems of non-stop layer
CN108200141A (en) * 2017-12-28 2018-06-22 沈阳美行科技有限公司 A kind of car data-sharing systems and method
CN108810129A (en) * 2018-06-06 2018-11-13 朔联科技(上海)有限公司 Internet of Things network control system and method, terminal device and local network services equipment
CN110191462A (en) * 2019-05-28 2019-08-30 北京小米移动软件有限公司 A kind of method, apparatus, medium and the equipment of determining mobile terminal
CN110351383A (en) * 2019-07-18 2019-10-18 深圳市元征科技股份有限公司 Method for processing business, equipment and readable storage medium storing program for executing
CN110611905A (en) * 2019-08-09 2019-12-24 华为技术有限公司 Information sharing method, terminal device, storage medium, and computer program product

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈海明 ; 崔莉.面向服务的物联网软件体系结构设计与模型检测.《计算机学报》.2015, *

Also Published As

Publication number Publication date
CN114095998A (en) 2022-02-25

Similar Documents

Publication Publication Date Title
KR102208438B1 (en) Method for proximity service data and an electronic device thereof
JP6751094B2 (en) Method, apparatus and system for supporting wireless communication
US10075896B2 (en) Service providing method using a beacon and electronic apparatus thereof
KR20180005471A (en) Method and apparatus for communicating using multi frequency bands
CN110795179B (en) Display method and electronic equipment
CN110753334A (en) Bluetooth communication method, device and equipment with Bluetooth communication function
KR20160100153A (en) Method for Searching Device and Electronic Device supporting the same
US11323880B2 (en) Method for wireless connection and electronic device therefor
CN113873678A (en) Method and electronic equipment for transmitting data
WO2017214137A1 (en) Methods, devices and systems for supporting wireless communication
US20230216732A1 (en) Network Configuration Method and Device
CN114095998B (en) Service information synchronization method for terminal in local area network and terminal
WO2022252796A1 (en) Online detection method based on heartbeat packet, and device
WO2016123217A1 (en) Methods, devices and systems for supporting wireless communication
CN112152850A (en) Internet of things equipment management method based on IGRS (intelligent grouping and resource sharing) protocol and business terminal
KR20160105031A (en) Electronic apparatus and operating method thereof
KR102238897B1 (en) Method for proximity service data and an electronic device thereof
CN114173317B (en) Method for transmitting data and electronic equipment
CN112689274B (en) Prompting method and device for short-distance wireless communication connection and massaging equipment
US20240015073A1 (en) Connection configuration method and apparatus
WO2023051229A1 (en) Method and apparatus for identifying device, and electronic device and medium
CN117119077A (en) Communication method and electronic equipment
CN116501230A (en) Large screen equipment access method and related device
CN116980429A (en) Method and device for processing consensus of block chain, electronic equipment and storage medium
CN115811707A (en) Device discovery method, device and system

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