CN109413120B - Communication method and device, electronic equipment and server - Google Patents

Communication method and device, electronic equipment and server Download PDF

Info

Publication number
CN109413120B
CN109413120B CN201710701928.6A CN201710701928A CN109413120B CN 109413120 B CN109413120 B CN 109413120B CN 201710701928 A CN201710701928 A CN 201710701928A CN 109413120 B CN109413120 B CN 109413120B
Authority
CN
China
Prior art keywords
electronic device
equipment
server
electronic
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710701928.6A
Other languages
Chinese (zh)
Other versions
CN109413120A (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.)
Bird Innovation Beijing Technology Co ltd
Original Assignee
Beijing Xiaoniao Tingting Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaoniao Tingting Technology Co Ltd filed Critical Beijing Xiaoniao Tingting Technology Co Ltd
Priority to CN201710701928.6A priority Critical patent/CN109413120B/en
Publication of CN109413120A publication Critical patent/CN109413120A/en
Application granted granted Critical
Publication of CN109413120B publication Critical patent/CN109413120B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Landscapes

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

Abstract

The invention discloses a communication method and device, electronic equipment and a server, wherein the method comprises the following steps: when first electronic equipment needs to send or request data to second electronic equipment, acquiring connection information used for direct connection between the first electronic equipment and the second electronic equipment, wherein the first electronic equipment is located in a first local area network, and the second electronic equipment is located in a second local area network; the first electronic equipment establishes a communication link with the second electronic equipment according to the connection information, and sends data to the second electronic equipment or receives data sent by the second electronic equipment based on the communication link.

Description

Communication method and device, electronic equipment and server
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a communication method and apparatus, an electronic device, and a server.
Background
With the rapid development of the internet, the application of the internet of things is more and more popular. In the Internet of things, a large number of electronic devices carry out information interaction; when the electronic devices perform information interaction, an internet-based communication mechanism is needed for intercommunication. However, in a large background of the Internet, Internet Protocol (IP) addresses of electronic devices are exhausted, so that it cannot be satisfied that each electronic device has a unique IP address on the Internet, which makes electronic devices in different local area networks unable to communicate without depending on a server, and if a large number of electronic devices transmit data at the same time, the pressure of the server is too high, resulting in a too low transmission efficiency.
Disclosure of Invention
In order to solve the technical problem, embodiments of the present invention provide a communication method and apparatus, an electronic device, and a server.
The communication method provided by the embodiment of the invention comprises the following steps:
when first electronic equipment needs to send or request data to second electronic equipment, acquiring connection information used for direct connection between the first electronic equipment and the second electronic equipment, wherein the first electronic equipment is located in a first local area network, and the second electronic equipment is located in a second local area network;
the first electronic equipment establishes a communication link with the second electronic equipment according to the connection information, and sends data to the second electronic equipment or receives data sent by the second electronic equipment based on the communication link.
In the embodiment of the present invention, the method further includes:
the first electronic device stores connection information between the first electronic device and a second electronic device.
In an embodiment of the present invention, the obtaining of connection information used for direct connection between the first electronic device and the second electronic device includes:
inquiring whether the first electronic equipment stores the connection information between the first electronic equipment and the second electronic equipment;
if the first electronic equipment stores the connection information between the first electronic equipment and the second electronic equipment, locally acquiring the connection information between the first electronic equipment and the second electronic equipment from the first electronic equipment;
if the first electronic equipment does not store the connection information between the first electronic equipment and the second electronic equipment, sending a connection establishment request message to a server; and receiving a connection establishment response message sent by the server, and extracting connection information between the first electronic equipment and the second electronic equipment from the connection establishment response message.
In an embodiment of the present invention, before obtaining connection information used for performing direct connection between the first electronic device and the second electronic device, the method further includes:
when first electronic equipment needs to request data, acquiring position information of the data from a server;
determining that data needs to be requested from the second electronic device if the location information indicates that the data is stored in the second electronic device.
In an embodiment of the present invention, after the first electronic device obtains data from the second electronic device, the method further includes:
and the first electronic equipment stores the data and sends the position information of the data in the first electronic equipment to the server.
In the embodiment of the present invention, the method further includes:
when the communication quality of a communication link between the first electronic device and the second electronic device is smaller than a preset threshold value, forwarding data to the second electronic device through a server or receiving the data forwarded by the second electronic device through the server;
when the communication quality of a communication link between the first electronic device and the second electronic device is greater than or equal to a preset threshold value, transmitting data to the second electronic device or receiving data transmitted by the second electronic device based on the communication link.
In the embodiment of the present invention, the first electronic device is an audio control device, and the second electronic device is an audio playing device;
and when the audio control equipment needs to send a control instruction to the audio playing equipment, forwarding the control instruction to the audio playing equipment through a server.
In the embodiment of the present invention, the first electronic device is an audio control device, and the second electronic device is an audio playing device; the method further comprises the following steps:
the audio control device sends awakening control information of the audio control device to the server, and the server judges whether to send an awakening instruction to the audio playing device or not according to the awakening control information.
In this embodiment of the present invention, the wake-up control information at least includes one of the following:
geographic location information of the audio control device;
signal strength information of the audio control device;
and the audio control equipment sets a wake-up strategy for the audio playing equipment.
In this embodiment of the present invention, the wake-up policy at least includes one of the following:
when the current moment reaches the awakening moment, sending an awakening instruction to the audio playing equipment;
and when receiving a wake-up instruction sent by the audio control equipment, sending the wake-up instruction to the audio playing equipment.
Another embodiment of the present invention provides a communication method, including:
the method comprises the steps that a server receives a connection establishment request message sent by first electronic equipment, wherein the connection establishment request message is used for requesting connection information between the first electronic equipment and second electronic equipment;
the server acquires the connection information between the first electronic device and the second electronic device, and sends the connection information between the first electronic device and the second electronic device to the first electronic device, so that the first electronic device establishes a communication link with the second electronic device according to the connection information.
In this embodiment of the present invention, after the server establishes connection information for the first electronic device and the second electronic device, the method further includes:
the server stores connection information between the first electronic device and the second electronic device.
In this embodiment of the present invention, the acquiring, by the server, connection information between the first electronic device and the second electronic device includes:
when receiving a connection establishment request message sent by first electronic equipment, a server judges whether the server stores connection information between the first electronic equipment and second electronic equipment;
if the server does not store the connection information between the first electronic device and the second electronic device, establishing connection information for the first electronic device and the second electronic device;
and if the server stores the connection information between the first electronic equipment and the second electronic equipment, locally acquiring the connection information between the first electronic equipment and the second electronic equipment from the server.
In the embodiment of the invention, the server stores the position information of the data stored by each electronic device;
when the server receives a data request message sent by first electronic equipment, inquiring the position information of the requested data;
and the server sends the position information of the requested data to the first electronic equipment.
In the embodiment of the present invention, the method further includes:
when the communication quality of a communication link between the first electronic device and the second electronic device is smaller than a preset threshold value, the server receives data sent by the first electronic device and forwards the data to the second electronic device.
In the embodiment of the present invention, the first electronic device is an audio control device, and the second electronic device is an audio playing device; the method further comprises the following steps:
and the server receives a control instruction sent by the audio control equipment and forwards the control instruction to the audio playing equipment.
In the embodiment of the present invention, the first electronic device is an audio control device, and the second electronic device is an audio playing device; the method further comprises the following steps:
the server receives awakening control information sent by the audio control equipment;
and the server judges whether to send a wake-up instruction to the audio playing equipment or not according to the wake-up control information.
In this embodiment of the present invention, the wake-up control information at least includes one of the following:
geographic location information of the audio control device;
signal strength information of the audio control device;
and the audio control equipment sets a wake-up strategy for the audio playing equipment.
In this embodiment of the present invention, the wake-up policy at least includes one of the following:
when the current moment reaches the awakening moment, sending an awakening instruction to the audio playing equipment;
and when receiving a wake-up instruction sent by the audio control equipment, sending the wake-up instruction to the audio playing equipment.
The communication device provided by the embodiment of the invention is applied to first electronic equipment, and the device comprises:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring connection information for direct connection between a first electronic device and a second electronic device when the first electronic device needs to send or request data to the second electronic device, the first electronic device is located in a first local area network, and the second electronic device is located in a second local area network;
the establishing unit is used for establishing a communication link with the second electronic equipment according to the connection information;
a first communication unit, configured to send data to the second electronic device or receive data sent by the second electronic device based on the communication link.
In the embodiment of the present invention, the apparatus further includes:
and the storage unit is used for storing the connection information between the first electronic equipment and the second electronic equipment.
In an embodiment of the present invention, the obtaining unit includes:
the inquiring subunit is used for inquiring whether the first electronic equipment stores the connection information between the first electronic equipment and the second electronic equipment;
the first obtaining subunit is configured to, if the first electronic device stores connection information between the first electronic device and a second electronic device, locally obtain, from the first electronic device, the connection information between the first electronic device and the second electronic device;
the second obtaining subunit is configured to send a connection establishment request message to a server if the first electronic device does not store connection information between the first electronic device and a second electronic device; and receiving a connection establishment response message sent by the server, and extracting connection information between the first electronic equipment and the second electronic equipment from the connection establishment response message.
In the embodiment of the present invention, the apparatus further includes:
the processing unit is used for acquiring the position information of the data from the server when the first electronic equipment needs to request the data; determining that data needs to be requested from the second electronic device if the location information indicates that the data is stored in the second electronic device.
In the embodiment of the present invention, the apparatus further includes:
the storage unit is used for storing the data after acquiring the data from the second electronic equipment;
and the second communication unit is used for sending the position information of the data in the first electronic equipment to the server.
In the embodiment of the present invention, the apparatus further includes:
the second communication unit is used for forwarding data to the second electronic equipment through a server or receiving the data forwarded by the second electronic equipment through the server when the communication quality of a communication link between the first electronic equipment and the second electronic equipment is smaller than a preset threshold value;
the first communication unit is specifically configured to: when the communication quality of a communication link between the first electronic device and the second electronic device is greater than or equal to a preset threshold value, transmitting data to the second electronic device or receiving data transmitted by the second electronic device based on the communication link.
In the embodiment of the present invention, the first electronic device is an audio control device, and the second electronic device is an audio playing device;
the second communication unit is specifically configured to: and when the audio control equipment needs to send a control instruction to the audio playing equipment, forwarding the control instruction to the audio playing equipment through a server.
In the embodiment of the present invention, the first electronic device is an audio control device, and the second electronic device is an audio playing device;
the second communication unit is further configured to send wakeup control information to the server, so that the server determines whether to send a wakeup instruction to the audio playing device according to the wakeup control information.
In this embodiment of the present invention, the wake-up control information at least includes one of the following:
geographic location information of the audio control device;
signal strength information of the audio control device;
and the audio control equipment sets a wake-up strategy for the audio playing equipment.
In this embodiment of the present invention, the wake-up policy at least includes one of the following:
when the current moment reaches the awakening moment, sending an awakening instruction to the audio playing equipment;
and when receiving a wake-up instruction sent by the audio control equipment, sending the wake-up instruction to the audio playing equipment.
The electronic equipment provided by the embodiment of the invention comprises the communication device.
Another embodiment of the present invention provides a communication apparatus applied to a server, the apparatus including:
the communication unit is used for receiving a connection establishment request message sent by first electronic equipment, wherein the connection establishment request message is used for requesting connection information between the first electronic equipment and second electronic equipment;
the acquisition unit is used for acquiring the connection information between the first electronic equipment and the second electronic equipment;
the communication unit is further configured to send connection information between the first electronic device and the second electronic device to the first electronic device, so that the first electronic device establishes a communication link with the second electronic device according to the connection information.
In the embodiment of the present invention, the apparatus further includes:
and the storage unit is used for storing the connection information between the first electronic equipment and the second electronic equipment after the connection information is established between the first electronic equipment and the second electronic equipment.
In an embodiment of the present invention, the obtaining unit includes:
the judging subunit is configured to judge whether the server stores connection information between the first electronic device and the second electronic device when receiving a connection establishment request message sent by the first electronic device;
the first obtaining subunit is configured to establish connection information for the first electronic device and the second electronic device if the server does not store the connection information between the first electronic device and the second electronic device;
a second obtaining subunit, configured to locally obtain, from the server, connection information between the first electronic device and the second electronic device if the server stores the connection information between the first electronic device and the second electronic device.
In the embodiment of the present invention, the apparatus further includes:
a storage unit for storing position information of data stored in each electronic device;
the device comprises an inquiry unit, a processing unit and a processing unit, wherein the inquiry unit is used for inquiring the position information of the requested data when receiving a data request message sent by first electronic equipment;
the communication unit is further configured to send location information of the requested data to the first electronic device.
In this embodiment of the present invention, the communication unit is further configured to: and when the communication quality of a communication link between the first electronic device and the second electronic device is smaller than a preset threshold value, receiving data sent by the first electronic device, and forwarding the data to the second electronic device.
In the embodiment of the present invention, the first electronic device is an audio control device, and the second electronic device is an audio playing device;
the communication unit is specifically configured to: and receiving a control instruction sent by the audio control equipment, and forwarding the control instruction to the audio playing equipment.
In the embodiment of the present invention, the first electronic device is an audio control device, and the second electronic device is an audio playing device;
the communication unit is specifically configured to: receiving awakening control information sent by the audio control equipment; and judging whether to send a wake-up instruction to the audio playing device or not according to the wake-up control information.
In this embodiment of the present invention, the wake-up control information at least includes one of the following:
geographic location information of the audio control device;
signal strength information of the audio control device;
and the audio control equipment sets a wake-up strategy for the audio playing equipment.
In this embodiment of the present invention, the wake-up policy at least includes one of the following:
when the current moment reaches the awakening moment, sending an awakening instruction to the audio playing equipment;
and when receiving a wake-up instruction sent by the audio control equipment, sending the wake-up instruction to the audio playing equipment.
The server provided by the embodiment of the invention comprises the communication device.
In the technical scheme of the embodiment of the invention, when first electronic equipment needs to send or request data to second electronic equipment, connection information for direct connection between the first electronic equipment and the second electronic equipment is acquired, wherein the first electronic equipment is located in a first local area network, and the second electronic equipment is located in a second local area network; the first electronic equipment establishes a communication link with the second electronic equipment according to the connection information, and sends data to the second electronic equipment or receives the data sent by the second electronic equipment based on the communication link. By adopting the technical scheme of the embodiment of the invention, the electronic equipment in different local area networks can carry out data interaction through the internet communication link, and the electronic equipment can carry out direct communication without depending on a server, so that the pressure of the server is relieved, and the transmission efficiency is improved.
Drawings
FIG. 1 is a topological structure diagram of the Internet;
fig. 2 is a first flowchart illustrating a communication method according to an embodiment of the present invention;
FIG. 3 is an architecture diagram of a server cluster according to an embodiment of the present invention;
fig. 4 is a diagram of a point-to-multipoint communication architecture in accordance with an embodiment of the present invention;
fig. 5 is a second flowchart illustrating a communication method according to an embodiment of the present invention;
FIG. 6 is an architecture diagram of scenario one of the present invention;
FIG. 7 is an architecture diagram of scenario two according to an embodiment of the present invention;
FIG. 8 is an architecture diagram of scenario three of the present invention;
FIG. 9 is an architecture diagram of a fourth scenario of an embodiment of the present invention;
FIG. 10 is a diagram of a cloud control architecture according to an embodiment of the present invention;
fig. 11 is a third flowchart illustrating a communication method according to an embodiment of the present invention;
fig. 12 is a first structural diagram of a communication device according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of a communication device according to an embodiment of the present invention.
Detailed Description
So that the manner in which the features and aspects of the embodiments of the present invention can be understood in detail, a more particular description of the embodiments of the invention, briefly summarized above, may be had by reference to the embodiments, some of which are illustrated in the appended drawings.
Fig. 1 is a topological structure diagram of the internet, and as shown in fig. 1, A, B, C is an electronic device, such as a desktop, a notebook, a mobile phone, a tablet computer, and the like. In the internet, a and B are in the same lan, and log on to the internet through S1 (implemented by a server). C is in another lan and logs on to the internet via S2 (implemented via a server). In practical applications, the A/B and the C cannot directly communicate with each other. If A needs to send data (such as a piece of audio file) to C, then A and C need to be connected to a Server (Server) through respective S1 and S2 by using Transmission Control Protocol (TCP)/User Datagram Protocol (UDP), then A transmits the data to the Server, and the Server forwards the data to C.
The technical scheme of the embodiment of the invention enables the electronic equipment in different local area networks to achieve point-to-point communication and point-to-multipoint communication through the Internet communication link. Communication application scenes are rich and various, and the communication application scenes can be but are not limited to text transmission, audio transmission, video transmission and other scenes between electronic equipment.
Fig. 2 is a first flowchart illustrating a communication method according to an embodiment of the present invention, as shown in fig. 2, the communication method includes the following steps:
step 201: when first electronic equipment needs to send or request data to second electronic equipment, connection information used for direct connection between the first electronic equipment and the second electronic equipment is acquired, wherein the first electronic equipment is located in a first local area network, and the second electronic equipment is located in a second local area network.
In the embodiment of the present invention, the interaction between the first electronic device and the second electronic device includes at least two cases: in the first case, the first electronic device sends data to the second electronic device; in the second case, the first electronic device requests data from the second electronic device.
When a first electronic device needs to send or request data to a second electronic device, connection information used for performing direct connection between the first electronic device and the second electronic device is acquired without data forwarding through a Server (Server) shown in fig. 1, where the manner of acquiring the connection information includes the following two manners:
the first mode is as follows: inquiring whether the first electronic equipment stores the connection information between the first electronic equipment and the second electronic equipment; and if the first electronic equipment stores the connection information between the first electronic equipment and the second electronic equipment, acquiring the connection information between the first electronic equipment and the second electronic equipment from the first electronic equipment locally.
The second mode is as follows: inquiring whether the first electronic equipment stores the connection information between the first electronic equipment and the second electronic equipment; if the first electronic equipment does not store the connection information between the first electronic equipment and the second electronic equipment, sending a connection establishment request message to a server; and receiving a connection establishment response message sent by the server, and extracting connection information between the first electronic equipment and the second electronic equipment from the connection establishment response message. After the connection information between the first electronic device and the second electronic device is acquired, the first electronic device stores the connection information between the first electronic device and the second electronic device, so that the first electronic device can directly acquire the connection information from the local when communicating with the second electronic device next time, the local acquisition speed is faster than that of the server, and the data transmission efficiency can be further improved.
In this embodiment of the present invention, connection information between electronic devices is generated by a server, where the server includes four modules, which are: the system comprises an identity authentication module, a data forwarding module, an equipment information module and a resource information module. These four modules may be disposed in a single server, or disposed in different servers, so as to form a server cluster, as shown in fig. 3, the four modules respectively correspond to: the system comprises an identity authentication server, a data forwarding server, an equipment information server and a resource information server.
Specifically, taking the example that the device a and the device B communicate, 1) the device a and the device B access the authentication server through the Internet to perform authentication. 2) And after the identity authentication is passed, the device A and the device B access the device information server to perform device information registration. 3) The device information server records device information of the device A and the device B, and if the device A needs to communicate with the device B, networking information between the device A and the device B is negotiated, namely connection information for direct connection.
In the embodiment of the invention, after the point-to-point connection between the first electronic device and the second electronic device is successfully established, the first electronic device, the second electronic device and the server all record the connection information between the first electronic device and the second electronic device. When the first electronic device is connected with the second electronic device next time, a communication link can be directly established according to the recorded connection information, and data interaction is carried out.
Step 202: the first electronic equipment establishes a communication link with the second electronic equipment according to the connection information, and sends data to the second electronic equipment or receives data sent by the second electronic equipment based on the communication link.
In the embodiment of the present invention, a scenario in which a first electronic device requests data from a second electronic device includes two situations:
in the first case: the first electronic device definitely knows that the second electronic device stores the desired data, and directly requests the second electronic device for the data, in this case, the first electronic device knows that the opposite terminal device is the second electronic device, and can acquire the desired data from the second electronic device after establishing the peer-to-peer communication link with the second electronic device.
In the second case: the first electronic equipment does not know where the desired data is stored, in this case, when the first electronic equipment needs to request the data, the first electronic equipment acquires the position information of the data from the server; determining that data needs to be requested from the second electronic device if the location information indicates that the data is stored in the second electronic device; after the peer-to-peer communication link is established with the second electronic device, the desired data can be obtained from the second electronic device. In addition, after the first electronic device acquires data from the second electronic device, the first electronic device stores the data and sends the position information of the data in the first electronic device to the server.
In the second case, the data cached by each terminal device has a mapping relationship on the resource information server. A, B, C, D has an mp3 resource on each device, and A, B, C, D have established point-to-point connections (i.e., direct connections) with each other, as shown in FIG. 4. When the device a applies for b.mp3 (mp 3 resource on the device B), the device a applies for the b.mp3 resource to the resource information server, the resource information server sends the device information of the device B to the device a, and the device a applies for the b.mp3 resource to the device B through the peer-to-peer connection. After the device a obtains the resource of b.mp3, the device a sends the resource information of b.mp3 and the device information of itself to the resource information server for storage, which is used for other devices to search for the resource. Here, the resource information and the device information have a correspondence relationship that represents the location information of each resource in the electronic device, for example, the correspondence relationship stored in the resource information server is as shown in table 1 below:
resource information Device information
Document 1 and document 5 Device information of A device
Document 7 Device information of B device
File 3, file 4 Device information of C device
Document
2 and document 6 Device information of D device
TABLE 1
According to the technical scheme of the embodiment of the invention, equipment in different local area networks is subjected to identity verification through the Internet, and point-to-point or point-to-multipoint communication can be performed only after the identity verification is successful; the method and the device realize that the device in the local area network can communicate with the devices in other local area networks through the Internet, solve the problem of high delay of cross-local area network data transmission in the traditional Internet network, and simultaneously reduce the cost of server resources and bandwidth.
Fig. 5 is a second flowchart illustrating a communication method according to an embodiment of the present invention, and as shown in fig. 5, the communication method includes the following steps:
step 501: when the communication quality of a communication link between first electronic equipment and second electronic equipment is smaller than a preset threshold value, forwarding data to the second electronic equipment through a server or receiving the data forwarded by the second electronic equipment through the server.
Step 502: when the communication quality of a communication link between the first electronic device and the second electronic device is greater than or equal to a preset threshold value, transmitting data to the second electronic device or receiving data transmitted by the second electronic device based on the communication link.
In the embodiment of the invention, the first electronic device and the second electronic device have two communication modes, one is a direct connection communication mode, and the other is a communication mode forwarded by the server. Detecting the communication quality of a communication link between a first electronic device and a second electronic device in real time, wherein the communication link is a direct communication link established by the method shown in fig. 2; when the communication quality of a communication link between first electronic equipment and second electronic equipment is smaller than a preset threshold value, forwarding communication data between the first electronic equipment and the second electronic equipment through a server; when the communication quality of a communication link between the first electronic device and the second electronic device is greater than or equal to a preset threshold value, transmitting communication data between the first electronic device and the second electronic device based on the direct connection communication link. Therefore, the communication quality between the two electronic devices can be guaranteed.
The technical scheme of the embodiment of the invention can be applied to the following scenes:
scene one: referring to fig. 6, real-time communication between devices is performed through server forwarding, which is used when a point-to-point connection is not established or when communication quality between two devices is poor. The data is forwarded through the server, so that the user's handset or Application (APP) can communicate with a remote device (e.g., a stereo). With reference to fig. 3, taking the communication between the device a and the device B as an example, 1) the device a and the device B access the authentication server through the Internet to perform authentication; 2) after the identity authentication is passed, the equipment A and the equipment B access the equipment information server to register equipment information; 3) the device A sends the data to a data forwarding server, and the data forwarding server forwards the data to the device B.
Scene two: referring to fig. 7, point-to-point communication is performed between devices, and this communication is separated from the data forwarding server, and a direct communication relationship is established between the devices, and the data is directly transmitted without the server forwarding the data.
Scene three: referring to fig. 8, in point-to-multipoint networking and communication, based on the point-to-point communication in fig. 7, after a point-to-point communication relationship is established between devices, the relationship is recorded, and a plurality of point-to-point relationships are recorded, so that the devices form a communication network and can transmit data to each other. Such application scenarios may be used in application scenarios of transport streaming media, for example: assuming that the a device caches streaming media data abc.mp3, the B device and the C device want to obtain the streaming media data abc.mp3, and the B device and the C device can directly obtain abc.mp3 from the a device without obtaining resources from the server. The purposes of reducing delay and saving server overhead are achieved.
In addition, the embodiment of the invention also provides a scenario four: referring to fig. 9, non-real-time data transmission between devices, voice messages or message notifications are all non-real-time data, such data are directly forwarded without a server, and the two end devices are not required to be connected to the server at the same time, and the server is not required to maintain a communication link between the devices. For example: the mobile phone sends the voice message to the server, the terminal device accesses the server at regular time, and the voice message is downloaded from the server.
The first scenario of the embodiment of the present invention may be applied to the following specific examples, where the first electronic device is an audio control device (e.g., a mobile phone APP), and the second electronic device is an audio playing device (e.g., a stereo); and when the audio control equipment needs to send a control instruction to the audio playing equipment, forwarding the control instruction to the audio playing equipment through a server.
Here, the audio playing device may receive external control, such as receiving a wake-up instruction from a cloud, and perform remote wake-up, thereby implementing remote start of the audio playing device. The cloud may be implemented by a server.
The first scenario of the embodiment of the present invention may also be applied to the following specific example, where the first electronic device is an audio control device, and the second electronic device is an audio playing device; and the audio control equipment sends the awakening control information to the server so as to judge whether to send an awakening instruction to the audio playing equipment or not according to the awakening control information by the server.
Here, the wake-up control information includes at least one of:
geographic location information of the audio control device;
signal strength information of the audio control device;
and the audio control equipment sets a wake-up strategy for the audio playing equipment.
Taking the geographical position information as an example, the audio control device sends the geographical position information of the audio control device to the server, so that whether a wake-up instruction is sent to the audio playing device is judged by the server according to the geographical position information of the audio control device. Here, the information push technology is used for sending personalized and customized information (such as geographical position information) to the cloud server, the cloud server judges whether the geographical position information meets the conditions or not, and when the geographical position information meets the conditions, the wake-up instruction is pushed to the intelligent sound equipment, so that remote wake-up of the intelligent sound equipment is achieved. Therefore, the use scene of the intelligent sound equipment is expanded, the intelligent sound equipment can not only pull data from the Internet, but also receive a control instruction of the cloud.
Taking the signal strength information as an example, the audio control device sends any signal to the server, where the signal has attribute information, that is, signal strength information, and after receiving the signal, the server can detect the signal strength information and determine whether to send a wake-up instruction to the audio playing device according to the signal strength information. For example: and when the signal intensity is greater than or equal to a preset threshold value, sending a wake-up instruction to the audio playing equipment.
In this embodiment of the present invention, the wake-up policy at least includes one of the following:
when the current moment reaches the awakening moment, sending an awakening instruction to the audio playing equipment;
and when receiving a wake-up instruction sent by the audio control equipment, sending the wake-up instruction to the audio playing equipment.
Based on this, the embodiment of the present invention provides a new sound using function and scene, specifically:
1) the loudspeaker is by default in a standby state, deep sleep, with low power consumption requirements, but can receive network notifications and events.
2) The awakening initiator carries out personalized awakening customization through the audio control equipment, and the personalized awakening customization mainly comprises the awakening triggering conditions: the time of waking up, the area of waking up, etc., and these information are stored in the cloud server.
3) The awakening initiator starts a positioning system in the audio control device, periodically reports own geographical position information to the cloud server (or manually sets the geographical position information to report the geographical position information to the cloud server), and when the cloud server judges that the geographical position information is in the awakening area, the cloud server finds the sound in the dormant state and sends an awakening instruction to the sound.
4) The sound device determines whether to be awakened according to the current setting. The setting mode can be that the audio control equipment sets the sound through the cloud, or the user directly sets the sound. The setting contents include, for example: a do not disturb period, push blacklist or whitelist, etc.
5) After receiving the push which accords with the setting, the sound equipment executes the awakening operation; many operations may then be performed, such as playing a list of music that the wake up initiator likes, etc.
Fig. 10 is a diagram of a cloud control architecture according to an embodiment of the present invention, where:
1) and the GPS is responsible for informing the current geographic position information of the mobile equipment, wherein the mobile equipment is the audio control equipment.
2) The mobile equipment receives the GPS information and sends the geographical position information of the mobile equipment to the user server at regular time.
3) The user server receives the registration information reported by the online user; the user's configuration is queried from the content server.
4) And the content server receives the configuration of the user and provides the query service of the user.
5) The push server is connected with the audio playing equipment to finish the pushing of the information to the audio playing equipment.
6) The audio playing device receives the pushed information; and finishing the instruction operation according to the instruction contained in the information. The audio playing device has the capability of receiving the push message, can process various preset instructions, completes the transition from the dormant state to the activated state and then completes more complex operation.
Through above long-range awakening scheme, can realize according to the geographical position information of cell-phone, awaken the stereo set at the certain limit of distance family automatically, the stereo set after awakening up can the automatic playing preset music, has embodied the theory of intelligent house.
Fig. 11 is a flowchart illustrating a third exemplary embodiment of a communication method, as shown in fig. 11, the communication method includes the following steps:
step 1101: the method comprises the steps that a server receives a connection establishment request message sent by first electronic equipment, wherein the connection establishment request message is used for requesting connection information between the first electronic equipment and second electronic equipment.
Step 1102: the server acquires the connection information between the first electronic device and the second electronic device, and sends the connection information between the first electronic device and the second electronic device to the first electronic device, so that the first electronic device establishes a communication link with the second electronic device according to the connection information.
In this embodiment of the present invention, after the server establishes connection information for the first electronic device and the second electronic device, the method further includes: the server stores connection information between the first electronic device and the second electronic device.
In this embodiment of the present invention, the acquiring, by the server, connection information between the first electronic device and the second electronic device includes:
when receiving a connection establishment request message sent by first electronic equipment, a server judges whether the server stores connection information between the first electronic equipment and second electronic equipment;
if the server does not store the connection information between the first electronic device and the second electronic device, establishing connection information for the first electronic device and the second electronic device;
and if the server stores the connection information between the first electronic equipment and the second electronic equipment, acquiring the connection information between the first electronic equipment and the second electronic equipment from the server locally.
In the embodiment of the invention, the server stores the position information of the data stored by each electronic device;
when the server receives a data request message sent by first electronic equipment, inquiring the position information of the requested data;
and the server sends the position information of the requested data to the first electronic equipment.
In the embodiment of the present invention, the method further includes:
when the communication quality of a communication link between the first electronic device and the second electronic device is smaller than a preset threshold value, the server receives data sent by the first electronic device and forwards the data to the second electronic device.
In the embodiment of the present invention, the first electronic device is an audio control device, and the second electronic device is an audio playing device; the method further comprises the following steps:
and the server receives a control instruction sent by the audio control equipment and forwards the control instruction to the audio playing equipment.
In the embodiment of the present invention, the first electronic device is an audio control device, and the second electronic device is an audio playing device; the method further comprises the following steps:
the server receives awakening control information sent by the audio control equipment;
and the server judges whether to send a wake-up instruction to the audio playing equipment or not according to the wake-up control information.
Here, the wake-up control information includes at least one of:
geographic location information of the audio control device;
signal strength information of the audio control device;
and the audio control equipment sets a wake-up strategy for the audio playing equipment.
In this embodiment of the present invention, the wake-up policy at least includes one of the following:
when the current moment reaches the awakening moment, sending an awakening instruction to the audio playing equipment;
and when receiving a wake-up instruction sent by the audio control equipment, sending the wake-up instruction to the audio playing equipment.
The scheme shown in fig. 11 is applied to the server side, and can be understood in conjunction with the scheme shown in fig. 2.
Fig. 12 is a schematic structural diagram of a first communication device according to an embodiment of the present invention, where the first communication device is applied to a first electronic device, and the first communication device includes:
an obtaining unit 1201, configured to obtain connection information for direct connection between a first electronic device and a second electronic device when the first electronic device needs to send or request data to the second electronic device, where the first electronic device is located in a first local area network and the second electronic device is located in a second local area network;
an establishing unit 1202, configured to establish a communication link with the second electronic device according to the connection information;
a first communication unit 1203 is configured to send data to the second electronic device or receive data sent by the second electronic device based on the communication link.
In the embodiment of the present invention, the apparatus further includes:
a storage unit 1204, configured to store connection information between the first electronic device and the second electronic device.
In this embodiment of the present invention, the obtaining unit 1201 includes:
the inquiring subunit is used for inquiring whether the first electronic equipment stores the connection information between the first electronic equipment and the second electronic equipment;
a first obtaining subunit, configured to locally obtain, from the first electronic device, connection information between the first electronic device and a second electronic device if the first electronic device stores the connection information between the first electronic device and the second electronic device;
the second obtaining subunit is configured to send a connection establishment request message to a server if the first electronic device does not store connection information between the first electronic device and a second electronic device; and receiving a connection establishment response message sent by the server, and extracting connection information between the first electronic equipment and the second electronic equipment from the connection establishment response message.
In the embodiment of the present invention, the apparatus further includes:
a processing unit 1205, configured to obtain, when the first electronic device needs to request data, location information of the data from the server; determining that data needs to be requested from the second electronic device if the location information indicates that the data is stored in the second electronic device.
In an embodiment of the present invention, the apparatus further includes:
a storage unit 1204, configured to obtain data from the second electronic device and store the data;
a second communication unit 1206, configured to send location information of the data in the first electronic device to the server.
In an embodiment of the present invention, the apparatus further includes:
a second communication unit 1206, configured to forward, by a server, data to the second electronic device or receive, by the server, data forwarded by the second electronic device when communication quality of a communication link between the first electronic device and the second electronic device is smaller than a preset threshold;
the first communication unit 1203 is specifically configured to: when the communication quality of a communication link between the first electronic device and the second electronic device is greater than or equal to a preset threshold value, transmitting data to the second electronic device or receiving data transmitted by the second electronic device based on the communication link.
In the embodiment of the present invention, the first electronic device is an audio control device, and the second electronic device is an audio playing device;
the second communication unit 1206 is specifically configured to: and when the audio control equipment needs to send a control instruction to the audio playing equipment, forwarding the control instruction to the audio playing equipment through a server.
In the embodiment of the present invention, the first electronic device is an audio control device, and the second electronic device is an audio playing device;
the second communication unit 1206 is further configured to send wakeup control information to the server, so that the server determines whether to send a wakeup instruction to the audio playing device according to the wakeup control information.
In this embodiment of the present invention, the wake-up control information at least includes one of the following:
geographic location information of the audio control device;
signal strength information of the audio control device;
and the audio control equipment sets a wake-up strategy for the audio playing equipment.
In an embodiment of the present invention, the apparatus further includes:
a setting unit 1207, configured to set a wake-up policy for the audio playback device, and send the set wake-up policy to the server, where the wake-up policy at least includes one of the following:
when the current moment reaches the awakening moment, sending an awakening instruction to the audio playing equipment;
and when receiving a wake-up instruction sent by the audio control equipment, sending the wake-up instruction to the audio playing equipment.
Those skilled in the art will understand that the implementation functions of each unit in the communication device shown in fig. 12 can be understood by referring to the related description of the aforementioned communication method.
An embodiment of the present invention further provides an electronic device, which includes the communication apparatus shown in fig. 12.
Fig. 13 is a schematic structural diagram of a communication device according to an embodiment of the present invention, where the communication device is applied to a server, and the device includes:
a communication unit 1301, configured to receive a connection establishment request message sent by a first electronic device, where the connection establishment request message is used to request connection information between the first electronic device and a second electronic device;
an obtaining unit 1302, configured to obtain connection information between the first electronic device and a second electronic device;
the communication unit 1301 is further configured to send connection information between the first electronic device and the second electronic device to the first electronic device, so that the first electronic device establishes a communication link with the second electronic device according to the connection information.
In the embodiment of the present invention, the apparatus further includes:
and the storage unit 1303 is configured to store the connection information between the first electronic device and the second electronic device after the connection information is established between the first electronic device and the second electronic device.
In this embodiment of the present invention, the obtaining unit 1302 includes:
the system comprises a judging subunit and a sending unit, wherein the judging subunit is used for judging whether the server stores the connection information between the first electronic equipment and the second electronic equipment when receiving a connection establishment request message sent by the first electronic equipment;
the first obtaining subunit is configured to establish connection information for the first electronic device and the second electronic device if the server does not store the connection information between the first electronic device and the second electronic device;
a second obtaining subunit, configured to locally obtain, from the server, connection information between the first electronic device and the second electronic device if the server stores the connection information between the first electronic device and the second electronic device.
In the embodiment of the present invention, the apparatus further includes:
a storage unit 1303 for storing location information of data stored in each electronic device;
an inquiring unit 1304, configured to, when receiving a data request message sent by a first electronic device, inquire location information of requested data;
the communication unit 1301 is further configured to send location information of the requested data to the first electronic device.
In this embodiment of the present invention, the communication unit 1301 is further configured to: and when the communication quality of a communication link between the first electronic device and the second electronic device is smaller than a preset threshold value, receiving data sent by the first electronic device, and forwarding the data to the second electronic device.
In the embodiment of the present invention, the first electronic device is an audio control device, and the second electronic device is an audio playing device;
the communication unit 1301 is specifically configured to: and receiving a control instruction sent by the audio control equipment, and forwarding the control instruction to the audio playing equipment.
In the embodiment of the present invention, the first electronic device is an audio control device, and the second electronic device is an audio playing device;
the communication unit 1301 is specifically configured to: receiving awakening control information sent by the audio control equipment; and judging whether to send a wake-up instruction to the audio playing device or not according to the wake-up control information.
In this embodiment of the present invention, the wake-up control information at least includes one of the following:
geographic location information of the audio control device;
signal strength information of the audio control device;
and the audio control equipment sets a wake-up strategy for the audio playing equipment.
In this embodiment of the present invention, the wake policy at least includes one of the following:
when the current moment reaches the awakening moment, sending an awakening instruction to the audio playing equipment;
and when receiving a wake-up instruction sent by the audio control equipment, sending the wake-up instruction to the audio playing equipment.
It will be understood by those skilled in the art that the implementation functions of each unit in the communication apparatus shown in fig. 13 can be understood by referring to the related description of the aforementioned communication method.
An embodiment of the present invention further provides a server, where the electronic device includes the communication apparatus shown in fig. 13.
The technical schemes described in the embodiments of the present invention can be combined arbitrarily without conflict.
In the embodiments provided in the present invention, it should be understood that the disclosed method and intelligent device may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one second processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit may be implemented in the form of hardware, or in the form of hardware plus a software functional unit.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention.

Claims (34)

1. A method of communication, the method comprising:
when first electronic equipment needs to send or request data to second electronic equipment, acquiring connection information used for direct connection between the first electronic equipment and the second electronic equipment, wherein the first electronic equipment is located in a first local area network, and the second electronic equipment is located in a second local area network;
the first electronic equipment establishes a communication link with the second electronic equipment according to the connection information, and transmits data to the second electronic equipment or receives data transmitted by the second electronic equipment based on the communication link;
the first electronic equipment acquires data from the second electronic equipment, stores the data and sends the position information of the data in the first electronic equipment to a server; the position information is used for other equipment to search resources from the server; wherein the content of the first and second substances,
when the communication quality of a communication link between the first electronic device and the second electronic device is smaller than a preset threshold value, forwarding data to the second electronic device through a server or receiving the data forwarded by the second electronic device through the server;
when the communication quality of a communication link between the first electronic device and the second electronic device is larger than or equal to a preset threshold value, sending data to the second electronic device or receiving the data sent by the second electronic device based on the communication link.
2. The communication method of claim 1, wherein the method further comprises:
the first electronic device stores connection information between the first electronic device and a second electronic device.
3. The communication method according to claim 2, wherein the obtaining of the connection information for performing direct connection between the first electronic device and the second electronic device comprises:
inquiring whether the first electronic equipment stores the connection information between the first electronic equipment and the second electronic equipment;
if the first electronic equipment stores the connection information between the first electronic equipment and the second electronic equipment, locally acquiring the connection information between the first electronic equipment and the second electronic equipment from the first electronic equipment;
if the first electronic equipment does not store the connection information between the first electronic equipment and the second electronic equipment, sending a connection establishment request message to a server; and receiving a connection establishment response message sent by the server, and extracting connection information between the first electronic equipment and the second electronic equipment from the connection establishment response message.
4. The communication method according to claim 1, wherein before obtaining the connection information used by the first electronic device and the second electronic device for direct connection, the method further comprises:
when first electronic equipment needs to request data, obtaining the position information of the data from a server;
determining that data needs to be requested from the second electronic device if the location information indicates that the data is stored in the second electronic device.
5. The communication method according to claim 1, wherein the first electronic device is an audio control device, and the second electronic device is an audio playback device;
and when the audio control equipment needs to send a control instruction to the audio playing equipment, forwarding the control instruction to the audio playing equipment through a server.
6. The communication method according to claim 1, wherein the first electronic device is an audio control device, and the second electronic device is an audio playback device; the method further comprises the following steps:
and the audio control equipment sends awakening control information to the server so as to judge whether to send an awakening instruction to the audio playing equipment or not through the server according to the awakening control information.
7. The communication method according to claim 6, wherein the wake-up control information comprises at least one of:
geographic location information of the audio control device;
signal strength information of the audio control device;
and the audio control equipment sets a wake-up strategy for the audio playing equipment.
8. The communication method according to claim 7, wherein the wake-up policy comprises at least one of:
when the current moment reaches the awakening moment, sending an awakening instruction to the audio playing equipment;
and when receiving a wake-up instruction sent by the audio control equipment, sending the wake-up instruction to the audio playing equipment.
9. A method of communication, the method comprising:
the method comprises the steps that a server receives a connection establishment request message sent by first electronic equipment, wherein the connection establishment request message is used for requesting connection information between the first electronic equipment and second electronic equipment;
the server acquires connection information between the first electronic device and the second electronic device, and sends the connection information between the first electronic device and the second electronic device to the first electronic device, so that the first electronic device establishes a communication link with the second electronic device according to the connection information; when the communication quality of the communication link is greater than or equal to a preset threshold value, the communication link is used for the first electronic device to send data to the second electronic device or receive data sent by the second electronic device;
the server receives position information sent by the first electronic device, wherein the position information is used for representing that the first electronic device acquires data from the second electronic device and then stores the position of the data; the position information is used for other equipment to search resources from the server; wherein the content of the first and second substances,
when the communication quality of a communication link between the first electronic device and the second electronic device is smaller than a preset threshold value, the server receives data sent by the first electronic device and forwards the data to the second electronic device.
10. The communication method according to claim 9, wherein after the server establishes connection information for the first electronic device and the second electronic device, the method further comprises:
the server stores connection information between the first electronic device and the second electronic device.
11. The communication method according to claim 10, wherein the server obtains the connection information between the first electronic device and the second electronic device, and comprises:
when receiving a connection establishment request message sent by first electronic equipment, a server judges whether the server stores connection information between the first electronic equipment and second electronic equipment;
if the server does not store the connection information between the first electronic device and the second electronic device, establishing connection information for the first electronic device and the second electronic device;
and if the server stores the connection information between the first electronic equipment and the second electronic equipment, locally acquiring the connection information between the first electronic equipment and the second electronic equipment from the server.
12. The communication method according to claim 9, wherein the server stores therein location information of data stored in each electronic device;
when the server receives a data request message sent by first electronic equipment, inquiring the position information of the requested data;
and the server sends the position information of the requested data to the first electronic equipment.
13. The communication method according to claim 9, wherein the first electronic device is an audio control device, and the second electronic device is an audio playback device; the method further comprises the following steps:
and the server receives a control instruction sent by the audio control equipment and forwards the control instruction to the audio playing equipment.
14. The communication method according to claim 9, wherein the first electronic device is an audio control device, and the second electronic device is an audio playback device; the method further comprises the following steps:
the server receives awakening control information sent by the audio control equipment;
and the server judges whether to send a wake-up instruction to the audio playing equipment or not according to the wake-up control information.
15. The communication method according to claim 14, wherein the wake-up control information comprises at least one of:
geographic location information of the audio control device;
signal strength information of the audio control device;
and the audio control equipment sets a wake-up strategy for the audio playing equipment.
16. The communication method according to claim 15, wherein the wake-up policy comprises at least one of:
when the current moment reaches the awakening moment, sending an awakening instruction to the audio playing equipment;
and when receiving a wake-up instruction sent by the audio control equipment, sending the wake-up instruction to the audio playing equipment.
17. A communication apparatus, applied to a first electronic device, the apparatus comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring connection information for direct connection between a first electronic device and a second electronic device when the first electronic device needs to send or request data to the second electronic device, the first electronic device is located in a first local area network, and the second electronic device is located in a second local area network;
the establishing unit is used for establishing a communication link with the second electronic equipment according to the connection information;
a first communication unit, configured to transmit data to the second electronic device or receive data transmitted by the second electronic device based on the communication link;
the storage unit is used for storing the data after the data is acquired from the second electronic equipment;
the second communication unit is used for sending the position information of the data in the first electronic equipment to a server; the position information is used for other equipment to search resources from the server; wherein the content of the first and second substances,
the device further comprises:
the second communication unit is used for forwarding data to the second electronic equipment through a server or receiving the data forwarded by the second electronic equipment through the server when the communication quality of a communication link between the first electronic equipment and the second electronic equipment is smaller than a preset threshold value;
the first communication unit is specifically configured to: when the communication quality of a communication link between the first electronic device and the second electronic device is greater than or equal to a preset threshold value, transmitting data to the second electronic device or receiving data transmitted by the second electronic device based on the communication link.
18. The apparatus according to claim 17, wherein the storage unit is configured to store connection information between the first electronic device and a second electronic device.
19. The apparatus according to claim 18, wherein said obtaining unit comprises:
the inquiring subunit is used for inquiring whether the first electronic equipment stores the connection information between the first electronic equipment and the second electronic equipment;
the first obtaining subunit is configured to, if the first electronic device stores connection information between the first electronic device and a second electronic device, locally obtain, from the first electronic device, the connection information between the first electronic device and the second electronic device;
the second obtaining subunit is configured to send a connection establishment request message to a server if the first electronic device does not store connection information between the first electronic device and a second electronic device; and receiving a connection establishment response message sent by the server, and extracting connection information between the first electronic equipment and the second electronic equipment from the connection establishment response message.
20. The communications apparatus of claim 17, the apparatus further comprising:
the processing unit is used for acquiring the position information of the data from the server when the first electronic equipment needs to request the data; determining that data needs to be requested from the second electronic device if the location information indicates that the data is stored in the second electronic device.
21. The apparatus according to claim 17, wherein the first electronic device is an audio control device, and the second electronic device is an audio playing device;
the second communication unit is specifically configured to: and when the audio control equipment needs to send a control instruction to the audio playing equipment, forwarding the control instruction to the audio playing equipment through a server.
22. The apparatus according to claim 17, wherein the first electronic device is an audio control device, and the second electronic device is an audio playing device;
the second communication unit is further configured to send wakeup control information to the server, so that the server determines whether to send a wakeup instruction to the audio playing device according to the wakeup control information.
23. The communications apparatus of claim 22, wherein the wake-up control information comprises at least one of:
geographic location information of the audio control device;
signal strength information of the audio control device;
and the audio control equipment sets a wake-up strategy for the audio playing equipment.
24. The communications apparatus of claim 23, wherein the wake policy comprises at least one of:
when the current moment reaches the awakening moment, sending an awakening instruction to the audio playing equipment;
and when receiving a wake-up instruction sent by the audio control equipment, sending the wake-up instruction to the audio playing equipment.
25. An electronic device, characterized in that the electronic device comprises a communication apparatus according to any of claims 17-24.
26. A communication apparatus, applied to a server, the apparatus comprising:
the communication unit is used for receiving a connection establishment request message sent by first electronic equipment, wherein the connection establishment request message is used for requesting connection information between the first electronic equipment and second electronic equipment;
the acquisition unit is used for acquiring connection information between the first electronic equipment and the second electronic equipment;
the communication unit is further configured to send connection information between the first electronic device and the second electronic device to the first electronic device, so that the first electronic device establishes a communication link with the second electronic device according to the connection information; when the communication quality of the communication link is greater than or equal to a preset threshold value, the communication link is used for the first electronic device to send data to the second electronic device or receive data sent by the second electronic device;
the communication unit is configured to receive location information sent by the first electronic device, where the location information is used to represent a location where the first electronic device stores data after acquiring the data from the second electronic device; the position information is used for other equipment to search resources from the server; wherein the content of the first and second substances,
the communication unit is further configured to: and when the communication quality of a communication link between the first electronic device and the second electronic device is smaller than a preset threshold value, receiving data sent by the first electronic device, and forwarding the data to the second electronic device.
27. The communications apparatus of claim 26, the apparatus further comprising:
and the storage unit is used for storing the connection information between the first electronic equipment and the second electronic equipment after the connection information is established between the first electronic equipment and the second electronic equipment.
28. The apparatus according to claim 27, wherein said obtaining unit comprises:
the judging subunit is configured to judge whether the server stores connection information between the first electronic device and the second electronic device when receiving a connection establishment request message sent by the first electronic device;
the first obtaining subunit is configured to establish connection information for the first electronic device and the second electronic device if the server does not store the connection information between the first electronic device and the second electronic device;
a second obtaining subunit, configured to locally obtain, from the server, connection information between the first electronic device and the second electronic device if the server stores the connection information between the first electronic device and the second electronic device.
29. The communications apparatus of claim 26, the apparatus further comprising:
a storage unit for storing position information of data stored in each electronic device;
the device comprises an inquiry unit, a first electronic device and a second electronic device, wherein the inquiry unit is used for inquiring the position information of the requested data when receiving a data request message sent by the first electronic device;
the communication unit is further configured to send location information of the requested data to the first electronic device.
30. The apparatus according to claim 26, wherein the first electronic device is an audio control device, and the second electronic device is an audio playing device;
the communication unit is specifically configured to: and receiving a control instruction sent by the audio control equipment, and forwarding the control instruction to the audio playing equipment.
31. The apparatus according to claim 26, wherein the first electronic device is an audio control device, and the second electronic device is an audio playing device;
the communication unit is specifically configured to: receiving awakening control information sent by the audio control equipment; and judging whether to send a wake-up instruction to the audio playing device or not according to the wake-up control information.
32. The communications apparatus of claim 31, wherein the wake-up control information comprises at least one of:
geographic location information of the audio control device;
signal strength information of the audio control device;
and the audio control equipment sets a wake-up strategy for the audio playing equipment.
33. The communications apparatus of claim 32, wherein the wake policy comprises at least one of:
when the current moment reaches the awakening moment, sending an awakening instruction to the audio playing equipment;
and when receiving a wake-up instruction sent by the audio control equipment, sending the wake-up instruction to the audio playing equipment.
34. A server, characterized in that the server comprises a communication device according to any of claims 26-33.
CN201710701928.6A 2017-08-16 2017-08-16 Communication method and device, electronic equipment and server Active CN109413120B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710701928.6A CN109413120B (en) 2017-08-16 2017-08-16 Communication method and device, electronic equipment and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710701928.6A CN109413120B (en) 2017-08-16 2017-08-16 Communication method and device, electronic equipment and server

Publications (2)

Publication Number Publication Date
CN109413120A CN109413120A (en) 2019-03-01
CN109413120B true CN109413120B (en) 2022-06-17

Family

ID=65454534

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710701928.6A Active CN109413120B (en) 2017-08-16 2017-08-16 Communication method and device, electronic equipment and server

Country Status (1)

Country Link
CN (1) CN109413120B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118118255A (en) * 2020-05-27 2024-05-31 Oppo广东移动通信有限公司 Communication method, device and equipment based on Internet of things
CN112260932A (en) * 2020-09-28 2021-01-22 朱凯迪 Instant messaging method for industrial internet equipment
CN114158068B (en) * 2021-11-26 2023-06-16 中国联合网络通信集团有限公司 Method and device for data transmission in private network

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10244500B2 (en) * 2011-03-30 2019-03-26 Wei Lu Open wireless architecture (OWA) mobile cloud infrastructure and method
CN102413182A (en) * 2011-11-17 2012-04-11 南京天溯自动化控制系统有限公司 Intelligent home device remote monitoring device and method
CN102624912A (en) * 2012-03-20 2012-08-01 无锡德思普科技有限公司 Method for point-to-point information transmission of intelligent terminals
CN103458057B (en) * 2013-09-30 2017-02-22 小米科技有限责任公司 Resource acquiring method, device and server
CN103795819B (en) * 2014-01-27 2017-02-01 宁波键一生物科技有限公司 Inter-terminal data transmission method based on NAT in P2P application
CN104852807A (en) * 2014-11-03 2015-08-19 淮安信息职业技术学院 Embedded remote power supply measurement and control system based on P2P
CN104954484A (en) * 2015-06-30 2015-09-30 黑色水晶(北京)科技有限公司 IoT (Internet of Things) connection method and device
CN105245596B (en) * 2015-09-30 2019-02-05 深圳市先河系统技术有限公司 A kind of long-range control method and server
CN106412001A (en) * 2016-07-26 2017-02-15 北京小米移动软件有限公司 Method and device for transmitting file
CN106358064A (en) * 2016-10-31 2017-01-25 北京小米移动软件有限公司 Method and equipment for controlling television

Also Published As

Publication number Publication date
CN109413120A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
CN106302616B (en) Network awakening method, remote server and network switching equipment
US8644211B2 (en) Energy-efficient content retrieval in content-centric networks
KR101991145B1 (en) Low energy beacon encoding
JP2022503686A (en) Communication connection methods, devices, computer equipment, and computer programs
US20110102157A1 (en) Wake-Up For Wireless Devices Based On Requested Data
JP5891559B2 (en) Instant messaging method, terminal, server and system
KR20180050389A (en) A smart co-processor for optimizing service discovery power consumption in wireless service platforms
US8352931B2 (en) Data push service method and system using data pull model
US9065788B2 (en) Method, device and system for voice communication
US9298735B2 (en) Method and apparatus for filtering peer-to-peer network searches for limited capability devices
WO2016165584A1 (en) Communication method and device between terminal
CN101895842B (en) Method, device and system for awakening offline mobile terminal
KR102472916B1 (en) System and method for providing conversational contents
US20200380984A1 (en) Synchronization of remote context data
CN109413120B (en) Communication method and device, electronic equipment and server
CN108206742B (en) Message sending method, device, server and system
US11095738B2 (en) Push notifications for multiple user devices
CN113766477A (en) Device connection method, device, electronic device and computer readable medium
EP2974159B1 (en) Method, device and system for voice communication
WO2018129876A1 (en) Method for transmitting multimedia data, server and terminal
TW201336336A (en) Method and system for connecting mobile device to server
WO2018196270A1 (en) Storage router and router-based data storage and transfer method
CN112733051A (en) Websocket-based information push management system and method
CN106792804B (en) Multicast WIFI frame detection mechanism capable of monitoring and responding as required
WO2018099284A1 (en) Communication method and apparatus

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
TR01 Transfer of patent right

Effective date of registration: 20220928

Address after: Room R2172, 2nd Floor, Building 3, No. 18, Keyuan Road, Economic Development Zone, Daxing District, Beijing 100176

Patentee after: Bird innovation (Beijing) Technology Co.,Ltd.

Address before: 100191 room 1801, block D, Zhizhen building, 7 Zhichun Road, Haidian District, Beijing

Patentee before: BEIJING XIAONIAO TINGTING TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right