CN107634896B - Data transmission method and device - Google Patents

Data transmission method and device Download PDF

Info

Publication number
CN107634896B
CN107634896B CN201610575004.1A CN201610575004A CN107634896B CN 107634896 B CN107634896 B CN 107634896B CN 201610575004 A CN201610575004 A CN 201610575004A CN 107634896 B CN107634896 B CN 107634896B
Authority
CN
China
Prior art keywords
node
hoc
service data
connection information
identifier
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
CN201610575004.1A
Other languages
Chinese (zh)
Other versions
CN107634896A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201610575004.1A priority Critical patent/CN107634896B/en
Priority to PCT/CN2017/090642 priority patent/WO2018014708A1/en
Publication of CN107634896A publication Critical patent/CN107634896A/en
Application granted granted Critical
Publication of CN107634896B publication Critical patent/CN107634896B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks
    • H04W84/22Self-organising networks, e.g. ad-hoc networks or sensor networks with access to wired networks

Abstract

The invention discloses a data transmission method, which comprises the following steps: when an IP node receives service data, extracting a node identifier of a destination node carried by the service data; when the node identification of the destination node is the same as the node identification of the IP node, acquiring the stored connection information of the Ad Hoc node associated with the IP node; and transmitting the service data to the associated Ad Hoc node based on the Ad Hoc network according to the connection information. The invention also discloses a data transmission device. The invention can reduce the cost of the mobile terminal for realizing the instant messaging function.

Description

Data transmission method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data transmission method and apparatus.
Background
With the development of terminal technology, mobile terminals such as mobile phones and tablet computers have become more and more popular, and users can use the mobile terminals to implement various functions. Among them, the instant messaging is one of the most commonly used functions of the mobile terminal, and the mobile terminal needs to access the IP network to realize the function. Generally, the mobile terminal implements the instant messaging function by accessing the mobile IP network, however, an access provider of the mobile IP network usually charges a fee according to the data traffic, so that the cost of implementing the instant messaging function by the mobile terminal is high.
Disclosure of Invention
The invention mainly aims to provide a data transmission method and a data transmission device, and aims to reduce the cost of realizing an instant messaging function of a mobile terminal.
In order to achieve the above object, the present invention provides a data transmission method, including:
when an IP node receives service data, extracting a node identifier of a destination node carried by the service data;
when the node identification of the destination node is the same as the node identification of the IP node, acquiring the stored connection information of the Ad Hoc node associated with the IP node;
and transmitting the service data to the associated Ad Hoc node based on the Ad Hoc network according to the connection information.
Optionally, before the step of extracting the node identifier of the destination node carried by the service data, the method further includes:
when an IP node receives service data, extracting a node identifier of a source node carried by the service data;
and when the node identification of the source node is different from the node identification of the IP node, switching to the step of extracting the node identification of the destination node carried by the service data.
Optionally, after the step of extracting the node identifier of the source node carried by the service data when the IP node receives the service data, the method further includes:
and when the node identification of the source node is the same as the node identification of the IP node, discarding the service data.
Optionally, after the step of transmitting the service data to the associated Ad Hoc node based on the Ad Hoc network according to the connection information, the method further includes:
and deleting the association relation between the IP node and the associated Ad Hoc node when receiving a cancellation copy-sending instruction sent by the associated Ad Hoc node.
Optionally, the data transmission method further includes:
and updating the connection information of the Ad Hoc node which is stored by the IP node and transmits the connection information when the connection information transmitted by any Ad Hoc node in the Ad Hoc network is received.
In addition, to achieve the above object, the present invention also provides a data transmission device, including:
the extraction module is used for extracting the node identification of the destination node carried by the service data when the IP node receives the service data;
an obtaining module, configured to obtain, when a node identifier of a destination node is the same as a node identifier of the IP node, stored connection information of an Ad Hoc node associated with the IP node;
and the copying module is used for transmitting the service data to the associated Ad Hoc node based on the Ad Hoc network according to the connection information.
Optionally, the extracting module is further configured to extract a node identifier of a source node carried by the service data when the IP node receives the service data; and the node identifier extraction module is further used for extracting the node identifier of the destination node carried by the service data when the node identifier of the source node is different from the node identifier of the IP node.
Optionally, the extracting module is further configured to discard the service data when the node identifier of the source node is the same as the node identifier of the IP node.
Optionally, the data difference transmission apparatus further includes:
and the deleting module is used for deleting the association relation between the IP node and the associated Ad Hoc node when receiving a cancellation copy instruction sent by the associated Ad Hoc node.
Optionally, the data transmission apparatus further includes:
and the updating module is used for updating the connection information of the Ad Hoc node which is stored by the IP node and transmits the connection information when the connection information transmitted by any Ad Hoc node in the Ad Hoc network is received.
The data transmission method and the data transmission device are applied to the IP nodes simultaneously accessed into the IP network and the Ad Hoc network, and when the IP nodes receive the service data, the accessed Ad Hoc network is used for transmitting the received service data to the associated Ad Hoc nodes, so that the copying of the service data is realized, and the flow consumption of the Ad Hoc nodes is avoided. Correspondingly, when the Ad Hoc node is the mobile terminal, the IP node is used for copying the instant messaging data, and the cost of the mobile terminal for realizing the instant messaging function can be reduced.
Drawings
Fig. 1 is a schematic flow chart of a data transmission method according to a first embodiment of the present invention;
fig. 2 is a diagram illustrating a topology structure of an Ad Hoc converged communication system in a first embodiment of the data transmission method of the present invention;
fig. 3 is a block diagram of a data transmission device according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The present invention provides a data transmission method, and referring to fig. 1, in a first embodiment of the data transmission method of the present invention, the data transmission method includes:
step S10, when the IP node receives the service data, extracting the node identification of the destination node carried by the service data;
as is well known to those skilled in the art, an Ad Hoc network is a multi-hop, centerless, Ad Hoc wireless network, also known as a multi-hop network, an infrastructure-less network, or an Ad Hoc network. The entire network has no fixed infrastructure, each Ad Hoc node is mobile, and can dynamically maintain contact with other Ad Hoc nodes in any manner. In the Ad Hoc network, due to the limitation of the wireless coverage of the Ad Hoc nodes, two Ad Hoc nodes which cannot directly communicate can forward packets by means of other nodes. Each Ad Hoc node is also a router, and they can perform the functions of discovering and maintaining routes to other Ad Hoc nodes.
Based on the existing Ad Hoc technology, the data transmission method proposed in this embodiment is applied to the converged communication system of Ad Hoc shown in fig. 2, and is used to implement copying of service data, which is specifically executed by a data transmission device. As shown in fig. 2, the Ad Hoc convergence communication system applied in the present invention includes an IP node and an Ad Hoc node, wherein the IP node accesses to an Ad Hoc network and an IP network simultaneously. In specific implementation, the IP node may be served by a PC (Personal Computer, PC, or PC), and is accessed to the IP network in a wired manner, and is accessed to the Ad Hoc network through a set Wi-Fi module; the Ad Hoc node includes mobile terminals such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a game palm machine, and a PMP (portable multimedia player).
In this embodiment, the data transmission device detects the service data received by the IP node, and when the IP node receives the service data, analyzes the received service data, and extracts the node identifier of the destination node carried by the service data. The node identification is used for uniquely identifying the Ad Hoc node in the Ad Hoc network.
After extracting the node identifier of the destination node carried by the received service data, the data transmission device compares the extracted node identifier of the destination node with the node identifier of the IP node where the destination node is located, so as to determine whether the IP node is the destination node of the received service data.
When the node identification of the destination node is different from the node identification of the IP node, the IP node is not the destination node of the received service data, and at this time, the data transmission device acquires the connection information of the destination node based on the association information of the node identification and the connection information stored in the IP node, and then forwards the received service data to the destination node based on the Ad Hoc network according to the connection information of the destination node.
Step S20, when the node identification of the destination node is the same as the node identification of the IP node, the stored connection information of the Ad Hoc node associated with the IP node is obtained;
when the node identification of the destination node is identified to be the same as the node identification of the IP node, the IP node is the destination node of the received service data, at this time, the data transmission device identifies whether the associated Ad Hoc node exists in the IP node, and if so, the connection information of the stored Ad Hoc node associated with the IP node is acquired. It should be noted that, when there is an Ad Hoc node associated with an IP node, a node identifier of the IP node is the same as a node identifier of the associated Ad Hoc node, and the data transmission device specifically acquires connection information associated with the node identifier of the IP node based on the association information between the node identifier and the connection information stored in the IP node; the data transmission device acquires the connection information associated with the node identifier of the IP node, and then takes the connection information except the connection information of the IP node in the acquired connection information as the connection information of the Ad Hoc node associated with the IP node.
Step S30, according to the connection information, transmitting the service data to an associated Ad Hoc node based on the Ad Hoc network.
After the connection information of the Ad Hoc node associated with the IP node is acquired, the service data received by the IP node is transmitted to the Ad Hoc node associated with the IP node based on the Ad Hoc network according to the connection information of the associated Ad Hoc node, so that the copying of the service data is realized. The connection information at least includes the IP address and port number of the receiving end, and may also include the MAC address of the receiving end.
It is easy to understand that, to implement the service data copying between the IP node and the associated Ad Hoc node, the IP node and the Ad Hoc node that needs to copy the service data need to be associated first, and the association operation between the IP node and the Ad Hoc node will be described below with respect to the IP node being a PC and the Ad Hoc node being a mobile phone.
At the Ad Hoc node end, the user selects an original identifier for calculating the node identifier based on an associated interface provided by the mobile phone, and optionally, in this embodiment, the mobile phone number of the mobile phone or the MAC of the mobile phone is used as the original identifier selected by the user. After receiving the selection information of the user, the mobile phone calculates a hash value of the original identifier corresponding to the selection information by using a hash algorithm such as MD5, and takes the calculated hash value as the node identifier. For example, if the user selects the mobile phone number of the mobile phone as the original identifier of the computing node identifier, the mobile phone extracts the mobile phone number carried by the SIM card of the mobile phone, and calculates the hash value of the extracted mobile phone number by using the MD5 algorithm, which is used as the node identifier.
At the IP node side, the user inputs the original identifier for calculating the node identifier (here, the same original identifier as selected at the handset needs to be input) based on the associated interface provided by the PC. After receiving the original identifier for calculating the node identifier input by the user, the PC calculates the hash value of the input original identifier by using the same hash algorithm of the mobile phone, and uses the calculated hash value as the node identifier. For example, a user selects a mobile phone number of a mobile phone as an original identifier of a mobile phone computing node identifier at the mobile phone, in order to realize the association between the mobile phone and the PC, the user needs to input the mobile phone number of the mobile phone at the PC as the original identifier of the node identifier computed by the PC, and accordingly, after receiving the mobile phone number of the mobile phone input by the user, the PC adopts a hash value of the mobile phone number input by an MD5 algorithm, and uses the computed hash value as the node identifier.
Based on the foregoing description, it can be understood that the association of the Ad Hoc node with the IP node is completed after the IP node calculates its node identification. At this time, the same node identification (after the association of the Ad Hoc node with the IP node is completed, the node identifications of the associated Ad Hoc node and IP node are the same) is associated with the transmission information of the Ad Hoc node.
Optionally, an association identifier initially set to 0 may also be set at the IP node, and after the association between the Ad Hoc node and the IP node is completed, the association identifier is set to 1.
It should be noted that the function of the IP node is implemented by the data transmission device based on the setting of the IP node.
In the data transmission method provided in this embodiment, when receiving service data, the IP node that is simultaneously accessed to the IP network and the Ad Hoc network transmits the received service data to its associated Ad Hoc node by using the accessed Ad Hoc network, thereby implementing copying of the service data and avoiding consumption of traffic of the Ad Hoc node. Correspondingly, when the Ad Hoc node is the mobile terminal, the IP node is used for copying the instant messaging data, and the cost of the mobile terminal for realizing the instant messaging function can be reduced.
Further, based on the first embodiment, a second embodiment of the data transmission method of the present invention is proposed, and in this embodiment, before step S10, the method further includes:
when an IP node receives service data, extracting a node identifier of a source node carried by the service data;
when the node identifier of the source node is different from the node identifier of the IP node, the step S10 is executed.
It should be noted that, on the basis of the first embodiment, the data copying operation performed in this embodiment is further limited, and other operations may refer to the first embodiment, and are not described herein again.
In this embodiment, the transmitted service data carries a node identifier of the source node in addition to a node identifier of the destination node, and is used to determine whether the received service data is looped-back service data, where the source node is a sending end that initially sends out the service data.
Correspondingly, when detecting that the IP node receives the service data, the data transmission device firstly analyzes the received service data and extracts the node identifier of the source node carried by the service data; after extracting the node identifier of the source node carried by the received service data, the data transmission device compares the extracted node identifier of the source node with the node identifier of the IP node where the source node is located, so as to determine whether the service data is looped back service data.
When it is recognized that the node identifier of the source node is different from the node identifier of the IP node, the received service data is non-looped back service data, that is, the service data sent by other nodes, and at this time, the data transmission device extracts the node identifier of the destination node carried by the received service data, and starts the process of copying and sending the service data.
Further, in this embodiment, after the step of extracting the node identifier of the source node carried by the service data when the IP node receives the service data, the method further includes:
and when the node identification of the source node is the same as the node identification of the IP node, discarding the service data.
When the node identifier of the source node is identified to be the same as the node identifier of the IP node, it is indicated that the received service data is loopback service data, that is, the service data is initially sent by the IP node and is finally sent back to the IP node, and at this time, the data transmission device directly discards the received service data without processing.
Further, based on the foregoing first or second embodiment, a third embodiment of the data transmission method according to the present invention is proposed, and in this embodiment, after step S30, the method further includes:
and deleting the association relation between the IP node and the associated Ad Hoc node when receiving a cancellation copy-sending instruction sent by the associated Ad Hoc node.
It should be noted that, in this embodiment, on the basis of the foregoing embodiment, an operation of disassociating the Ad Hoc node from the IP node is further added, and only this difference is described below, and other embodiments may be referred to, and are not described herein again.
In this embodiment, when the user does not need the IP node to copy the service data, the association between the IP node and the Ad Hoc node may be released. In the following, the disassociation between an Ad Hoc node and an IP node will be described with the Ad Hoc node as a mobile phone and the IP node as a PC.
At the IP node, after detecting that the mobile phone with the same node identifier (i.e., the mobile phone associated with the PC) accesses the Ad Hoc network, the PC sends a prompt message to the detected mobile phone.
At the Ad Hoc end, after the mobile phone receives the prompt message transmitted by the PC end, the received prompt message is displayed so that a user can confirm whether to start the copy function of the PC; when receiving the information of 'starting the copying function' input by the user, the mobile phone can maintain the current association relationship with the PC without processing; and when receiving the information of closing the copy function input by the user, the mobile phone sends a copy canceling instruction to the PC.
At the IP node end, when the PC receives a copy canceling instruction sent by the mobile phone, the PC end recalculates the node identification. The PC terminal specifically uses the MAC address thereof as an original identifier of the calculation node identifier, calculates the hash value of the MAC address thereof by using an MD5 algorithm, and uses the calculated hash value as the node identifier thereof. Meanwhile, the association relationship between the connection information and the node identifier of the mobile phone is deleted, and the association identifier is set to be 0, so that the release of the association relationship is completed. Optionally, the PC may further send a prompt message of "association relation released" to the mobile phone, and the mobile phone displays the prompt message.
It should be noted that the function of the IP node is implemented by the data transmission device based on the setting of the IP node.
Further, based on the foregoing first or second embodiment, a fourth embodiment of the data transmission method of the present invention is proposed, and in this embodiment, the data transmission method further includes:
and updating the connection information of the Ad Hoc node which is stored by the IP node and transmits the connection information when the connection information transmitted by any Ad Hoc node in the Ad Hoc network is received.
It should be noted that, since the Ad Hoc network is dynamically changed, in order to implement normal transmission of service data, in this embodiment, on the basis of the foregoing embodiment, an update operation of connection information of an Ad Hoc node is further added, and only this difference is described below, and other details may refer to the foregoing embodiment, and are not described here again.
In this embodiment, when accessing the Ad Hoc convergence communication system applied in the present invention, the Ad Hoc node automatically allocates an IP address (IP address allocation can be performed with reference to the existing Ad Hoc technology), and broadcasts an online notification. Specifically, when the Ad Hoc node is a mobile phone, the online notification broadcast by the Ad Hoc node includes its mobile phone number, MAC address, IP address, and node identifier. The MAC address and the IP address of the Ad Hoc node are connection information thereof, the MAC address is specifically two-layer connection information, and the IP address is specifically three-layer connection information.
When the IP node receives the on-line notification broadcasted by the Ad Hoc node, the data transmission device analyzes the connection information in the on-line notification, and updates the connection information associated with the same node identification stored in the IP node into the analyzed connection information according to the node identification carried by the on-line notification, wherein the connection information comprises the MAC address and the IP address.
In addition, when the IP node is accessed into the Ad Hoc fusion communication system applied by the invention, the IP address is automatically allocated, wherein, because the IP node is accessed into the IP network and the Ad Hoc network simultaneously, the IP address is allocated for the network card of the IP node accessed into the Ad Hoc network by default. And the data transmission device simultaneously broadcasts the online notification of the IP node. Specifically, when the IP node is a PC, the broadcasted online notification of the IP node includes a host name, an IP address, a MAC address, a node identifier, a terminal type, and the like.
Alternatively, the IP node and each Ad Hoc node periodically broadcast their connection information.
Optionally, the IP node and the Ad Hoc node broadcast the offline notification before leaving the accessed Ad Hoc convergence communication system.
Further, in this embodiment, both the IP node and the Ad Hoc node are provided with a buddy list for displaying when needed. When the Ad Hoc node is a mobile phone, the friend list of the IP node comprises the mobile phone number, the MAC address and the like of each Ad Hoc node in the Ad Hoc fusion communication system; when the IP node is a PC, the buddy list of the Ad Hoc node includes the hostname and MAC address of the IP node.
Optionally, when the IP node receives the offline notification broadcast by the Ad Hoc node, the data transmission apparatus deletes the relevant entry of the Ad Hoc node broadcasting the offline notification in the buddy list of the IP node.
When receiving the offline notification broadcast by other Ad Hoc nodes or IP nodes, the Ad Hoc node deletes the relevant entries of the other Ad Hoc nodes or IP nodes broadcasting the offline notification in the friend list of the Ad Hoc node.
The present invention also provides a data transmission device for executing the aforementioned data transmission method, and referring to fig. 3, corresponding to the first embodiment of the aforementioned data transmission method, in the first embodiment of the data transmission device of the present invention, the data transmission device comprises:
an extraction module 10, configured to extract a node identifier of a destination node carried by service data when an IP node receives the service data;
as is well known to those skilled in the art, an Ad Hoc network is a multi-hop, centerless, Ad Hoc wireless network, also known as a multi-hop network, an infrastructure-less network, or an Ad Hoc network. The entire network has no fixed infrastructure, each Ad Hoc node is mobile, and can dynamically maintain contact with other Ad Hoc nodes in any manner. In the Ad Hoc network, due to the limitation of the wireless coverage of the Ad Hoc nodes, two Ad Hoc nodes which cannot directly communicate can forward packets by means of other nodes. Each Ad Hoc node is also a router, and they can perform the functions of discovering and maintaining routes to other Ad Hoc nodes.
Based on the existing Ad Hoc technology, the data transmission device provided in this embodiment is applied to the converged communication system of the Ad Hoc shown in fig. 2, and is used to implement the copying of service data, which is specifically executed by the data transmission device. As shown in fig. 2, the Ad Hoc convergence communication system applied in the present invention includes an IP node and an Ad Hoc node, wherein the IP node accesses to an Ad Hoc network and an IP network simultaneously. In specific implementation, the IP node may be served by a PC (Personal Computer, PC, or PC), and is accessed to the IP network in a wired manner, and is accessed to the Ad Hoc network through a set Wi-Fi module; the Ad Hoc node includes mobile terminals such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a game palm machine, and a PMP (portable multimedia player).
In this embodiment, the extraction module 10 of the data transmission apparatus detects the service data received by the IP node, and when the IP node receives the service data, analyzes the received service data, and extracts the node identifier of the destination node carried by the service data. The node identification is used for uniquely identifying the Ad Hoc node in the Ad Hoc network.
After extracting the node identifier of the destination node carried by the received service data, the extraction module 10 compares the extracted node identifier of the destination node with the node identifier of the IP node where the destination node is located, so as to determine whether the IP node is the destination node of the received service data.
When the node identifier of the destination node is identified to be different from the node identifier of the IP node, it indicates that the IP node is not the destination node of the received service data, at this time, the extraction module 10 instructs the acquisition module 20 to acquire the connection information of the destination node based on the association information between the node identifier and the connection information stored in the IP node, and then the copying module 30 forwards the received service data to the destination node based on the Ad Hoc network according to the connection information of the destination node.
An obtaining module 20, configured to obtain, when a node identifier of a destination node is the same as a node identifier of the IP node, stored connection information of an Ad Hoc node associated with the IP node;
when the extraction module 10 recognizes that the node identifier of the destination node is the same as the node identifier of the IP node, it indicates that the IP node is the destination node of the received service data, and at this time, the acquisition module 20 recognizes whether the IP node has an associated Ad Hoc node, and if so, acquires the stored connection information of the Ad Hoc node associated with the IP node. It should be noted that, when there is an Ad Hoc node associated with an IP node, the node identifier of the IP node is the same as the node identifier of the associated Ad Hoc node, and the obtaining module 20 obtains connection information associated with the node identifier of the IP node specifically based on the associated information between the node identifier and the connection information stored in the IP node; since the node identifier of the IP node is the same as the node identifier of the Ad Hoc node associated therewith, the node identifier of the IP node will be associated with the connection information of the IP node and the connection information of the Ad Hoc node associated therewith at the same time, and after the obtaining module 20 obtains the connection information associated with the node identifier of the IP node, the obtaining module takes the connection information except the connection information of the IP node in the obtained connection information as the connection information of the Ad Hoc node associated with the IP node.
And a copy module 30, configured to transmit the service data to an associated Ad Hoc node based on the Ad Hoc network according to the connection information.
After the obtaining module 20 obtains the connection information of the Ad Hoc node associated with the IP node, the copying module 30 transmits the service data received by the IP node to the Ad Hoc node associated with the IP node based on the Ad Hoc network according to the connection information of the associated Ad Hoc node, thereby realizing the copying of the service data. The connection information at least includes the IP address and port number of the receiving end, and may also include the MAC address of the receiving end.
It is easy to understand that, to implement the service data copying between the IP node and the associated Ad Hoc node, the IP node and the Ad Hoc node that needs to copy the service data need to be associated first, and the association operation between the IP node and the Ad Hoc node will be described below with respect to the IP node being a PC and the Ad Hoc node being a mobile phone.
At the Ad Hoc node end, the user selects an original identifier for calculating the node identifier based on an associated interface provided by the mobile phone, and optionally, in this embodiment, the mobile phone number of the mobile phone or the MAC of the mobile phone is used as the original identifier selected by the user. After receiving the selection information of the user, the mobile phone calculates a hash value of the original identifier corresponding to the selection information by using a hash algorithm such as MD5, and takes the calculated hash value as the node identifier. For example, if the user selects the mobile phone number of the mobile phone as the original identifier of the computing node identifier, the mobile phone extracts the mobile phone number carried by the SIM card of the mobile phone, and calculates the hash value of the extracted mobile phone number by using the MD5 algorithm, which is used as the node identifier.
At the IP node side, the user inputs the original identifier for calculating the node identifier (here, the same original identifier as selected at the handset needs to be input) based on the associated interface provided by the PC. After receiving the original identifier for calculating the node identifier input by the user, the PC calculates the hash value of the input original identifier by using the same hash algorithm of the mobile phone, and uses the calculated hash value as the node identifier. For example, a user selects a mobile phone number of a mobile phone as an original identifier of a mobile phone computing node identifier at the mobile phone, in order to realize the association between the mobile phone and the PC, the user needs to input the mobile phone number of the mobile phone at the PC as the original identifier of the node identifier computed by the PC, and accordingly, after receiving the mobile phone number of the mobile phone input by the user, the PC adopts a hash value of the mobile phone number input by an MD5 algorithm, and uses the computed hash value as the node identifier.
Based on the foregoing description, it can be understood that the association of the Ad Hoc node with the IP node is completed after the IP node calculates its node identification. At this time, the same node identification (after the association of the Ad Hoc node with the IP node is completed, the node identifications of the associated Ad Hoc node and IP node are the same) is associated with the transmission information of the Ad Hoc node.
Optionally, an association identifier initially set to 0 may also be set at the IP node, and after the association between the Ad Hoc node and the IP node is completed, the association identifier is set to 1.
It should be noted that the function of the IP node is implemented by the data transmission device based on the setting of the IP node.
The data transmission device provided in this embodiment transmits, when receiving service data, the received service data to its associated Ad Hoc node by using the accessed Ad Hoc network through the IP node simultaneously accessed to the IP network and the Ad Hoc network, thereby implementing copying of the service data and avoiding consumption of traffic of the Ad Hoc node. Correspondingly, when the Ad Hoc node is a mobile terminal, the IP node provided with the data transmission device is used for copying the instant messaging data, and the cost of the mobile terminal for realizing the instant messaging function can be reduced.
Further, based on the first embodiment, a second embodiment of the data transmission apparatus of the present invention is provided, which corresponds to the second embodiment of the foregoing data transmission method, in this embodiment, the extracting module 10 is further configured to extract, when the IP node receives the service data, the node identifier of the source node carried by the service data; and the node identifier extraction module is further used for extracting the node identifier of the destination node carried by the service data when the node identifier of the source node is different from the node identifier of the IP node.
It should be noted that, on the basis of the first embodiment, the data copying operation performed in this embodiment is further limited, and other operations may refer to the first embodiment, and are not described herein again.
In this embodiment, the transmitted service data carries a node identifier of the source node in addition to a node identifier of the destination node, and is used to determine whether the received service data is looped-back service data, where the source node is a sending end that initially sends out the service data.
Correspondingly, when detecting that the IP node receives the service data, the extraction module 10 first analyzes the received service data, and extracts the node identifier of the source node carried by the service data; after extracting the node identifier of the source node carried by the received service data, the extraction module 10 compares the extracted node identifier of the source node with the node identifier of the IP node where the source node is located, so as to determine whether the service data is looped back service data.
When it is recognized that the node identifier of the source node is different from the node identifier of the IP node, the received service data is non-looped back service data, that is, the service data sent by other nodes, at this time, the extraction module 10 extracts the node identifier of the destination node carried by the received service data, and starts the process of copying and sending the service data.
Further, in this embodiment, the extracting module 10 is further configured to discard the service data when the node identifier of the source node is the same as the node identifier of the IP node.
When it is recognized that the node identifier of the source node is the same as the node identifier of the IP node, it indicates that the received service data is loopback service data, that is, the service data is initially sent by the IP node and is finally sent back to the IP node, and at this time, the extraction module 10 directly discards the received service data without processing.
Further, based on the foregoing first or second embodiment, a third embodiment of the data transmission device of the present invention is proposed, which corresponds to the foregoing third embodiment of the data transmission method, and in this embodiment, the data difference transmission device further includes:
and the deleting module is used for deleting the association relation between the IP node and the associated Ad Hoc node when receiving a cancellation copy instruction sent by the associated Ad Hoc node.
It should be noted that, in this embodiment, on the basis of the foregoing embodiment, an operation of disassociating the Ad Hoc node from the IP node is further added, and only this difference is described below, and other embodiments may be referred to, and are not described herein again.
In this embodiment, when the user does not need the IP node to copy the service data, the association between the IP node and the Ad Hoc node may be released. In the following, the disassociation between an Ad Hoc node and an IP node will be described with the Ad Hoc node as a mobile phone and the IP node as a PC.
At the IP node, after detecting that the mobile phone with the same node identifier (i.e., the mobile phone associated with the PC) accesses the Ad Hoc network, the PC sends a prompt message to the detected mobile phone.
At the Ad Hoc end, after the mobile phone receives the prompt message transmitted by the PC end, the received prompt message is displayed so that a user can confirm whether to start the copy function of the PC; when receiving the information of 'starting the copying function' input by the user, the mobile phone can maintain the current association relationship with the PC without processing; and when receiving the information of closing the copy function input by the user, the mobile phone sends a copy canceling instruction to the PC.
At the IP node end, when the PC receives a copy canceling instruction sent by the mobile phone, the PC end recalculates the node identification. The PC terminal specifically uses the MAC address thereof as an original identifier of the calculation node identifier, calculates the hash value of the MAC address thereof by using an MD5 algorithm, and uses the calculated hash value as the node identifier thereof. Meanwhile, the association relationship between the connection information and the node identifier of the mobile phone is deleted, and the association identifier is set to be 0, so that the release of the association relationship is completed. Optionally, the PC may further send a prompt message of "association relation released" to the mobile phone, and the mobile phone displays the prompt message.
It should be noted that the function of the IP node is implemented by the data transmission device based on the setting of the IP node.
Further, based on the first or second embodiment, a fourth embodiment of the data transmission device of the present invention is proposed, which corresponds to the fourth embodiment of the data transmission method, in this embodiment, the data transmission device further includes:
and the updating module is used for updating the connection information of the Ad Hoc node which is stored by the IP node and transmits the connection information when the connection information transmitted by any Ad Hoc node in the Ad Hoc network is received.
It should be noted that, since the Ad Hoc network is dynamically changed, in order to implement normal transmission of service data, in this embodiment, on the basis of the foregoing embodiment, an update operation of connection information of an Ad Hoc node is further added, and only this difference is described below, and other details may refer to the foregoing embodiment, and are not described here again.
In this embodiment, when accessing the Ad Hoc convergence communication system applied in the present invention, the Ad Hoc node automatically allocates an IP address (IP address allocation can be performed with reference to the existing Ad Hoc technology), and broadcasts an online notification. Specifically, when the Ad Hoc node is a mobile phone, the online notification broadcast by the Ad Hoc node includes its mobile phone number, MAC address, IP address, and node identifier. The MAC address and the IP address of the Ad Hoc node are connection information thereof, the MAC address is specifically two-layer connection information, and the IP address is specifically three-layer connection information.
When the IP node receives an online notification broadcasted by the Ad Hoc node, the updating module analyzes the connection information in the online notification, and updates the connection information associated with the same node identification stored in the IP node into the analyzed connection information according to the node identification carried by the online notification, wherein the connection information comprises the updating of the MAC address and the IP address.
In addition, when the IP node is accessed into the Ad Hoc fusion communication system applied by the invention, the IP address is automatically allocated, wherein, because the IP node is accessed into the IP network and the Ad Hoc network simultaneously, the IP address is allocated for the network card of the IP node accessed into the Ad Hoc network by default. And the updating module simultaneously broadcasts the online notification of the IP node. Specifically, when the IP node is a PC, the broadcasted online notification of the IP node includes a host name, an IP address, a MAC address, a node identifier, a terminal type, and the like.
Alternatively, the IP node and each Ad Hoc node periodically broadcast their connection information.
Optionally, the IP node and the Ad Hoc node broadcast the offline notification before leaving the accessed Ad Hoc convergence communication system.
Further, in this embodiment, both the IP node and the Ad Hoc node are provided with a buddy list for displaying when needed. When the Ad Hoc node is a mobile phone, the friend list of the IP node comprises the mobile phone number, the MAC address and the like of each Ad Hoc node in the Ad Hoc fusion communication system; when the IP node is a PC, the buddy list of the Ad Hoc node includes the hostname and MAC address of the IP node.
Optionally, when the IP node receives an offline notification broadcasted by the Ad Hoc node, the update module deletes a relevant entry of the Ad Hoc node broadcasting the offline notification in the buddy list of the IP node.
When receiving the offline notification broadcast by other Ad Hoc nodes or IP nodes, the Ad Hoc node deletes the relevant entries of the other Ad Hoc nodes or IP nodes broadcasting the offline notification in the friend list of the Ad Hoc node.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A data transmission method, characterized in that the data transmission method comprises:
when detecting that an IP node simultaneously accessed to an IP network and an Ad Hoc network receives service data, a data transmission device extracts a node identifier of a target node carried by the service data and determines whether the IP node is the target node of the service data;
when the IP node is determined not to be the destination node of the service data, the data transmission device acquires first connection information of the destination node based on the association information of the node identifier and the connection information stored by the IP node, and forwards the service data to the destination node based on the Ad Hoc network according to the first connection information;
when the IP node is determined to be the destination node of the service data, the data transmission device acquires second connection information of the Ad Hoc node associated with the stored IP node, and transmits the service data to the Ad Hoc node associated with the IP node based on the Ad Hoc network according to the second connection information.
2. The data transmission method according to claim 1, wherein the step of extracting the node identifier of the destination node carried by the service data further comprises:
when an IP node receives service data, extracting a node identifier of a source node carried by the service data;
and when the node identification of the source node is different from the node identification of the IP node, switching to the step of extracting the node identification of the destination node carried by the service data.
3. The data transmission method according to claim 2, wherein after the step of extracting the node identifier of the source node carried by the service data when the IP node receives the service data, the method further comprises:
and when the node identification of the source node is the same as the node identification of the IP node, discarding the service data.
4. The data transmission method according to any one of claims 1 to 3, wherein, after the step of transmitting the traffic data to the associated Ad Hoc node based on the Ad Hoc network according to the connection information, the method further comprises:
and deleting the association relation between the IP node and the associated Ad Hoc node when receiving a cancellation copy-sending instruction sent by the associated Ad Hoc node.
5. The data transmission method according to any one of claims 1 to 3, characterized in that the data transmission method further comprises:
and updating the connection information of the Ad Hoc node which is stored by the IP node and transmits the connection information when the connection information transmitted by any Ad Hoc node in the Ad Hoc network is received.
6. A data transmission apparatus, characterized in that the data transmission apparatus comprises:
the device comprises an extraction module, a service data acquisition module and a service data processing module, wherein the extraction module is used for extracting a node identifier of a target node carried by service data when detecting that the IP node simultaneously accessed to an IP network and an Ad Hoc network receives the service data, and determining whether the IP node is the target node of the service data;
the obtaining module is used for obtaining first connection information of the destination node based on the association information of the node identification and the connection information stored by the IP node when the IP node is determined not to be the destination node of the service data; when the IP node is determined to be the destination node of the service data, second connection information of the Ad Hoc node associated with the IP node is acquired;
and the copying module is used for forwarding the service data to a destination node based on the Ad Hoc network according to the first connection information, or transmitting the service data to the Ad Hoc node associated with the IP node based on the Ad Hoc network according to the second connection information.
7. The data transmission apparatus according to claim 6, wherein the extracting module is further configured to extract, when the IP node receives the service data, a node identifier of a source node carried by the service data; and the node identifier extraction module is further used for extracting the node identifier of the destination node carried by the service data when the node identifier of the source node is different from the node identifier of the IP node.
8. The data transmission apparatus according to claim 7, wherein the extracting module is further configured to discard the traffic data when the node identifier of the source node is the same as the node identifier of the IP node.
9. The data transmission apparatus according to any one of claims 6 to 8, wherein the data difference transmission apparatus further comprises:
and the deleting module is used for deleting the association relation between the IP node and the associated Ad Hoc node when receiving a cancellation copy instruction sent by the associated Ad Hoc node.
10. The data transmission apparatus according to any one of claims 6 to 8, characterized in that the data transmission apparatus further comprises:
and the updating module is used for updating the connection information of the Ad Hoc node which is stored by the IP node and transmits the connection information when the connection information transmitted by any Ad Hoc node in the Ad Hoc network is received.
CN201610575004.1A 2016-07-19 2016-07-19 Data transmission method and device Active CN107634896B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610575004.1A CN107634896B (en) 2016-07-19 2016-07-19 Data transmission method and device
PCT/CN2017/090642 WO2018014708A1 (en) 2016-07-19 2017-06-28 Data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610575004.1A CN107634896B (en) 2016-07-19 2016-07-19 Data transmission method and device

Publications (2)

Publication Number Publication Date
CN107634896A CN107634896A (en) 2018-01-26
CN107634896B true CN107634896B (en) 2021-08-03

Family

ID=60992955

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610575004.1A Active CN107634896B (en) 2016-07-19 2016-07-19 Data transmission method and device

Country Status (2)

Country Link
CN (1) CN107634896B (en)
WO (1) WO2018014708A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112232639B (en) * 2020-09-22 2023-06-30 支付宝(杭州)信息技术有限公司 Statistical method, statistical device and electronic equipment
CN112601215A (en) * 2020-12-01 2021-04-02 深圳市和讯华谷信息技术有限公司 Method and device for unifying equipment identifications

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101588293A (en) * 2009-04-24 2009-11-25 常熟理工学院 Full IP communication interconnection system of Ad Hoc network and IPv6 network
CN102215378A (en) * 2010-04-12 2011-10-12 江苏联优信息科技有限公司 Multimedia sensing network system capable of realizing dynamic networking
CN102905339A (en) * 2012-10-19 2013-01-30 南京邮电大学 Peer query method for JXTA (juxtapose) overlay network based on mobile ad-hoc network (MANET)
US8732801B2 (en) * 2011-12-09 2014-05-20 Verizon Patent And Licensing Inc. Wireless connection method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102004023302B4 (en) * 2004-05-11 2006-05-18 Fujitsu Siemens Computers Gmbh Screen image transmission procedure uses ad hoc wireless network with static IP address and multicast capability to transmit compressed data units

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101588293A (en) * 2009-04-24 2009-11-25 常熟理工学院 Full IP communication interconnection system of Ad Hoc network and IPv6 network
CN102215378A (en) * 2010-04-12 2011-10-12 江苏联优信息科技有限公司 Multimedia sensing network system capable of realizing dynamic networking
US8732801B2 (en) * 2011-12-09 2014-05-20 Verizon Patent And Licensing Inc. Wireless connection method and device
CN102905339A (en) * 2012-10-19 2013-01-30 南京邮电大学 Peer query method for JXTA (juxtapose) overlay network based on mobile ad-hoc network (MANET)

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WiFi共享网络让安卓移动设备通过Ad-Hoc上网;非火流凡;《电脑迷》;20111001;第78页 *
图解笔记本电脑"变形"WiFi"节点——图解手机WiFi Ad-Hoc连接;zy;《电脑爱好者(普及版)》;20101101;第76-78页 *

Also Published As

Publication number Publication date
WO2018014708A1 (en) 2018-01-25
CN107634896A (en) 2018-01-26

Similar Documents

Publication Publication Date Title
US10136363B2 (en) Facilitation of mobility management across various radio technologies
CN109842906B (en) Communication method, device and system
CN109716826B (en) Access method, network equipment, terminal equipment and AMF (advanced metering framework) equipment
CN104767679B (en) A kind of method and device for transmitting data in network system
US9781579B2 (en) Method and device for realizing terminal WIFI talkback
US20180048633A1 (en) Perception-free authentication method and system, and control method and system based on the same
US10021512B2 (en) Switching to advertising locator after connection establishment
US20140355589A1 (en) Feedback method for active scanning of user terminal, and access point
KR102060434B1 (en) Apparatus and method for providing a wireless communication in a portable terminal
CN104270302B (en) The transmission system of online order and transfer approach
CN111263338A (en) Network distribution method of Bluetooth Mesh network and related network distribution equipment and system
CN105681260A (en) Cloud storage file transmission method, fusion communication platform, sending end and system
CN105451368B (en) Communication method and device
CN108781217B (en) Multimedia data transmission method, server and terminal
CN107634896B (en) Data transmission method and device
CN103139041A (en) Method for filtering information and method, device and system for processing forwarded information
US10097593B2 (en) Method and system for universal chat gateways
CN108199964B (en) Transmission method, terminal, server and computer readable storage medium
CN111194098B (en) Link establishment method, device, communication system and computer readable medium
CN108495299B (en) Method and device for receiving service information and multimode terminal
KR101990584B1 (en) Apparatus for managing user information in ptt system and method for updating user information in real time using the apparatus
CN111615219A (en) PC5 link establishing method, equipment and system
WO2022206662A1 (en) Method and apparatus for determining establishment of relay pdu session, and user equipment
US9451420B2 (en) Data processing method, in an ad hoc radio communication network, radio communication stations and corresponding computer programs
US20240113970A1 (en) Network path determining method and apparatus, communication device and storage medium

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