A kind of multiple wireless protocols equipment of realizing is discerned also interconnected method and apparatus mutually
Technical field
The present invention relates to wireless communication technology field, relate in particular to a kind of method and apparatus of realizing that multiple wireless protocols equipment is discerned mutually and interconnected.
Background technology
At present, along with the continuous increase of wireless protocol equipment amount of user data, the demand of wireless protocol equipment is grown with each passing day.And in actual applications, there is various modes in the wireless protocol equipment that individual or business organization use, mainly comprises WIFI (Wireless Fidelity 802.11a/b/g/n), Zigbee (802.15.4), Bluetooth (bluetooth), UWB (ultra wideband) or the like; Therefore, along with the increase of equipment room demand for interconnection, the interconnected of multiple wireless protocols equipment room will become trend.Yet because the difference on the physical layer protocol of various device causes the interconnected meeting between present different radio agreement following subject matter to occur: can not discern mutually between the multiple wireless protocols equipment; Because the physical mechanism difference of different radio equipment room, transmission range is all different with data transmission rate; Wireless device identification needs artificial affirmation.
At therewith, several available wireless bridge joint mode and the equipment thereof that exist in the prior art mainly contain:
Serial ports changes the Zigbee network: this bridge joint mode and equipment thereof can only transfer wired serial ports to a kind of wireless protocol equipment, and equipment decomposes the data flow of serial ports and forms the Zigbee packet so that the identification and interconnected mutually of these equipment under the Zigbee network; But it possesses the ability of unidirectional identification, and promptly serial ports does not possess identification of multiple wireless protocols apparatus self-adaptation and interconnected ability to the Zigbee network;
Ethernet changes the UWB network: this bridge joint mode and equipment thereof are mapped as an ethernet device with the UWB network equipment, it are connected in the cable LAN, to finish the interconnection between the two; But it does not possess identification of multiple wireless protocols apparatus self-adaptation and interconnected ability equally.
Therefore, no matter be that serial ports changes the Zigbee network, or Ethernet changes UWB, these modes and device have all just solved the conversion of a kind of agreement on the agreement of another kind of agreement, so that certain two kinds of agreement directly can interconnect, and all be the equipment of cable network and all need to rely on outer CPU and be configured and operate; But it does not all solve multiple wireless device and discerns mutually and interconnect, and then realizes that data are common.
Summary of the invention
In view of this, the problem that the present invention solves is a kind of method and apparatus of realizing that multiple wireless protocols equipment is discerned mutually and interconnected, can realize that the equipment of multiple wireless protocols can be discerned mutually with interconnected.
For addressing the above problem, technical scheme provided by the invention is as follows:
A kind of method that realizes that multiple wireless protocols equipment is discerned mutually and interconnected, this method comprises:
The wireless protocol equipment that connects is discerned;
The employed wireless protocols of described wireless protocol equipment that recognizes is converted to common protocol, and deposits protocol list in, comprise the id information and the corresponding identifying information thereof of former wireless protocols in the described common protocol;
When data need be transmitted, the protocol frame with data to be transferred was converted to purpose wireless protocols Frame by described common protocol again;
Search described protocol list according to purpose wireless protocols Frame, determine to transfer data to the purpose wireless protocol equipment behind the purpose wireless protocols.
Accordingly, the conversion of described wireless protocols specifically realizes by following steps:
Former wireless protocols data frame content is resolved, and the content after will resolving at the id information of former wireless protocols is then reformulated new common data frame.
Accordingly, described framing again specifically comprises:
The management block that the type information and the management information block of former wireless protocols Frame is set at new common data frame; The data field of carrying data division in the former wireless protocols Frame is set at the application data block; The id information that in the management block of described new advertisement data frame, comprises former wireless protocols.
Accordingly, described protocol conversion specifically realizes by following steps:
Discern former wireless protocols data frame format and data frame type;
According to former wireless protocols data frame format and the new protocol data frame of type reconstruct;
Judge whether new protocol data frame comprises the id information of former wireless protocols; If new agreement that then will this new protocol data frame correspondence adds protocol list; Otherwise, repeat former wireless protocols data frame format of aforementioned identification and data frame type, new protocol data frame and the determining step of reconstruct.
Accordingly, this method further comprises:
After new wireless protocol equipment inserts, repeat aforementioned operation and upgrade protocol list.
Accordingly, the id information of described former wireless protocols comprises the agreement name and the connection attribute of former wireless protocols at least.
A kind of device of realizing that multiple wireless protocols equipment is discerned mutually and interconnected, this device comprises: physical layer block and protocol conversion module; Wherein,
Described physical layer block is used to connect wireless protocol equipment, simultaneously the employed wireless protocols of wireless protocol equipment that connects is discerned; And, determine the purpose wireless protocols by searching protocol list according to the purpose wireless protocols Frame that described protocol conversion module is changed, transfer data to the purpose wireless protocol equipment then;
The employed wireless protocols of described wireless protocol equipment that described protocol conversion module is used for physical layer block is recognized is converted to common protocol, comprises the id information and the corresponding identifying information thereof of former wireless protocols in the described common protocol; And when data need be transmitted, this purpose wireless protocols Frame is sent to described physical layer block after the protocol frame of data to be transferred is converted to purpose wireless protocols Frame by described common protocol.
Accordingly, described physical layer block comprises the physical chip of coupled wireless protocol equipment at least.
Accordingly, described physical layer block spare interface is in order to connect other wireless protocol equipments.
Accordingly, described protocol conversion module further comprises: identification module, reconstructed module and judge module; Wherein,
Described identification module is used to discern former wireless protocols data frame format and data frame type;
Described reconstructed module is used for the former wireless protocols data frame format and the new Frame of type reconstruct that recognize according to described identification module;
Described judge module is used to judge whether new Frame comprises the id information of former wireless protocols; If new agreement that then will this new Frame correspondence adds protocol list; Otherwise the indication identification module is discerned again.
Accordingly, described physical layer block is further used for connecting and discerning new wireless protocol equipment, and the indication protocol conversion module is carried out corresponding operating to upgrade protocol list.
As can be seen, adopt and of the present inventionly utilize a kind of protocol conversion mechanism that various wireless protocols are converted to a kind of public agreement, and with common protocol as bridge, carry out the transmission that protocol conversion realizes data during by transmission data between different wireless protocol equipments, and then realize mutual identification and interconnection between the different radio protocol devices.
Description of drawings
Fig. 1 is the method flow schematic diagram of the embodiment of the invention 1;
Fig. 2 is the structured flowchart of each protocol data frame of protocol conversion front and back in the embodiment of the invention 1;
Fig. 3 is the flow path switch schematic diagram of second kind of form correspondence of protocol conversion in the embodiment of the invention 1;
Fig. 4 is the schematic block diagram of the device of the embodiment of the invention 2.
Embodiment
Basic thought of the present invention is to utilize a kind of protocol conversion mechanism that various wireless protocols are converted to a kind of public agreement, and with common protocol as bridge, realize the transmission of data when between different wireless protocol equipments, needing transfer of data by the conversion between wireless protocols and the common protocol, and then realize identification and interconnection between the different radio protocol devices.
In order to make those skilled in the art better understand the present invention, method of the present invention is elaborated below in conjunction with the drawings and specific embodiments.
As shown in Figure 1, the embodiment of the invention 1 provides a kind of method that realizes that multiple wireless protocols equipment is discerned mutually and interconnected, and this method comprises:
Step 101: the wireless protocol equipment that connects is discerned;
Step 102: the employed wireless protocols of described wireless protocol equipment that will recognize is converted to common protocol, and deposits protocol list in, comprises the id information of former wireless protocols in the described common protocol;
Step 103: when data need be transmitted, the protocol frame with described data to be transferred was converted to purpose wireless protocols frame by described common protocol again;
Step 104: search described protocol list according to purpose wireless protocols frame, determine to transfer data to the purpose wireless protocol equipment behind the purpose wireless protocols.
Concrete, when wireless protocol equipment inserts, at first utilize existing various wireless protocols bottom communication mechanism, the wireless protocol equipment that is connected is discerned, also recognize the employed wireless protocols of this wireless protocol equipment simultaneously; When the wireless protocol equipment that is connected belongs to the equipment of working under the agreement of the same race, can carry out normal data communication between its equipment; But work as the wireless protocol equipment that is connected when adhering to the equipment of working under the different radio agreement separately, the embodiment of the invention proposes a kind of new protocol data structure of structure and adapts to the various wireless communication agreement, promptly by constructing the bridge that new protocol data structure is discerned mutually as the different radio agreement; Concrete, two kinds of forms can be arranged, present embodiment is an example with Ethernet and UWB:
First kind of form is at first to determine that according to the aforementioned identification step wireless protocol equipment that inserts is ethernet device and UWB equipment; Then ethernet data frame and UWB Frame are resolved, know that the frame structure of the two is formed, and obtain the two protocol of I D information; Again the management block of former UWB Frame is set at the management block of new common data frame, the data field of carrying data division in the UWB Frame is set at the application data block of new common data frame, with new management block and application data block constitute new common data frame; For ethernet data frame, adopt and use the same method, frame head information in the ethernet data frame, IP stem and TCP header message etc. are set at the management block of new common data frame, the application data of ethernet data frame partly is set at the application data block of new common data frame, and constitutes new common data frame with new management block and application data block; Certainly, the management block of new common data frame part is made of former protocol network attribute and former protocol network data frame head, wherein must comprise former protocol of I D information, as shown in Figure 2;
In new agreement, with the id information and the corresponding identifying information (wherein id information comprises former agreement name and connection attribute etc.) thereof of the original wireless protocols of mark, can allow the equipment room of follow-up required mutual identification can know the former network attribute of its identification and InterWorking Equipment like this; And follow-up when data need be transmitted, also can after with protocol conversion, send to corresponding protocol equipment by the ID and the corresponding identifying information thereof of former wireless protocols.Former wireless protocols data frame content resolved and behind corresponding information framing again, will be under with a kind of Frame data flow transmitted according to different id information attribute assignment to original wireless network, allow former agreement can recognize these traffic flow informations.
After protocol conversion, new common protocol Frame corresponding protocols is preserved in the protocol list, call when treating subsequent data transmission; Wherein, the new agreement in the protocol list is all according to the corresponding preceding former protocol attribute of its conversion that points to of the former protocol ID information in its protocol frame structure.
Second kind of form is, at first by discerning the former wireless protocols data frame format and the data frame type of the wireless protocol equipment correspondence that inserts, the device protocol of knowing access is Ethernet protocol and UWB agreement, learns that through judgement its corresponding Frame is ethernet data frame and UWB Frame; Carry out the data structure restructuring procedure of ethernet frame and UWB frame then respectively, i.e. reconstruct ethernet data frame and UWB Frame, concrete restructuring procedure is identical with the frame structure reorganization in above-mentioned first kind of form, is not relating once more; After finishing, the reconstruct data frame judges whether new protocol data frame comprises the id information of former wireless protocols; If then the new agreement with new protocol data frame correspondence adds protocol list; Otherwise, repeating the operation of aforementioned identification, reconstruct and determining step, the id information or the wireless protocol equipment that have comprised former wireless protocols in new protocol data frame no longer insert, the end process process, specifically as shown in Figure 3.
When data need be transmitted, the Frame corresponding protocols that at first will need to transmit was converted to new common protocol by the way, and the protocol data frame after its conversion has comprised the corresponding protocol of I D of the Frame information of needs transmission; And then utilize the theory of constitution of new common protocol frame structure, be converted into the wireless protocols Frame that other various wireless protocols can be discerned, it (also is wireless protocols network attribute and wireless protocols network data frame head part that the management block that is about to new common data frame is decomposed into the non-data division of various wireless protocols Frames respectively, the id information that has wherein comprised each wireless protocols), the application data block is decomposed in each wireless protocols Frame carries section data; Be the purpose agreement with the wireless protocols after the conversion again, data to be transferred be transferred to corresponding wireless protocol equipment, realize mutual identification and interconnection between wireless protocol equipment by searching protocol list.
It should be noted that, when the transmission data, can new common protocol be converted to various wireless protocols yet, but utilizing new common protocol by searching the id information that protocol list therefrom finds the various wireless protocols of preserving in the new common protocol Frame, the corresponding again new common protocol that data can be discerned by various wireless protocol equipments at each id information sends to data to be transferred the wireless protocol equipment of various accesses; Wherein, give the wireless network of various access according to the attribute assignment of different id informations according to the data flow under the Frame after will changing in the above-mentioned conversion regime, make former agreement can recognize these traffic flow informations, and then can obtain the data that send over by new agreement.
As can be seen, adopt method of the present invention,
One of ordinary skill in the art will appreciate that all or part of step that realizes in the foregoing description method is to finish by the relevant hardware of program command, and described procedure stores is in the particular memory medium.
Based on above-mentioned thought, the embodiment of the invention 2 has proposed a kind of device of realizing that multiple wireless protocols equipment is discerned mutually and interconnected again, and as shown in Figure 4, this device comprises: physical layer block 401 and protocol conversion module 402; Wherein,
Described physical layer block 401 is used to connect wireless protocol equipment, simultaneously the employed wireless protocols of wireless protocol equipment that connects is discerned; And, determine the purpose wireless protocols by searching protocol list according to the purpose wireless protocols frame that described protocol conversion module 402 is changed, give the purpose wireless protocol equipment with described transfer of data then;
The employed wireless protocols of wireless protocol equipment that described protocol conversion module 402 is used for physical layer block 401 is recognized is converted to common protocol, comprises the id information of former wireless protocols in the described common protocol; And when data need be transmitted, this purpose wireless protocols Frame is sent to described physical layer block 401 after the protocol frame of described data to be transferred is converted to purpose wireless protocols frame by described common protocol.
Wherein, described physical layer block comprises the physical chip of coupled wireless protocol equipment at least; Promptly has physical layer equipment module with the wireless protocol equipment of this device interconnecting, this device can be realized bottom communication with the equipment of multiple wireless protocols by affiliated physical layer block, for example waits and realizes by WIFI radio frequency chip, Zigbee radio frequency chip, Bluetooth radio frequency chip, UWB radio frequency chip.After this device inserts multiple Wireless Communication Equipment, protocol conversion module can be converted to a kind of new equipment connection protocol with different radio equipment corresponding protocols by a CPU: such as CPU is a kind of flush bonding processor, the method program of this translation-protocol is solidificated in this processor, and is other agreement spare interfaces; Certainly, described physical layer block further also can be used for connecting and discerning new wireless protocol equipment, and the indication protocol conversion module is carried out corresponding operating with shape protocol list more.
And proposing described protocol conversion module, the embodiment of the invention 2 further comprises: identification module, reconstructed module and judge module; Wherein, described identification module is used to discern former wireless protocols data frame format and data frame type; Described reconstructed module is used for the former wireless protocols data frame format and the new Frame of type reconstruct that recognize according to described identification module; Described judge module is used to judge whether new Frame comprises the id information of former wireless protocols; If new agreement that then will this new Frame correspondence adds protocol list; Otherwise the indication identification module is discerned again; Also the wireless device corresponding protocols can be converted to a kind of new equipment connection protocol by this module combinations and working method thereof.
Concrete, the embodiment of the invention 2 is incorporated in the device by the communication module that will have different physical layer protocol, and this device uses a CPU or protocol conversion module that these device protocols are changed, simultaneously by an identical new agreement, realize identification between various wireless devices and interconnected.For example this device has inserted the WIFI network equipment and the UWB network equipment, and in the physical chip of the physical chip of WIFI and UWB being integrated in this device, therefore can discern the equipment in WIFI network and the UWB network simultaneously; After recognizing the equipment of WIFI network and UWB network by the physical layer equipment module, realize two kinds of data communication between the different radio protocol layer by the protocol conversion module in this device: utilizing embodiment 1 described device protocol to change the mechanism WIFI and UWB protocol conversion is a kind of new wireless protocols; In new wireless protocols, ID (id information comprises original equipment corresponding protocols name and connection attribute etc.) and corresponding identifying information thereof that will the original wireless protocols of mark can allow the equipment of follow-up required mutual identification can know the former network attribute of his identification and InterWorking Equipment like this; To behind the former wireless protocols bag Context resolution corresponding information be organized bag again, and will allow former agreement can recognize these data giving in the wireless network of former different agreement according to different id information attribute assignment with the data flow under a kind of Frame; And the wireless device that inserts this device will be by the ID and the corresponding identifying information thereof of wireless protocols, new wireless protocols to the id information that comprises former wireless protocols after being changed by multiple wireless protocols is discerned, and then finishes identification and interconnection between each wireless protocol equipment.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.