Summary of the invention
Based on this, it is necessary in view of the above-mentioned problems, providing a kind of more facility communication systems and data communications method.
A kind of more facility communication systems, comprising:
Sub- communication set, the sub- communication set includes a gateway and multiple terminal devices, between the multiple terminal device
It is communicated to connect by wireless mesh network, and the multiple terminal device is connect with the gateway communication;
More facility communication systems include multiple sub- communication sets, the gateway in multiple sub- communication sets it
Between communicate to connect, between the terminal device in the different sub- communication sets by the gateway realize communication.
The multiple terminal device realizes wireless mesh network connection by bluetooth in one of the embodiments,.
The gateway in multiple sub- communication sets is connected by local area network communication in one of the embodiments,.
More facility communication systems in one of the embodiments, further include:
Server is connect with each gateway communication, by described between the gateway in multiple sub- communication sets
Server is communicatively coupled.
The terminal device includes Intelligent cup and control device in one of the embodiments, the Intelligent cup and described
Control device is communicated to connect by wireless mesh network, and the control device is for controlling the Intelligent cup.
More facility communication systems provided by the embodiments of the present application include multiple sub- communication sets.Each son is logical
Letter group includes a gateway and multiple terminal devices.Communication link between the gateway in multiple sub- communication sets
It connects.More facility communication systems provided in this embodiment are by being divided into multiple sub- communications for multiple terminal devices
Group is connected between multiple sub- communication sets by gateway communication, to realize the communication connection between the terminal device.Institute
Stating more facility communication systems reduces the quantity of terminal device described in each wireless mesh network, so as to effectively solve because
Number of devices excessively causes the problem of message blocking, improves communication efficiency and communication speed.Meanwhile it is provided by the embodiments of the present application
More facility communication systems are capable of providing the communication between the terminal device of enormous amount, therefore can satisfy various large-scale living
Dynamic application scenarios, it is practical.
A kind of data communications method is applied to more facility communication systems as described above, which comprises
Send the solicited message for sending terminal device and sending that gateway receives the sub- communication set where it, the solicited message
Including message data and target terminal identity information, wherein the target terminal identity information characterization finally receives the message
The unique identity of the terminal device of data;
If the target terminal identity information is not in this group of equipment identities list, the transmission gateway obtain with it is described
The identity of the corresponding intended gateway of target terminal identity information, wherein include described in described group equipment identities list
The identity information of all terminal devices in sub- communication set where transmission gateway;
For the gateway that sends according to the identity of the intended gateway, Xiang Suoshu intended gateway sends the message data
With the target terminal identity information;
The message data is sent to the corresponding terminal device of the target terminal identity information by the intended gateway.
The identity that gateway is sent according to the intended gateway in one of the embodiments, Xiang Suoshu target
Gateway sends the message data and the target terminal identity information, comprising:
The transmission gateway sends notification information to all gateway multicasts, and the notification information includes the intended gateway
Identity, the message data and the target terminal identity information.
In one of the embodiments, the method also includes:
The intended gateway sends return information to the transmission gateway.
The identity that gateway is sent according to the intended gateway in one of the embodiments, Xiang Suoshu target
Gateway sends the message data and the target terminal identity information, comprising:
The gateway that sends sends institute to the intended gateway by server according to the identity of the intended gateway
State message data and the target terminal identity information.
In one of the embodiments, the method also includes:
If the target terminal identity information is in described group equipment identities list, the transmission gateway disappears described
Breath data are sent to terminal device corresponding with the target terminal identity information.
In the present embodiment, asking for the transmission terminal device transmission of the sub- communication set where it is received by the transmission gateway
Information is sought, the solicited message includes message data and target terminal identity information.When the target terminal identity information is not located
When in this group of equipment identities list, the gateway that sends obtains intended gateway corresponding with the target terminal identity information
Identity, and the message data and the target terminal identity information are sent to the intended gateway;The target network
It closes and the message data is sent to the corresponding terminal device of the target terminal identity information, to realize the transmission terminal
With the communication between the target terminal.The method provided in this embodiment can be realized institute in the different sub- communication sets
The communication between terminal device is stated, also the communication between the terminal device in as different wireless mesh networks.It compares
The method that the terminal equipment in communication is realized in a wireless mesh network, the method communication process provided in this embodiment
In, message is transmitted by gateway, it is not easy to and block, effectively increases communication efficiency and communication speed, it is a large amount of so as to improve
Communication requirement between the terminal device.
Specific embodiment
In order to which the objects, technical solutions and advantages of the application are more clearly understood, pass through following embodiments and combine attached
Figure, the further description of technical solutions in the embodiments of the present application.It should be appreciated that specific embodiment described herein
Only to explain the application, it is not used to limit application.
Referring to Figure 1, the application one embodiment provides a kind of more facility communication systems 10.More facility communication systems
10 for realizing the communication between multiple terminal devices.More facility communication systems 10 include multiple sub- communication sets 100.Each
The sub- communication set 100 includes a network management 110 and multiple terminal devices 120.Pass through nothing between the multiple terminal device 120
Line mesh network (calling wireless mesh network in the following text) communication connection.The multiple terminal device 120 with 110 communication link of gateway
It connects.It is communicated to connect between each gateway 110 in multiple sub- communication sets 100.In the different sub- communication sets 100
Communication is realized by each gateway 110 between the terminal device 120.
The terminal device 120 can for smart phone, personal computer, portable wearable device or other need to carry out
The equipment of communication.The terminal device 120 may include a seed type, also may include multiple types.In one embodiment,
The terminal device 120 includes Intelligent cup and control device.The Intelligent cup and the control device pass through wireless mesh network
Communication connection.The control device is for controlling the Intelligent cup.The Intelligent cup may include cup holder and cup body.The cup body
It is set to the cup holder.The cup holder can offer accommodating chamber.The accommodating chamber is for accommodating circuit board, electroluminescent lamp and battery
Equal components.The control device includes processor.The control device can be sent out by wireless mesh network to the Intelligent cup
Control instruction is sent, to control the work of the Intelligent cup or the state change of the control Intelligent cup, for example, the control device
Control the display state of the indicator light of the Intelligent cup.
Each sub- communication set 100 includes a gateway 110.The gateway 110 is for realizing the sub- communication
The connection and communication of the terminal device 120 and other networks in group 100.Meanwhile in the different sub- communication sets 100
Communication that can be direct or indirect between the gateway 110, so as to realize the terminal in different sub- communication sets 100
Communication between equipment 120.That is, the terminal device 120 in each sub- communication set 100 is in one wirelessly
In mesh network.Each terminal device 120 realizes across wireless mesh network communication by the communication between the gateway 110.
Communication mode, communication protocol between the gateway 110 etc. are without limitation.
To more facility communication systems by taking the terminal device 120 includes the Intelligent cup and the control device as an example
It is illustrated: assuming that more facility communication systems 10 include 10 sub- communication sets 100.Each sub- communication set 100
Including 1 gateway, 110,50 Intelligent cups and 5 control devices.50 Intelligent cups and 5 controls
Device processed is communicated to connect by wireless mesh network, and is communicated to connect with the gateway 110.In 100 sub- communication sets 100
100 gateways 100 between communicate to connect.Assuming that the number in the 1st sub- communication set 100 is control described in A1-5
The Intelligent cup that number of the device into the 5th sub- communication set 100 is B5-8 sends message.Number is the described of A1-5
The gateway 110 that the number that control device is sent a message in the 1st sub- communication set 100 is C1, number is C1's
The gateway 110 sends a message to the gateway 110 that number is C5 in the 5th sub- communication set 100.Number is C5's
The gateway 110 further sends a message to the Intelligent cup that number is B5-8.
In the present embodiment, more facility communication systems 10 include multiple sub- communication sets 100.Each sub- communication
Group 100 includes a gateway 110 and multiple terminal devices 120.The gateway in multiple sub- communication sets 100
It is communicated to connect between 110.More facility communication systems 10 provided in this embodiment are by dividing multiple terminal devices 120
For multiple sub- communication sets 100, connected between multiple sub- communication sets 100 by gateway communication, to realize the end
Communication connection between end equipment 120.More facility communication systems 10 reduce terminal described in each wireless mesh network
The quantity of equipment 120, so as to effectively solve the problems, such as excessively to cause because of number of devices message blocking, improve communication efficiency and
Communication speed.Meanwhile more facility communication systems 10 provided in this embodiment be capable of providing enormous amount terminal device it
Between communication, therefore can satisfy the application scenarios of various large-scale activities, it is practical.
The quantity of terminal device 120 described in each sub- communication set 100 can be set according to demand.Implement at one
In example, the quantity of the terminal device 120 is less than 100.The quantity of the terminal device 120 is less than 100, can guarantee every
The communication quality of the wireless network connection of a sub- communication set 100, prevents message blocking, further increases communication efficiency.
In one embodiment, wireless mesh network connection is realized by bluetooth between the multiple terminal device 120.?
That is the multiple terminal device 120 in each sub- communication set 100 is in a bluetooth mesh network, i.e. bluetooth
Mesh network.Bluetooth mesh network implementations is simple, versatility and practical.
Fig. 2 is referred to, in one embodiment, more facility communication systems 10 further include server 200.The service
Device 200 is communicated to connect with the gateway 110 in each sub- communication set 100.The server 200 can be used for the end
The interaction of end equipment 120, can be used for being managed each gateway 110.
In one embodiment, pass through the server between the gateway 110 in the multiple sub- communication set 100
200 are communicatively coupled.That is, the communication message between multiple gateways 110 is via 200 transfer of server.
Gateway C1 is that gateway C1 is sent to the server 200 to the process that gateway C5 sends message, and the server 200 retransmits
Give gateway C5.
In one embodiment, the gateway 110 in multiple sub- communication sets 100 is connected by local area network communication.
That is, the gateway 110 in each sub- communication set 100 is established local area network and is communicated with each other.Each gateway 110
Between form direct communication, so as to more efficient quick response, improve communication efficiency, and the clothes can be greatly reduced
The pressure of business device 200.
Pass through User Datagram Protocol (User Datagram Protoco, call UDP in the following text) between multiple gateways 110.
Each gateway 110 can have the server 200 to be assigned unique identity number (calling ID in the following text).Each son is logical
A preset multicast address is added in the gateway 110 in letter group 100, such as: 225.4.5.6:5775.It is needing to communicate
When, the corresponding gateway 110 of the terminal device 120 for sending message sends a message to it by way of UDP multicast
His gateway 120.Table 1 is referred to, table 1 is by communicating the protocol part contents interception followed by UDP between gateway.Institute
State whether the communications protocol content communicated between gateway 110 including but not limited to needs reply, sender's gateway ID, recipient's net
Close ID, data content.Sender ID refers to the ID for sending the corresponding gateway 110 of the terminal device 120 of message.It receives
Square gateway ID refers to the ID for receiving the corresponding network management 110 of the device end 120 of message.Data content refers to that transmission disappears
The particular content of breath, or according to default rule or agreement, characterization sends the corresponding informance of message particular content.For example, data
Content can be direct are as follows: control Intelligent cup sends out a warning 2S.Data content may be according to preset rules or agreement: control information
3.Wherein " control information 3 " represents " control Intelligent cup send out a warning 2S ".Other described gateways 110 in multicast receive message.
The consistent gateway 110 of ID and recipient's gateway ID is replied message to the gateway 110 for sending message, so as to form
Message closed loop.It in the present embodiment, is communicated between multiple gateways by User Datagram Protocol, efficiency of transmission is high.
Whether need to reply |
Sender's gateway ID |
Recipient's gateway ID |
Data content |
Table 1
The application one embodiment provides a kind of data communications method.The method can be applied to as shown in Figure 1 more
Facility communication system 10.The method is for realizing the communication between the terminal device 120, including the different sub- communication
The terminal device 120 in the communication or the identical sub- communication set 100 between the terminal device 120 in group 100
Between communication.
Below with the executing subject of method for the gateway 110, in conjunction with the embodiments, the method is carried out furtherly
It is bright.
Fig. 3 is referred to, in one embodiment, the data communications method includes:
S10 sends the solicited message for sending terminal device and sending that gateway receives the sub- communication set where it, the request
Information includes message data and target terminal identity information, wherein described in the final reception of target terminal identity information characterization
The unique identity of the terminal device of message data.
The terminal device that sends refers to the terminal device for needing that message data is sent to other equipment.Send message
Object, namely finally receive the terminal device of the message data and be defined as target terminal equipment.The transmission gateway
Refer to the corresponding gateway of the transmission terminal, that is, the gateway in the sub- communication set where the transmission terminal.When the transmission
It is described to send terminal to the transmission gateway transmission request letter when terminal device needs to send message to the target terminal equipment
Breath.The transmission gateway receives the request message.The triggering for sending terminal transmission message can be the finger for receiving user
It enables or is triggered according to preset trigger condition.For example, it is assumed that the terminal device is that the Intelligent cup and the control fill
It sets.The Intelligent cup includes identity information concentrator marker, and the control device includes identity information identifier.The Intelligent cup and institute
State control device close to when, the identity information identifier can identify the information of the identity information concentrator marker, and when described
When identity information identifier recognizes the identity information concentrator marker, the control device sends control letter to the Intelligent cup
Breath, controls the Intelligent cup bright light.Based on this scene, when the control device recognizes the Intelligent cup, i.e., described in triggering
Control device sends solicited message to the corresponding transmission gateway.
The solicited message may include the message data and the target terminal identity information.The message data is
Refer to that the transmission terminal device is sent to the particular content of the message of the target terminal equipment, or according to default rule or association
View, characterization send the corresponding informance of message particular content.The target terminal identity information characterizes the target terminal equipment
Unique identity.In example as above, the target terminal identity information can be the MAC code of the Intelligent cup.
S20, if the target terminal identity information is not in this group of equipment identities list, the transmission gateway obtain with
The identity of the corresponding intended gateway of the target terminal identity information, wherein include in described group equipment identities list
The identity information of all terminal devices in sub- communication set where the transmission gateway.
After the transmission gateway receives the solicited message, the target terminal identity in the solicited message is believed
The described group equipment identities list for ceasing and prestoring compares, and inquires whether the target terminal identity information is in described
In group equipment identities list.Described group equipment identities list refer to it is described transmission terminal device where the sub- communication set in
The set or list of the identity information of all terminal devices.If the target terminal identity information is not in described group equipment body
In part list, the transmission gateway further obtains the corresponding intended gateway according to the target terminal identity information
Identity.The intended gateway refers to the gateway in the sub- communication set where the target terminal.The intended gateway
Identity refers to the unique identity of the intended gateway, for example, the ID of intended gateway.The transmission gateway is according to
Target terminal identity information obtain the intended gateway identity method can there are many, for example, the transmission gateway can
To be obtained from pre-stored each sub- communication set terminal device and gateway information list.The transmission gateway can also lead to
Cross the identity that server obtains the intended gateway.For each gateway in server registration, server distribution ID give each gateway,
And store the identity of each gateway and corresponding terminal device.Therefore, the transmission gateway believes the target terminal identity
Breath is sent to server, and server sends corresponding intended gateway identity to the transmission gateway.
S30, for the gateway that sends according to the identity of the intended gateway, Xiang Suoshu intended gateway sends the message
Data and the target terminal identity information.
For the gateway that sends according to the identity of the intended gateway, Xiang Suoshu intended gateway sends the message data
With the target terminal identity information.There are many ways to transmission gateway sends message to the intended gateway, the application
And without limitation.
The message data is sent to the corresponding terminal of the target terminal identity information and set by S40, the intended gateway
It is standby.
After the intended gateway receives the message data, according to the target terminal identity information, further by institute
It states message data and is sent to the corresponding target device, disappear to complete the sending device to target device transmission
Breath.
In the present embodiment, asking for the transmission terminal device transmission of the sub- communication set where it is received by the transmission gateway
Information is sought, the solicited message includes message data and target terminal identity information.When the target terminal identity information is not located
When in this group of equipment identities list, the gateway that sends obtains intended gateway corresponding with the target terminal identity information
Identity, and the message data and the target terminal identity information are sent to the intended gateway;The target network
It closes and the message data is sent to the corresponding terminal device of the target terminal identity information, to realize the transmission terminal
With the communication between the target terminal.The method provided in this embodiment can be realized institute in the different sub- communication sets
The communication between terminal device is stated, also the communication between the terminal device in as different wireless mesh networks.It compares
The method that the terminal equipment in communication is realized in a wireless mesh network, the method communication process provided in this embodiment
In, message is transmitted by gateway, it is not easy to and block, effectively increases communication efficiency and communication speed, it is a large amount of so as to improve
Communication requirement between the terminal device.
It realizes there are many ways to sending the message data to the corresponding gateway of the intended gateway identity, please join
See Fig. 4, in one embodiment, local area network is formed between each gateway, and realize and communicate by UDP.S30 includes:
S310, the transmission gateway send notification information to all gateway multicasts, and the notification information includes the target
Gateway identity mark, the message data and the target terminal identity information.
Same multicast address is added in the gateway in each sub- communication set, forms local area network.The transmission net
All gateways closed into local area network send the notification message in a manner of multicast.The message structure of the notification message can be with
Referring to table 1 and above-described embodiment, details are not described herein.
In the present embodiment, by sending the notification message to all gateway multicasts, to realize the biography to message data
Defeated, communication mode is simple, and efficiency of transmission is high.Meanwhile the communication means provided in this embodiment does not need other equipment, such as
The communication between gateway and gateway can be realized in the participation of server, reduces the pressure of server, and response quickly, transmission
It is high-efficient.
In one embodiment, the method further includes:
S320, the intended gateway send return information to the transmission gateway.
The transmission gateway is to notification message described in each gateway multicast, after each gateway receives message, according to having concluded
UDP communication protocol, include " whether needing to reply " field in the notification message.So with the reception in the notification message
The square consistent gateway of gateway ID, i.e., the described intended gateway reply the transmission gateway, acknowledge receipt of the notification message.
Since then, message closed loop is formed, the accuracy of communication is improved.
Fig. 5 is referred to, in one embodiment, the gateway that sends passes through the communication of server realization and other gateways.
S30 includes:
S330, the gateway that sends is according to the identity of the intended gateway, by server to the intended gateway
Send the message data and the target terminal identity information.
The transmission gateway is by the identity mark of the message data, the target terminal identity information and the intended gateway
Knowledge is sent to the server.The server carries out transfer, according to the identity information of the intended gateway by the message count
According to being further transmitted to the intended gateway.By the transit server, realize that the communication between each gateway, message transmission are steady
Qualitative height.
Fig. 6 is referred to, the present embodiment is that the transmission terminal and the target terminal belong to same wireless mesh network, is led to
A kind of possible embodiment of letter.The method also includes:
S50, if the target terminal identity information is in described group equipment identities list, the transmission gateway is by institute
It states message data and is sent to the corresponding terminal device of the target terminal identity information.
When the transmission gateway is inquired in described group equipment identities list, the target terminal identity information is described
In this group of equipment identities list, illustrates the target device and the sending device is the same sub- communication set, in same
Wireless mesh network.The transmission gateway will directly need the message count transmitted according to the target terminal identity information
According to the target terminal is sent to, the transmission of information is completed.Same institute is furthermore achieved in the method provided in this embodiment
The communication in sub- communication set between terminal device is stated, communication means is simple, fast.
It should be understood that although each step in the flow chart of Fig. 3-6 is successively shown according to the instruction of arrow,
These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps
Execution there is no stringent sequences to limit, these steps can execute in other order.Moreover, at least one in Fig. 3-6
Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps
Completion is executed, but can be executed at different times, the execution sequence in these sub-steps or stage is also not necessarily successively
It carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternately
It executes.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer
In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein,
To any reference of memory, storage, database or other media used in each embodiment provided herein,
Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM
(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include
Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms,
Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing
Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of embodiment described above can be combined arbitrarily, for simplicity of description, not to above-mentioned reality
It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited
In contradiction, all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
The limitation to claim therefore cannot be interpreted as.It should be pointed out that coming for those of ordinary skill in the art
It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application
Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.