CN114095998A - 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
CN114095998A
CN114095998A CN202010762661.3A CN202010762661A CN114095998A CN 114095998 A CN114095998 A CN 114095998A CN 202010762661 A CN202010762661 A CN 202010762661A CN 114095998 A CN114095998 A CN 114095998A
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.)
Granted
Application number
CN202010762661.3A
Other languages
Chinese (zh)
Other versions
CN114095998B (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 belongs to the technical field of communication, and is used for synchronizing the service information among all terminals in a dynamic and complex local area network, the terminals in the local area network all adopt a uniform 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. The synchronization method can realize the synchronization of the service information of each terminal in a complex local area network, and can cooperatively complete the specified task target, thereby improving the experience.

Description

Service information synchronization method for terminal in local area network and terminal
Technical Field
The present application 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, the wide popularization of smart devices, especially the progress of Local Area Networks (LANs) in homes and the expansion of information demand, generally, one home (or a natural person) will have a plurality of smart devices, and a plurality of devices form a complex dynamic local area network through various communication methods (e.g., optical fiber, wireless fidelity (Wi-Fi), bluetooth, Near Field Communication (NFC), infrared, Google Mobile Services (GMS), Code Division Multiple Access (CDMA), Long Term Evolution (LTE), 5G, etc.). The online situation of the intelligent device is also changed, whether the intelligent device is provided with a central device such as a router or not also causes different network topological structures, and the authority of a person using the intelligent device is also different. The network elements are diverse and dynamic in structure, different devices have different physical capabilities (CPU/ROM/RAM capabilities, whether cameras, microphones and the like exist), different operating systems (Android, RTOS, Windows, Linux and the like) run on the devices, different software numbers and types allowed on different devices are different, and the same software version types may also be different.
Therefore, a plurality of devices are provided for users to cooperatively complete a function, and the development trend becomes application, for example, a mobile phone is used as a game handle to control games on a television, a sound box is used for playing game sound, and watch vibration is used as game feedback; if the intelligent television plays the body-building action, the home camera shoots the action of the body-building person, and the PC performs intelligent analysis on whether the action is standard or not. If a certain function is to be cooperatively completed, a remote service on another device needs to be called through an application program or a service on the device, and before calling, a service list provided on the other device needs to be known, which includes information such as an interface type, a version number, a service state, a service dependency and the like of the service.
However, in the prior art, management is performed by a central node, all services are registered on the central node, and a mode of querying a service address from the central node before a network application calls a service and a mode of querying a remote service state from a 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 and a terminal for a terminal in a local area network, which can solve the problem of service information synchronization between terminals under dynamic and diverse complex local area network conditions, so as to achieve that the terminals in the complex local area network can cooperatively complete a function.
Some embodiments of the present application provide a service information synchronization method for a terminal in a local area network and a terminal device. The present application is described below in terms of several aspects, embodiments and advantages of which are mutually referenced.
In a first aspect, the present application provides a method for synchronizing service information of a terminal in a local area network, including: the plurality of terminals are connected through a plurality of different communication connection modes, all the terminals in the local area network of the application use a uniform preset protocol to synchronize service information between the terminals, wherein the service information comprises information structure data of equipment of the terminals and service information structure data of each application in the terminals. According to the preset protocol, each terminal of the plurality of terminals in the local area network is respectively provided with a unique identifier conforming to a preset format, wherein the unique identifier conforming to the preset format is obtained by calculation at least based on all addresses of the terminals in communication connection with other terminals in the network. For example, a hash value of 4 characters is calculated based on at least all addresses of the terminals in the network, wherein the addresses are in communication connection with other terminals, the hash value is a unique identifier of the terminal, and the unique identifier of the terminal device in communication with the terminal device is informed in the communication process, so that other terminals connected with the terminal device can determine that the same terminal is connected, and service information of other terminals can be acquired from the terminal device. Each terminal in the plurality of terminals synchronizes the service information stored in the terminal based on the unique identifier conforming to the preset format and at least one terminal directly connected with the unique identifier, and the plurality of terminals complete synchronization, so that each terminal in the plurality of terminals stores the service information of all terminals in the local area network.
According to the method of the embodiment of the application, the terminal devices adopt a uniform preset protocol, each terminal can have the 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 the service information of each other and the address of the terminal with the service information, and can directly call the service of each other to cooperatively complete a task. The user can cooperate to accomplish a function according to the terminal that oneself owns, has promoted user's experience.
In a possible implementation of the first aspect, synchronizing, by each of the plurality of terminals and at least one terminal directly connected thereto, service information stored in the terminal of the present application includes: each terminal determines a transmission channel of at least one terminal directly connected with the terminal, for example, the connection mode between two terminals is determined to be a point-to-point transmission mode through bluetooth and WIFI p2p, and service information stored in the terminal is synchronized based on the transmission channel through the point-to-point transmission channel, so that the terminals can quickly and accurately synchronize service information with each other.
In a possible implementation of the first aspect, when it is determined that a new terminal joins the local area network, the plurality of terminals of the application determine a transmission channel with the new terminal, and initiate service information synchronization with the new terminal of the application, and 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 each terminal of the application.
In a possible implementation of the first aspect, after determining that the service information of at least one terminal in the local network is changed, performing information synchronization by using a differential synchronization method, that is, a terminal other than the terminal with the changed service information obtains a service information list of the terminal with the changed service information, and determines information content of a changed part in the service information list; the terminals except the terminal with the changed service information synchronize the information content of the changed part to the stored service information list corresponding to the terminal with the changed service information. The method can effectively avoid the existence of a large amount of repeated data in the service information synchronization process, and reduce the synchronous data volume.
In a possible implementation 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, where the unique identifier in the preset format of the present application is obtained at least based on hash values calculated by all addresses of the terminals in the network, where the terminals are in communication connection with other terminals. Each terminal in the local area network integrates all the addresses connected with other terminals together as the unique identifier of the equipment, so that each terminal can correspondingly acquire the connection relation among the terminals in a one-to-one manner in the communication process, for example, the terminal is connected with other terminals through the same terminal or a plurality of terminals, and acquires service information among the terminals, thereby realizing the synchronization of the service information among all the terminals on the multi-terminal dynamic and various complex local area networks. And the unique identifier is transmitted and stored in a hash value form, so that the number of bytes is small, and the transmission is convenient.
In a possible implementation of the first aspect, the basic format of the pre-set protocol includes definitions of actions of the terminal and types of objects for which the actions are directed. The terminal enables each terminal to read the intention of the other side based on the definition of the protocol action so as to select direct data interaction, or the data interaction between the two sides is realized by sending a service request.
In one possible implementation of the first aspect, the type of the object for which the action is performed includes 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 a hash value, and the hash value is calculated by the terminal based on the service list.
In a possible implementation of the first aspect, the application action is used to implement a data exchange process between terminals in the local area network of the application, and specifically includes a handshake action, a fetch action, and a send action between the terminals of the application.
In a possible implementation of the first aspect, the service information stored in the terminal of the present application that is synchronized among the plurality of terminals of the present application is service information of an application that is allowed to be synchronized by each terminal, so as to ensure the security of the information of each terminal.
In a possible implementation of the first aspect, the multiple different communication connection manners of the present application include: 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 method for synchronizing service information of a terminal in a local area network, where the method is used for a first terminal in the local area network, and the method includes: the method comprises the steps that a first terminal and a plurality of second terminals in a local area network are connected in different communication connection modes, and the first terminal and the second terminals in the local area network use a unified preset protocol to carry out service information synchronization between the terminals; the first terminal and at least one second terminal directly connected with the first terminal synchronize the service information stored in the second terminal, and when the first terminal completes synchronization, the first terminal stores the service information of all terminals in the local area network.
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, when the terminals in the local area network need to complete a function, such as a game, the first terminal can have which service information of each terminal in the local area network, and addresses of the terminals corresponding to the service information, and can directly call the service with the required terminal to cooperatively complete a task. The user experience is improved.
In a possible implementation of the second aspect, synchronizing, by the first terminal and at least one second terminal directly connected thereto, 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, the connection mode between the two terminals is determined to be a point-to-point transmission mode through bluetooth and WIFI p2p, and service information stored in the second terminal is synchronized based on the transmission channel through the point-to-point transmission channel.
In a possible implementation of the second aspect, 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 that the first terminal adds storage of the service information of the new second terminal, and service information of all terminals entering the local area network can be synchronized.
In a possible implementation of the second aspect, when the first terminal of the present application is first joined to the local area network, the first terminal of the present application determines that the connection of the second terminal connected to the first terminal is an IP connection, and the first terminal of the present application broadcasts the service to be online, so as to wait for the second terminal in the network to initiate a synchronization request to the second terminal, so that the first terminal of the present application stores the service information of all terminals in the local area network of the present application.
In a possible implementation of the second aspect, it is determined that the service information of at least one second terminal in the local area network is changed, the first terminal obtains 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; the first terminal synchronizes the information content of the changed part to the stored service information list corresponding to the second terminal with the changed service information. The method can effectively avoid the existence of a large amount of repeated data in the service information synchronization process, and reduce the synchronous data volume.
In a possible implementation of the second aspect, according to the preset protocol of the present application, the first terminal in the local area network of the present application has a unique identifier conforming to a preset format, where the unique identifier in the preset format of the present application is obtained at least based on hash values calculated by all addresses of the first terminal in communication connection with the second terminal in the network of the present application. The first terminal integrates the connection addresses of all the second terminals directly connected with the first terminal together as a unique identifier of the device, 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, for example, the first terminal acquires the service information of other terminals connected with the first terminal through the same or multiple terminals, and further realizes the synchronization of the service information of the multiple terminals on a dynamic and various complex local area network. And the unique identifier is transmitted and stored in a hash value form, so that the number of bytes is small, and the transmission is convenient.
In a possible implementation of the second aspect, the basic format of the pre-set protocol includes definitions of actions of the terminal and types of objects for which the actions are directed. The terminal enables each terminal to read the intention of the other side based on the definition of the protocol action so as to select direct data interaction, or the data interaction between the two sides is realized 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 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 a hash value, and the hash value is calculated by the terminal based on the service list.
In a possible implementation of the second aspect, the application action is used to implement a data exchange process between terminals in the application network, and specifically includes a handshake action, a fetch action, and a send action between terminals in the application.
In a 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 of an application that is allowed to be synchronized by the second terminal of the present application, so as to ensure the security of information of each terminal.
In a possible implementation of the second aspect, the multiple different communication connection manners of the present application include: 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 described above.
In a fourth aspect, the present application provides an electronic 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 the device, configured to perform the method of the second aspect.
In a fifth aspect, the present application further 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 scene diagram of information synchronization of multiple terminals in a complex network according to an 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 handset according to an embodiment of the present application;
FIG. 4a is a schematic diagram illustrating a ring network topology according to an 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 mode included in the terminal according to an embodiment of the present application;
fig. 8 is a schematic diagram of a process of data interaction of a terminal device according to an embodiment of the present application;
FIG. 9a is a diagram of a game scenario according to an embodiment of the present application;
FIG. 9b is a schematic diagram illustrating operation of a mobile phone interface according to an embodiment of the present application;
fig. 10 is a flowchart illustrating synchronization between a mobile phone and terminal information in a local area network according to an embodiment of the present application;
fig. 11 is a flowchart illustrating service information synchronization between a mobile phone and a terminal for changing service information according to an embodiment of the present application;
FIG. 12 is a schematic diagram of a differential synchronization structure according to an 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 of 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 will 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 executes 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 will be appreciated that in the various embodiments of the present application, the processor may be a microprocessor, a digital signal processor, a microcontroller, the like, and/or any combination thereof. According to another aspect, the processor may be a single-core processor, a multi-core processor, the like, and/or any combination thereof.
It should be noted that the terminal in the present application may be a mobile phone, a tablet PC, a desktop PC, a notebook computer, a high definition television, a player, a sound box, an electronic book, and other terminal devices with a communication function.
Embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Fig. 1 shows a scene diagram of information synchronization of multiple terminals in a complex network. Referring to fig. 1, the scene includes a television 101, a tablet computer 102, a mobile phone 103, a watch 104, a speaker box 105, an electronic book 106, a lightweight electronic device 107, and a notebook computer 108. The terminals adopt various connection states including WiFi connection, Bluetooth connection and NFC connection. For example, for a WiFi connection, the television 101 may be connected to the tablet computer 102, the computer 108, and the mobile phone 103 through a wireless router via a wireless network; for the bluetooth connection, the mobile phone 103 may be connected with the watch 104 and the audio box via bluetooth, the television 101 may be connected with the electronic book 106 via bluetooth, and the lightweight electronic device 107 may be connected with the television 101 and the notebook computer 108 via bluetooth, respectively; for NFC connection, the speaker 105 and the electronic book 106 may be NFC connected. Moreover, the operating systems employed by the respective devices are also different. The television 101 adopts a harmon Operating System (HMOS) and an emotional Operating System (EMUI), the tablet computer 103 and the mobile phone 103 adopt an EMUI System, the watch 104, the sound box 105 and the electronic book 106 adopt an HMOS 1.0 System, the lightweight electronic device is a System-less device, and the notebook computer 108 adopts a window 10 System. During the connection process, 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 a plurality of terminals, the network is dynamic, diverse and complex because the type and quantity of the system used by each terminal and the software running on each terminal are different, the connection mode is different, and even a newly added terminal may exist in the local area network.
In such a complex network scenario, if a plurality of terminals in the local area network need to cooperatively complete an activity item, for example, when a game is completed, each terminal needs to query which service information exists between the terminals at any time, and invoke 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, a sound box plays the sound effect of the game, and the like.
According to the method and the device, a service information management function is established in each terminal, all service information in local and/or remote terminals is managed through the service information management function, and the terminals communicate by adopting a uniform preset protocol when the service information is synchronized through the service management function, so that the service information of all the terminals in the local area network is stored in each terminal.
In contrast, in the synchronization process of the service information in the prior art, all services are registered on a fixed central node, the central node manages the services, and the service information of each terminal is queried and synchronized. In addition, another service method in the prior art is to query and synchronize service information through a point-to-point connection method, and the query result cannot be shared by other terminals. Thus, these two methods for synchronizing service information are not suitable for synchronizing service information of terminals in a dynamic, complex local area network as described herein.
By means of the technical scheme, even in the complex network environment, the user can connect the terminal equipment owned by the user in multiple connection modes according to the actual needs of the user, so that the user can complete an activity project to be completed, and user experience is improved.
In the present application, the service information synchronized by each terminal is service information of an application that each terminal allows synchronization. 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, a structure of a terminal device and a service information synchronization process are described below, and fig. 2 shows a schematic structural diagram 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 (USB) interface 130, a charging 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, a button 190, a camera 193, and a display screen 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 light 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 is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the mobile phone 100. In other embodiments of the present application, the handset 100 may include more or fewer components than shown, or some components may be combined, some components may be separated, or a different arrangement of components may be used. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in 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 have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In one embodiment of the present application, the processor 110 may store instructions for implementing a synchronization method of service information according to the present application through a memory provided. After the instruction is executed, the mobile phone 100 may synchronize the service information of other terminals in the local area network to the local area, and send the service information of itself to the other terminals, so that in the local area network, each terminal stores the service information of all terminals.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally 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, in the same lan, the bluetooth module in the wireless communication module 160 of the mobile phone 100 and the bluetooth modules of other terminals implement a peer-to-peer communication mode, and the mobile phone 100 and the other terminals both adopt a uniform preset protocol, and according to the preset protocol, each of the plurality of terminals in the lan has a unique identifier conforming to a preset format, the mobile phone 100 can directly obtain service information of its own and the other terminals stored in the terminal from the terminal directly connected thereto, and the mobile phone 100 can send the service information of its own to the terminal directly connected thereto, thereby implementing service information synchronization between the mobile phone 100 and the terminal connected thereto.
The wireless communication function of the mobile phone 100 can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the 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 can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as 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 including wireless communication of 2G/3G/4G/5G, etc. applied to the handset 100.
The wireless communication module 160 may provide solutions for wireless communication applied to the mobile phone 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), Bluetooth (BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like.
In some embodiments, the antenna 1 of the handset 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the handset 100 can communicate with other terminals in the local area network through a wireless communication technology and by using a uniform preset protocol.
The wireless communication technology may further include global system for mobile communications (GSM), General Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), Wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The software system of the mobile phone 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application exemplifies a software structure of the mobile phone 100 by taking an Android system with a layered architecture as an example.
Fig. 3 is a block diagram of a software configuration of the mobile phone 100 according to the embodiment of the present application.
The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 3, the application package may include applications such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in fig. 3, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, a service information management module, and the like.
The service information management module provides an information service management function for the mobile phone 100, manages service information of the mobile phone 100 and service information of other terminals synchronized with other terminals, and the mobile phone 100 can have other terminals in the same local area network to synchronize the service information through the service information management module, so that the mobile phone 100 can know which applications or functions the other terminals have, and further call applications corresponding to the service information of each terminal according to needs. For example, the mobile phone 100 is connected to a speaker through bluetooth, the service information management function of the mobile phone 100 performs service information synchronization with the speaker through a bluetooth module, and stores the service information locally, when the user plays a game, the mobile phone 100 learns that the speaker has an audio playing function by querying the locally stored service information, and starts the audio playing function of the speaker, so as to play the sound of the game through the speaker.
The service information management module may be disposed in the system library, and 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.
The following describes a method for synchronizing service information for a terminal in a local area network in a specific embodiment.
Fig. 4a and 4b show an architecture diagram 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, and a topology type as shown in fig. 4a and 4b in combination. And the system and service functions of each terminal A to D in the local area network are different, thereby forming a dynamic, various and complex local area network. The 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 consisting of a mobile phone, a television and a watch, wherein the mobile phone, the television and the watch all use the same communication protocol, the mobile phone and the television are connected through an intermediary terminal, such as a router, and the mobile phone and the watch are connected point-to-point through bluetooth. A new terminal may also be added to the local area network. The following describes a method for synchronizing service information applied to a plurality of terminals in the local area network in conjunction with the network architecture in fig. 4 a. Fig. 5 shows a flowchart 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, a plurality of terminals connected via a plurality of different communication connection manners use a unified preset protocol to perform service information synchronization between the terminals. Therein, in step S510, terminal a establishes a connection, for example, a WiFi connection, with terminal B. In step S511, terminal a establishes a connection, for example a WiFi connection, with terminal C. In step S512, terminal C establishes a connection, for example a bluetooth connection, with terminal D. In step S513, terminal B establishes a connection, for example, a bluetooth connection, with terminal D. Thus, the 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 with the terminal directly connected thereto. The service information may be service information corresponding to a function or application owned by each terminal, for example, a payment function possessed by a payment treasure, a play-out function possessed by a sound box, an application of data analysis and processing possessed by a mobile phone, a large-screen display function possessed by a television, and the like.
According to the embodiment of the application, each terminal can adopt a uniform preset protocol to realize the synchronization of the service information of all terminals in the local area network, so that the problem that the normal synchronization cannot be realized due to different connection modes and the difference of terminals such as an operating system 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 terminal a and terminal B will store the service information of terminals a and B. In step S521, the terminal a and the terminal C perform synchronization of service information. Thus, both terminal a and terminal C will store the service information of terminals a, B and C. In step S522, the terminal C and the terminal D perform synchronization of service information. Thus, both terminal C and terminal D will store the service information of terminals a, B, C, D. In step S523, the terminal D and the terminal B perform synchronization of the service information. Thus, terminal B will also store the service information of terminals a, B, C, D. In step S524, the terminal a and the terminal B perform synchronization of the service information again. In this way, terminal a will also store the service information of a, B, C, D.
When the plurality of terminals complete the synchronization, each of the plurality of terminals a, B, C, D stores the service information of all the 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 collaboratively complete a task target, the terminals can know which functions each other has 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 flowchart, the sequence of steps S510 to S513 in the process of establishing the connection is merely an exemplary illustration, and the application is not limited thereto, and may be another sequence or be completed synchronously.
It should be noted that, in the process of synchronizing the service information, steps S520 to S524 are merely exemplary, and the application is not limited thereto, and may be completed in other orders or synchronously.
In the service information synchronization method, a unified protocol used by each terminal to synchronize service information and details of a service information management function in each terminal will be described below.
In one embodiment of the present application, the terminals in the local area network communicate using a uniform, predetermined protocol. The preset protocol may be preset in the production process, or may be added or changed after the terminals leave the factory, for example, an application for uniformly using the preset protocol is downloaded in each terminal, so that each terminal can use the uniform preset protocol. When the terminals need to synchronize the service information, each terminal adopts a uniform preset protocol, and realizes the synchronization of the service information by initiating or receiving a service information synchronization request and receiving or sending a response aiming at the service information synchronization request. The preset protocol may include definitions of a service information synchronization protocol, specifically, a protocol basic format, a protocol header, an action, an object type, a handshake protocol, a get (get) action protocol, a send (put) action protocol, and the like, and specifically, the definitions of the protocol basic format are as shown in table 1 below.
TABLE 1 protocol basic Format
Protocol header Movement of Object type Number of Object size Data of
6byte 1byte 1byte 2byte 2byte
Wherein the protocol header can be represented by 6 bytes as shown in table 4 below.
Table 2 protocol header definitions
Figure BDA0002613506520000091
The letters DSIS in table 2 are abbreviations for device service information synchronization, and in the device communication process, the message with the identifier is used to indicate a request message or a response message for service information synchronization. It should be noted that the protocol header may also be other numbers or letters, and is not limited herein.
The definition of the action in the protocol basic format in table 1 can be represented by one byte, wherein the specific definition is detailed in table 3.
TABLE 3 action definitions
Value taking Description of the invention
0 Handshaking
1 Get
2 Put
Retention
The handshake shown in table 3 is denoted by 0, get by 1 and put by 2. As an exemplary scenario, terminal a wants to obtain service information of terminal B, first, a handshake is performed to establish a connection, then terminal a sends a get request to terminal B, the get request indicates an object type to be obtained, and terminal B sends (put) data corresponding to the object type in the request to terminal a after responding to the request. According to one embodiment of the present application, specific definitions of handshake-in-action, get, and put protocols are shown in tables 4-6.
Table 4 handshake protocol definitions
Protocol header Movement of Object type Number of
6byte 0 0 0
Before two terminal devices communicate, the connection relation of the two devices is determined through a handshake protocol. As shown in fig. 6, a schematic diagram of a handshake process between two terminal devices, a device 601 sends handshake request data to a device 602, and the device 602 responds to the handshake data and establishes a connection.
The get action protocol definition, as the terminal would implement, is illustratively shown below in table 5.
Table 5get action protocol definitions
Protocol header Movement of Object type Number 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. The specific description of the object identification is described in detail in the following embodiments. If the terminal is to perform a put action, the protocol definition is illustratively as shown in Table 6 below.
Table 6put action protocol definitions
Protocol header Movement of Object type Number of Object size Object data
6byte 2 1~255 0~65535 0~65535
Among them, the object data in table 6 may include device information structure and service information structure data. 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 exemplified.
TABLE 7 object type definitions
Figure BDA0002613506520000101
Figure BDA0002613506520000111
In table 7, the object type indicates an object of transmission or reply of the action, for example, when the terminal a transmits a get request to the terminal B, the object type in the request is 1, 1 represents a device list feature value, and the terminal B responds to the request and puts data 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, after the request is responded, the data of the object type is replied to be the device list characteristic value, the device characteristic value, the service list characteristic value, or the service characteristic value. By adopting the characteristic value mode, when the service information of the terminal is changed, only the data with different characteristic values are synchronized, and the data transmission efficiency can be improved. For example, terminal a and terminal B have synchronized service information, that is, terminal a stores the service information of terminal B, and when the service information of terminal B is changed, in order to avoid repeated synchronization of data, the changed data is first found out. The method comprises the steps that a terminal A firstly requests a characteristic value of an equipment list, a terminal B sends a characteristic value (hash value) of the equipment list to the terminal A, the terminal A compares the characteristic value of the equipment list with a characteristic value of the equipment list of the terminal B before change, when the characteristic values of the two equipment lists are different, the equipment list is changed, at the moment, the terminal A sends a request to the terminal B, the request contains a value of an object type of 2, the value of 2 is represented as the equipment list, the terminal B sends the equipment list of the terminal B to the terminal A according to the request, and further synchronization of the equipment list between the terminals is achieved. If the characteristic values of the two device lists before and after the change are the same, the device list does not need to be requested, and the device characteristic values can be directly requested to be compared. Thereby realizing the synchronization of the service information. The mode can effectively reduce the data transmission quantity and improve the data transmission efficiency.
The object id in the get action protocol is described as shown in table 8.
Object identification of Table 8get
Object type Identification
Device list feature value 0
Device list 0
Characteristic value of equipment DeviceID
Device information DeviceID
Service list feature value DeviceID
Service list DeviceID
Service characteristic value ServiceID
Service information ServiceID
In table 8, the identifier corresponding to the device feature value, the device information, the service list feature value, and the service list is a device unique identifier "DeviceID", and the service feature value and the service information identifier are service unique identifiers "ServiceID". That is, in the process of getting a service information, first obtaining DeviceID to determine a designated device, and finding the service information corresponding to the ServiceID in the service list of the device, so as to obtain the service information on the specific designated device. The unique identification of the device comprises a set of all addresses based on 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 hash value of 4 bytes according to a hash algorithm, and in the transmission process, the resource occupation ratio is small, so that the transmission is facilitated.
Referring to fig. 7, fig. 7 shows a schematic diagram of a connection scheme included in the terminal. As shown in fig. 7, the terminal device a is connected to the terminal device B through bluetooth in the local area network, and connected to the device C through wifi, all unique identifiers of the terminal device a include an IP address connected to wifi, an address connected to bluetooth, a product Serial Number (SN) that is fixed and unchangeable, and an Identity code (IMEI) of the Mobile device, the terminal device a calculates the unique identifiers into a hash value of 4 bytes through a hash algorithm, and if the hash value is calculated, Ox35fe is obtained, and the Ox35fe is used as the unique identifier of the terminal device a to notify other terminals, and all unique identifiers of the terminal device B include a bluetooth address connected to the device a and a product serial number that is fixed and unchangeable. 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 the unique identifications of the terminal equipment C comprise ip addresses connected with the terminal equipment A through WiFi, the terminal equipment C calculates all the unique identifications owned by the terminal equipment C through a hash algorithm to obtain 4-byte hash values, such as Oxad27, and informs other terminals of the Oxad27 serving as the unique identification of the terminal equipment C. Under various connection states, each device has a unique identifier, so that the devices can conveniently know the addresses of each other and synchronize service information of each other, and the transmission speed is high because only a few bytes are used in a hash value identification mode.
According to the preset protocol, the communication process can be realized among the terminals in the dynamic and complex local area network, and the synchronization of the service information is carried out.
The following describes a process of data interaction between devices with reference to fig. 6 and fig. 8, and fig. 8 shows a schematic diagram of a process of data interaction between terminal devices, as shown in fig. 8, after handshaking between a terminal 601 and a terminal 602, the terminal 601 will initiate 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 is identified with 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 sending a request, and after the terminal 602 receives the request, data corresponding to the object type, such as a device characteristic value (hash value calculated based on device information), is sent 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, the service information of itself is sent to the terminal 602, and the terminal 602 synchronizes the acquired service information to the local. In addition, the terminal 602 may also actively transmit the service information to the terminal 601.
In the embodiment of the present application, the service information management function provided to each terminal in the local area network can manage the service information of the terminal itself and other terminals. Wherein the service information management function manages the service information by defining a service information data structure, and the service information data structure may further include a device information structure and a service information structure. The service information management function of each terminal may manage its own service information data structure in the form shown in tables 9 and 10, and exemplary contents thereof may be seen in tables 9 and 10.
Table 9 device information structure
Figure BDA0002613506520000121
Figure BDA0002613506520000131
The device information structure in table 9 may include a device list and service information, where fields that must be filled in the service information include a version number described in the device information, a device unique identifier, and field information such as a service list accessible to the outside, where services that can be accessed by other devices are recorded in the "servicelist" and only services in this list can be accessed by other devices.
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 a description of the type of interface and service information that the terminal has, and specifically, the service information may include a version number of the service information description, such as "hh.mm.11"; a service unique identifier, such as "domain name, company name, category, service name"; service interface version number, such as "hhh.mmm.111.ext"; a list of supported interface types and a list of other services relied on, and the standard of the interface types can be AIDL, HIDL, ZIDL, RESTFUL, customizable extension types, and the like. After the service information of a plurality of terminals in the 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, and each terminal finds the terminal device and acquires the function of each terminal through the unique identifier of the device information in the service information.
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 diagram. The scene comprises a local area network consisting of a mobile phone 901, a television 902, a loudspeaker 903 and a watch 904, wherein the mobile phone 901 is connected with the television 902 through WiFi, the loudspeaker 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 in a point-to-point manner. All the devices adopt the preset protocol described in the above embodiments to communicate, so as to implement the synchronization of the service information. The service information of the television 902 has a large-screen display function, the service information of the sound box 903 has an external playing 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 check the service information of each device through the mobile phone 901, and select a corresponding function to complete the game. As shown in the operation diagram of the mobile phone interface shown in fig. 9b, the user clicks the watch through 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 the user clicks the vibration function, the mobile phone 901 receives an instruction from the user to invoke an application corresponding to the vibration function of the watch, so as to start a scene in which vibration is set in a game scene. Similarly, in this way, the mobile phone 901 starts the large screen display function of the television 902, and the game handle function of the mobile phone 901 and the external playing function of the loudspeaker 903 cooperate to complete the game designated by the user through the four terminals. The user experience is improved.
The following describes a service information synchronization process between a mobile phone and other terminals in various scenarios by taking the scenario shown in fig. 9a as an example.
Scenario 1, when the handset 901 is newly added to the local area network. Referring to fig. 10, fig. 10 shows a flowchart of synchronizing the mobile phone with the terminal information in the local area network, which may specifically include:
in step S1001, the mobile phone 901 generates a unique identifier. Specifically, the handset 901 integrates the ip address of itself connected to the television, the bluetooth address connected to the speaker 903, the address connected to the watch 904 through WiFi p2p, and the IMEI identifier of itself to calculate, so as to obtain a hash value of 4 bytes, and the hash value is used as a unique identifier for informing other terminals.
Step S1002, determine the connection mode of the local area network, i.e. determine the point-to-point connection mode or WiFi connection through the intermediary. When the mobile phone 901 determines that the network access mode is the point-to-point connection mode, as shown in fig. 9a, the mobile phone 901 determines that it is connected to the speaker 903 as bluetooth and connected to the watch 904 as WiFi p2p, step S1003 is executed, that is, a transmission channel is determined, and service information synchronization is initiated to the speaker 903 and the watch 904. After the synchronization is finished, the mobile phone 901 stores service information of itself, the speaker 903, and the watch 904.
When the mobile phone 901 determines that the network connection mode is not the point-to-point connection, step 1004 is executed to continue determining 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, it determines that the network connection mode is connected to the television 902 through WiFi, the mobile phone 901 executes step 1005, that is, the broadcast service is on line and waits to be synchronized. After receiving the service on-line notification of the mobile phone 901, the television 902 in the local area network may actively initiate a service information synchronization request to the mobile phone 901, where the service information request includes a unique identifier of the television and service information data of the mobile phone 901, and the mobile phone 901 responds to the service information synchronization request, sends service information of the mobile phone to the television 902, and stores the service information of the television 902 to the local. And completing the synchronization process of the two.
In addition, if the network mode of connection determined by the mobile phone is neither point-to-point connection nor ip connection, step S1006 is executed, and it is determined that abnormal connection occurs, and synchronization is completed.
The order of determination in steps S1002 and S1004 may be exchanged, and is not limited herein.
In scenario 2, when a new terminal is added to the local area network, the network device handset 901 receives the broadcast online service of the new terminal, and after a transmission channel is determined, service information synchronization is actively initiated to the new terminal, where the service information includes a unique identifier generated by the handset 901, and a specific generation method may be referred to in scenario 1, which is not described herein again. And after the new device responds to the service request, the service information synchronization of the two devices is realized.
Scenario 3, when a service information change occurs in a terminal within a local network, referring to fig. 11, fig. 11 shows a flowchart of the synchronization of a handset with service information of the terminal of 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, determining whether the service information of all terminals in the terminal list has been synchronized. When it is determined that the service information of all the terminals has been synchronized, step S1103 is executed, and the synchronization is ended. When it is determined that the service information of the terminal is not synchronized in the terminal list, synchronizing the service information of the changed part of the terminal is performed, which specifically includes:
in step S1104, the changed service information of the terminal is acquired.
Step S1105, determine the transmission channel with the terminal, and the judgment of the channel may first judge that the connection mode is confirming the transmission channel.
Step S1106 initiates service information synchronization, and completes information synchronization. After the changed service information is synchronized, the mobile phone terminal can continuously monitor the change of the service information of the terminal equipment in the local area network so as to synchronize the service information among the terminals in time.
It should be noted that, in the process of information synchronization, a large amount of repeated data exists, and in order to reduce the amount of synchronized data, each terminal may use a differential synchronization method to search step by step, and synchronize only the changed service information. The following description will be made by taking a change of service information of a wristwatch as an example.
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, a cellular phone 901 and a wristwatch 904 are included. The cellular phone 901 compares the service information before change of the wristwatch that it previously stored with the service information after change that it stored. The service information structure table is first compared as shown in fig. 12, and the table can refer to the table shown in table 2. The mobile phone 901 and the watch 904 communicate by using a preset protocol, during the communication, the mobile phone 901 first obtains the hash value Ox34d3 of the service information structure table of the watch 904, compares the Ox34d3 with the hash value Ox258c of the service information structure table before change of the watch 904, determines whether the two are the same, if the two are different, indicates that the information in the tables is changed, then sequentially determines whether the hash values of the service information lists of the two devices are the same, and after determining that the hash values of the service information lists are different as compared with Ox79eO and oxoe 1 shown in fig. 12, determines whether the hash values of the service contents in the lists are the same until different service contents are found, and updates the service contents to the service information corresponding to the watch 904 in the mobile phone 901.
It should be noted that, in the present application, the synchronization process of the service information of the other terminals is the same as that of the mobile phone, and specifically, the service information synchronization process of the mobile phone may be referred to, which is not described herein again.
In addition, as shown in fig. 13, fig. 13 shows a schematic structural diagram of a terminal device according to the present application. The terminal device includes:
a memory 1301 for storing instructions for execution by one or more processors of a device, an
A processor 1302, configured to execute 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 execute the communication method of the above-described embodiment.
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 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 (GMCH) (not shown) and an Input/Output Hub (IOH) (which may be on separate chips) (not shown), where the GMCH includes a Memory and a Graphics Controller and is coupled to the IOH.
The device 1200 may also include a coprocessor 1202 and a 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 coprocessor 1202 being directly coupled to the processor 1201 and to the controller hub 1203, with the controller hub 1203 and IOH being in a single chip. The Memory 1204 may be, for example, a Dynamic Random Access Memory (DRAM), a Phase Change Memory (PCM), or a combination of the two. In one embodiment, coprocessor 1202 is a special-Purpose processor, such as, for example, a high-throughput MIC processor (MIC), a network or communication processor, compression engine, graphics processor, General Purpose Graphics Processor (GPGPU), embedded processor, or the like. The optional nature of coprocessor 1202 is represented in FIG. 13 by 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, the 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 (Hard-Disk drives, hdd (s)), one or more Compact Discs (CD) drives, and/or one or more Digital Versatile Discs (DVD) drives.
In one embodiment, device 1200 may further include a Network Interface Controller (NIC) 1206. Network interface 1206 may include a transceiver to provide a radio interface for 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 unit in the above-described embodiments.
The device 1200 may further include an Input/Output (I/O) device 1205. I/O1205 may include: a user interface designed to enable a user to interact with the device 1200; the design of the peripheral component interface enables peripheral components to also interact with the device 1200; and/or sensors may be configured to determine environmental conditions and/or location information associated with device 1200.
It is noted that fig. 13 is merely exemplary. That is, although fig. 13 shows that the apparatus 1200 includes a plurality of devices, such as the processor 1201, the controller hub 1203, the memory 1204, etc., in practical applications, an apparatus using the methods of the present application may include only a part of the devices of the apparatus 1200, for example, only the processor 1201 and the NIC1206 may be included. The nature of the alternative device in fig. 13 is shown in dashed lines.
According to some embodiments of the present application, the memory 1204 serving as a computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the system 1200 executes the service information synchronization method according to the above embodiments, which may specifically refer to the method of the above embodiments, and will not be described herein again.
Embodiments of the mechanisms disclosed herein may be implemented in hardware, software, firmware, or a combination of these implementations. Embodiments of the application may be implemented as computer programs or program code executing on programmable systems comprising 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 (DSP), a microcontroller, an Application Specific Integrated Circuit (ASIC), or a microprocessor.
The program code may be implemented in a high level procedural or object oriented programming language to communicate with a processing system. The program code can also be implemented in assembly or machine language, if desired. Indeed, the mechanisms described in this application are not limited in scope to any particular programming language. In any 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 via a network or via 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 (CD-ROMs), magneto-optical disks, Read Only Memories (ROMs), Random Access Memories (RAMs), Erasable Programmable Read Only Memories (EPROMs), Electrically Erasable Programmable Read Only Memories (EEPROMs), magnetic or optical cards, flash Memory, or a tangible machine-readable Memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustical or other forms of propagated signals. 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 features of the structures or methods may be shown in a particular arrangement and/or order. However, it is to be understood that such specific arrangement and/or ordering may not be required. Rather, in some embodiments, the features may be arranged in a manner and/or order different from that shown in the figures. In addition, the inclusion of a structural or methodical feature in a particular figure is not meant to imply that such feature is 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 apparatuses in the present application, each unit/module is a logical unit/module, and physically, one logical unit/module may be one physical unit/module, or may be a part of one physical unit/module, and may also be implemented by a combination of multiple physical units/modules, where the physical implementation manner of the logical unit/module itself is not the most important, and the combination of the functions implemented by the logical unit/module is the key to solve the technical problem provided by the present application. Furthermore, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units/modules which are not so closely related to solve the technical problems presented in the present application, which does not indicate that no other units/modules exist in the above-mentioned device embodiments.
It is 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. Also, 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, the use of the verb "comprise a" to define an element does not exclude the presence of another, same element 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 of ordinary skill 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 (25)

1. A method for synchronizing service information of a terminal in a local area network, the method being used for a plurality of terminals in the same local area network, the method comprising:
the terminals are connected in different communication connection modes, and all the terminals in the local area network use a uniform 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 is respectively provided with a unique identifier conforming to a preset format, wherein the unique identifier conforming to the preset format is obtained by calculation at least based on all addresses of the terminals in communication connection with other terminals in the network;
each terminal in the plurality of terminals synchronizes service information stored in the terminal with at least one terminal directly connected with the terminal based on a unique identifier conforming to a preset format;
and the plurality of terminals finish synchronization so that each terminal in the plurality of terminals stores the service information of all terminals in the local area network.
2. The method of claim 1, wherein synchronizing the service information stored in the terminal with each of the plurality of terminals and at least one terminal directly connected thereto comprises:
each terminal determines a transmission channel of at least one terminal directly connected thereto, 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 channel with the new terminal and initiate service information synchronization with the new terminal,
and the plurality of terminals finish synchronization so that each terminal in the plurality of terminals stores the service information of the new terminal, and the new terminal stores the service information of each terminal.
4. The method of claim 1, wherein it is determined that service information of at least one terminal in the local network has changed,
the terminal except the terminal with the changed service information 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;
the terminals except the terminal with the changed service information synchronize the information content of the changed part to the stored service information list corresponding to the terminal with the changed service information.
5. The method according to claim 1, characterized in that the unique identification in the predetermined format is obtained at least based on a hash value calculated for all addresses of the terminals in the network to which the other terminals are communicatively connected.
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 comprises a service list feature value, a service list, a service feature value, and service information.
8. The method according to claim 6, wherein the action is used to implement a data exchange procedure between terminals in the network, and specifically includes a handshake action, a fetch action, and a send action between the terminals.
9. The method of claim 1, wherein the service information stored in the terminal is synchronized between the plurality of terminals.
10. The method of claim 1, wherein the plurality of different communication connections comprises: bluetooth, wifi, NFC, infrared, code division multiple access, 5G, GMS, and long term evolution communication technologies.
11. A method for synchronizing service information of a terminal in a local area network, the method being used 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 different communication connection modes, and the first terminal and the plurality of second terminals in the local area network use a unified preset protocol to carry out service information synchronization between the terminals;
the first terminal and at least one second terminal directly connected thereto synchronize service information stored in the second terminal,
and when the first terminal completes synchronization, the first terminal stores the service information of all terminals in the local area network.
12. The method of claim 11, wherein the synchronizing the service information stored in the second terminal by the first terminal and at least one second terminal directly connected thereto comprises:
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 that the first terminal is added with the storage of the service information of the new second terminal.
14. The method according to claim 11, wherein when the first terminal is joining the local area network for the first time, the first terminal determines that the connection of the second terminal connected thereto is an IP connection;
the first terminal broadcasts the service online to wait for a second terminal in the network to initiate a synchronous request to the first terminal, so that the first terminal stores the service information of all terminals in the local area network.
15. The method of claim 11, wherein it is determined that the service information of at least one second terminal in the local area network has 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 to a stored service information list corresponding to the second terminal with the changed service information.
16. A method according to any of claims 11-15, characterized in that according to said predetermined protocol said first terminal in said local area network has a unique identity complying with a predetermined format.
17. The method according to claim 16, wherein the unique identifier in the predetermined format is obtained at least based on a hash value calculated for all addresses of the first terminal in the network to which the second terminal is communicatively connected.
18. The method according to claim 16, wherein the basic format of the preset protocol comprises definitions of actions of the terminal and types of objects for which the actions are directed.
19. The method of claim 18, wherein the type of object for which the action is directed comprises a service list feature value, a service list, a service feature value, and service information.
20. The method according to claim 18, wherein the actions are used to implement a data exchange procedure between terminals in the network, and specifically include a handshake action, a fetch action, and a send action between the terminals.
21. The method according to claim 11, wherein the service information stored in the second terminal synchronized by the first terminal is service information of an application that the second terminal allows synchronization.
22. The method of claim 11, wherein the plurality of different communication connections comprises: bluetooth, wifi, NFC, infrared, code division multiple access, 5G, GMS, and long term evolution communication technologies.
23. A computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any one of claims 11-22.
24. 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 one of claims 11-22.
25. 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-22.
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 true CN114095998A (en) 2022-02-25
CN114095998B 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
陈海明; 崔莉: "面向服务的物联网软件体系结构设计与模型检测", 《计算机学报》 *

Also Published As

Publication number Publication date
CN114095998B (en) 2023-06-20

Similar Documents

Publication Publication Date Title
CN111656754B (en) Method for edge computing service and electronic device thereof
CN112787685B (en) Method, apparatus and system for supporting wireless communication
KR102208438B1 (en) Method for proximity service data and an electronic device thereof
CN110622123B (en) Display method and device
US11419182B2 (en) Electronic device supporting link sharing and method therefor
EP3934208A1 (en) Method for edge computing service and electronic device therefor
WO2022052731A1 (en) Method for transmitting data and electronic device
US20220116759A1 (en) Electronic device supporting proximity communication service and method for obtaining information of short-range communication device using the same
CN113647074A (en) Method for edge computing service and electronic device thereof
WO2022252796A1 (en) Online detection method based on heartbeat packet, and device
WO2016123217A1 (en) Methods, devices and systems for supporting wireless communication
US20220361095A1 (en) Short-range wireless communication method and apparatus
CN114095998B (en) Service information synchronization method for terminal in local area network and terminal
CN111818190B (en) Electronic device for supporting low latency Domain Name System (DNS) processing
CN112152850B (en) Internet of things equipment management method based on flash connection protocol and service terminal
US20220150092A1 (en) Method for sharing channel information in bluetooth network, and electronic device therefor
KR102238897B1 (en) Method for proximity service data and an electronic device thereof
CN114173317B (en) Method for transmitting data and electronic equipment
WO2023040705A1 (en) Device discovery method, device and system
CN115550391B (en) Equipment control method and electronic equipment
CN112689274B (en) Prompting method and device for short-distance wireless communication connection and massaging equipment
CN116346975A (en) Method for synchronizing call records, electronic equipment and readable storage medium
CN117319981A (en) Equipment discovery method, device and system
CN116980429A (en) Method and device for processing consensus of block chain, electronic equipment and storage medium
CN116866098A (en) Equipment login method, electronic equipment 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