CN109936603B - Non-direct connection network communication method based on HTTP - Google Patents
Non-direct connection network communication method based on HTTP Download PDFInfo
- Publication number
- CN109936603B CN109936603B CN201711362341.3A CN201711362341A CN109936603B CN 109936603 B CN109936603 B CN 109936603B CN 201711362341 A CN201711362341 A CN 201711362341A CN 109936603 B CN109936603 B CN 109936603B
- Authority
- CN
- China
- Prior art keywords
- node
- network
- data
- direct
- connection
- 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
Links
Images
Landscapes
- Mobile Radio Communication Systems (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a non-direct connection network communication method based on HTTP, which is characterized in that a data demand node on a mobile terminal sends out a data demand, a connection is established by using an HTTP protocol, a historical fastest communication distance is calculated through communication history, the communication history is sent to a first node on the path, the first node carries out proxy forwarding, and proxy forwarding is carried out in sequence; the Websocket is used for carrying out whole-network broadcasting, and the target nodes are required to be actively connected; the data P2P connection and transmission are established by the mobile terminal in a network-crossing way, a network-crossing way and a regional network-crossing way, and the application of the block chain technology on the mobile terminal is realized.
Description
Technical Field
The invention belongs to the field of network communication, and particularly relates to a non-direct connection network communication method based on HTTP.
Background
With the emergence of bit coins, the blockchain technology is increasingly recognized, at present, the blockchain is already well applied to the PC side, but it is still difficult for the mobile side to implement the data transmission of P2P, the main problem is that networks and network segments located between mobile phone nodes of the mobile side are different, but the network connection method of the currently used blockchain of the mobile side cannot implement the communication of cross-network segment, cross-network and cross-area network, which will greatly limit the development of the blockchain technology in the mobile side.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a non-direct network communication method based on HTTP, which can establish P2P connection at a mobile end across network segments, networks and regional networks, so that a blockchain technique can be better applied to the mobile end.
In order to solve the technical problems, the technical solution of the invention is as follows:
a non-direct connection network communication method based on HTTP includes the following steps:
(1) a data demand node on the mobile terminal sends out a data demand and establishes connection;
(2) acquiring an available network node list from other nodes, and adding each network node to the network node list when discovering a new network node;
(3) when the target node and the data demand node cannot directly communicate, searching whether the target node and the data demand node have a directly connectable path or not;
(4) if the direct-connectable path exists, sending the direct-connectable path to a node on the direct-connected path for proxy communication, if the direct-connectable path does not exist, calculating a historical fastest communication distance according to a communication history record, sending the historical fastest communication distance to a first node on the path, carrying out proxy forwarding by the first node, and carrying out proxy forwarding in sequence;
(5) if the communication path to the target node cannot be calculated in the communication history, the Websocket is used for carrying out whole-network broadcasting to require the target node to be actively connected;
(6) if no broadcast response is received in a block period, the target node is considered to be disconnected, the data is returned to the data demand node, and the data without demand is fed back.
Further, when the connection is established in the step (1), the HTTP is utilized to establish the connection with other network nodes
Further, in the whole network broadcasting process in the step (5), if a node has a connection with the target node, a notification is received and a proxy connection is established.
Further, in the step (5), the target node is required to be actively connected to the data demand node in a websocket mode when the target node is in the closed intranet.
Further, the network node in step (2) is a mobile network node, and the network node list is a distributed hash table.
Further, after the first node agent forwards the data request to the target node in step (4), the data is transmitted to the data request node.
Furthermore, a plurality of transmission nodes are arranged at the downstream of the full-network broadcasting mode and are responsible for transmitting data requirements.
Further, the transmission node may allocate different bandwidths according to the data format.
The beneficial effects of the invention are:
the difficult problems of establishing data P2P connection and transmission by a mobile terminal in a cross-network segment, cross-network and cross-regional network mode are solved through a non-direct connection mode after the access of an http protocol, and the application of a block chain technology on the mobile terminal is realized.
Drawings
FIG. 1 is a network flow diagram of the present invention;
FIG. 2 is a flow chart of the broadcasting method of step (5) of the present invention;
FIG. 3 is a schematic diagram of a transmitting node in step (5) of the present invention
FIG. 4 is a code diagram of the step (1) of establishing a connection protocol according to the present invention.
Detailed Description
The invention is described in further detail below with reference to the figures and specific examples. It should be noted that the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
As shown in fig. 1, a non-direct connection network communication method based on HTTP includes the following steps:
(1) the mobile terminal node sends out a data demand and establishes connection; when the connection is established, the HTTP protocol is utilized to establish connection with other network nodes, and as shown in FIG. 4, the HTTP protocol is firstly called to find other network nodes when the connection is established;
(2) acquiring an available network node list from other nodes, and adding each network node to the network node list when discovering a new network node;
(3) when the target node and the data demand node cannot directly communicate, searching whether the target node and the data demand node have a directly connectable path or not;
(4) if the direct-connectable path exists, sending the direct-connectable path to a node on the direct-connected path for proxy communication, if the direct-connectable path does not exist, calculating a historical fastest communication distance according to a communication history record, sending the historical fastest communication distance to a first node on the path, carrying out proxy forwarding by the first node, and carrying out proxy forwarding in sequence;
(5) if the communication path to the target node cannot be calculated in the communication history, the Websocket is used for carrying out whole-network broadcasting to require the target node to be actively connected; as shown in fig. 2, in the whole network broadcasting process, if there is a node that has an over-connection with the target node, a notification is received and a proxy connection is established, and then the intermediate node is responsible for transmitting data communication between the target node and the data demand node, and if the target node is in a closed intranet and requires the target node to actively connect to the data demand node through websocket, as shown in fig. 3, the whole network broadcasting mode is that many downstream transmission nodes are responsible for spreading data demands, and the transmission nodes allocate different bandwidths according to the data modes.
(6) If no broadcast response is received in a block period, the target node is considered to be disconnected, a data demand node is returned, and no demanded data is fed back.
The specific process of the invention is as follows:
when the data demand node of the mobile terminal needs the P2P data under the blockchain, the data demand node on the mobile terminal sends out the data demand, establishes connection with other network nodes by using the HTTP protocol, as shown in fig. 4, when establishing the connection, the http protocol is first called to find other network nodes, and after finding other nodes, the data requiring node acquires the available network node list from other nodes, each network node adds the discovered new network node to the network node list, if the target node is found in the network node lists and the target node can directly communicate with the data demand node, the data transmission is carried out by directly establishing connection between the target node and the data demand node, if the target node and the data demand node can not be directly communicated, searching whether the target node and the data demand node have a directly-connectable path or not; if the direct-connectable path exists, the direct-connectable path is sent to the node on the direct-connected path, the node on the path carries out proxy communication, if the direct-connectable path does not exist, the historical fastest communication distance is calculated according to the communication history record, the communication distance is sent to the first node on the path, proxy forwarding is carried out on the first node, proxy forwarding is carried out in sequence, and the first node can transmit data to the data demand node after proxy forwarding of the data demand to the target node. If the communication path to the target node cannot be calculated in the communication history, the Websocket is used for carrying out whole-network broadcasting to require the target node to be actively connected; as shown in fig. 2, in the process of the whole network broadcasting, if there is a node connected to the target node, the intermediate node is responsible for transmitting the data communication between the target node and the data demand node after receiving the notification and establishing the proxy connection, and if the target node is in the closed intranet, for example, in an intranet of an enterprise, the target node is required to be actively connected to the data demand node through the websocket, as shown in fig. 3, the form of network-wide broadcasting is to utilize many downstream transmission nodes to be responsible for spreading data requirements, these transmission nodes may allocate different bandwidths according to the data format, for example, when the transmitted data is video, high bandwidth may be allocated, therefore, data transmission is faster and more convenient, and if the data to be transmitted is audio or characters, lower bandwidth is allocated, so that data transmission can be realized more quickly, and resource waste is avoided. If no broadcast response is received in a block period, the target node is considered to be disconnected, a data demand node is returned, no data is demanded, and the data demand node of the mobile terminal is told that the data demand node cannot find the required data. The invention solves the difficult problems of establishing data P2P connection and transmission by the mobile terminal in a network-crossing way, a network-crossing way and a regional network, and realizes the application of the block chain technology on the mobile terminal.
The above-mentioned embodiments are only preferred embodiments of the present invention, and do not limit the technical scope of the present invention, so that the changes and modifications made by the claims and the specification of the present invention should fall within the scope of the present invention.
Claims (8)
1. A non-direct connection network communication method based on HTTP includes the following steps:
a data demand node on the mobile terminal sends out a data demand and establishes connection; when the data demand node of the mobile terminal needs the P2P data under the blockchain, the data demand node on the mobile terminal sends out a data demand, and the data demand node is connected with other network nodes by using an HTTP (hyper text transport protocol);
acquiring an available network node list from other nodes, and adding each network node to the network node list when discovering a new network node;
when the target node and the data demand node cannot directly communicate, searching whether the target node and the data demand node have a directly connectable path or not;
if the direct-connectable path exists, sending the direct-connectable path to a node on the direct-connected path for proxy communication, if the direct-connectable path does not exist, calculating a historical fastest communication distance according to a communication history record, sending the historical fastest communication distance to a first node on the path, carrying out proxy forwarding by the first node, and carrying out proxy forwarding in sequence;
if the communication path to the target node cannot be calculated in the communication history, the Websocket is used for carrying out whole-network broadcasting to require the target node to be actively connected;
if no broadcast response is received in a block period, the target node is considered to be disconnected, the data is returned to the data demand node, and the data without demand is fed back.
2. The HTTP-based non-direct network communication method according to claim 1, wherein the connection establishment in the step (1) is performed by using an HTTP protocol to establish a connection with another network node.
3. The method according to claim 1, wherein in the step (5), if there is a node with which the target node has an over-connection during the network-wide broadcast, a notification is received and a proxy connection is established.
4. The method according to claim 1, wherein in step (5), the target node is required to be actively connected to the data demand node in a websocket manner when the target node is in the closed intranet.
5. The HTTP-based non-direct network communication method according to claim 1, wherein the network node in the step (2) is a mobile network node.
6. The method according to claim 1, wherein the first node agent in step (4) transmits the data to the data-requiring node after forwarding the data requirement to the target node.
7. The method as claimed in claim 4, wherein a plurality of transmission nodes downstream of the full-network broadcast are responsible for propagating data requirements.
8. The method as claimed in claim 7, wherein the transfer node allocates different bandwidths according to data types.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711362341.3A CN109936603B (en) | 2017-12-18 | 2017-12-18 | Non-direct connection network communication method based on HTTP |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711362341.3A CN109936603B (en) | 2017-12-18 | 2017-12-18 | Non-direct connection network communication method based on HTTP |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109936603A CN109936603A (en) | 2019-06-25 |
CN109936603B true CN109936603B (en) | 2022-07-01 |
Family
ID=66982233
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711362341.3A Active CN109936603B (en) | 2017-12-18 | 2017-12-18 | Non-direct connection network communication method based on HTTP |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109936603B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112492053B (en) * | 2019-08-20 | 2023-04-07 | 本无链科技(深圳)有限公司 | Cross-network penetration method and system for P2P network |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1878118A (en) * | 2005-06-06 | 2006-12-13 | 腾讯科技(深圳)有限公司 | System for realizing data communication and its method |
CN101079783A (en) * | 2006-05-27 | 2007-11-28 | 腾讯科技(深圳)有限公司 | A method for establishing P2P channel in P2P network |
CN101663859A (en) * | 2006-12-14 | 2010-03-03 | 北方电讯网络有限公司 | Method and apparatus for exchanging routing information and the establishment of connectivity across multiple network areas |
CN101867973A (en) * | 2010-06-25 | 2010-10-20 | 陶洋 | Multidimensional network and data transmission method thereof |
CN102123100A (en) * | 2008-02-05 | 2011-07-13 | 华为技术有限公司 | Method and device for maintaining routing information |
WO2013053252A1 (en) * | 2011-10-10 | 2013-04-18 | 中兴通讯股份有限公司 | Method and apparatus for processing network overload |
CN103200642A (en) * | 2013-04-12 | 2013-07-10 | 电子科技大学 | Optimization method for wireless mobile network route selection |
CN105282161A (en) * | 2015-10-23 | 2016-01-27 | 绵阳师范学院 | Point-to-point anonymous communication method based on random stateless address distributing policies in IPv6 network |
CN105516002A (en) * | 2015-12-07 | 2016-04-20 | 百度在线网络技术(北京)有限公司 | Data transmitting method and device |
CN105656771A (en) * | 2014-11-12 | 2016-06-08 | 中国移动通信集团公司 | Service path determining method, device and system |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101715201B (en) * | 2009-11-12 | 2012-05-30 | 北京邮电大学 | Method for acquiring information by sink node in wireless sensor network when moving |
US20160086175A1 (en) * | 2014-09-22 | 2016-03-24 | Qualcomm Incorporated | Peer-to-peer transaction system |
-
2017
- 2017-12-18 CN CN201711362341.3A patent/CN109936603B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1878118A (en) * | 2005-06-06 | 2006-12-13 | 腾讯科技(深圳)有限公司 | System for realizing data communication and its method |
CN101079783A (en) * | 2006-05-27 | 2007-11-28 | 腾讯科技(深圳)有限公司 | A method for establishing P2P channel in P2P network |
CN101663859A (en) * | 2006-12-14 | 2010-03-03 | 北方电讯网络有限公司 | Method and apparatus for exchanging routing information and the establishment of connectivity across multiple network areas |
CN102123100A (en) * | 2008-02-05 | 2011-07-13 | 华为技术有限公司 | Method and device for maintaining routing information |
CN101867973A (en) * | 2010-06-25 | 2010-10-20 | 陶洋 | Multidimensional network and data transmission method thereof |
WO2013053252A1 (en) * | 2011-10-10 | 2013-04-18 | 中兴通讯股份有限公司 | Method and apparatus for processing network overload |
CN103200642A (en) * | 2013-04-12 | 2013-07-10 | 电子科技大学 | Optimization method for wireless mobile network route selection |
CN105656771A (en) * | 2014-11-12 | 2016-06-08 | 中国移动通信集团公司 | Service path determining method, device and system |
CN105282161A (en) * | 2015-10-23 | 2016-01-27 | 绵阳师范学院 | Point-to-point anonymous communication method based on random stateless address distributing policies in IPv6 network |
CN105516002A (en) * | 2015-12-07 | 2016-04-20 | 百度在线网络技术(北京)有限公司 | Data transmitting method and device |
Also Published As
Publication number | Publication date |
---|---|
CN109936603A (en) | 2019-06-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11329701B2 (en) | Master reference for base station network interface sourced from distributed antenna system | |
KR102519409B1 (en) | Method and Apparatus for Multipath Media Delivery | |
CN108028802B (en) | Construction of self-organizing mesh networks using 802.11AD technology | |
CN101068236B (en) | Streaming media bit rate control method, system and equipment | |
CN103166959B (en) | A kind of multipath real-time Transmission control system and method | |
CN109672708B (en) | Communication method, device and system | |
US8102846B2 (en) | Method and apparatus for managing a multicast tree using a multicast tree manager and a content server | |
CN113596191A (en) | Data processing method, network element equipment and readable storage medium | |
CN104158752A (en) | Method and device of processing business flow | |
CN113767680A (en) | Apparatus and method for supporting a burst arrival time reference clock based on time sensitive communication assistance information in a wireless communication network | |
CN101611589B (en) | Method and device for distributing a data segment of a data stream to a group of a plurality of users | |
CN103780483A (en) | Method, system and device for obtaining resource information of terminal device of Internet of Thingss | |
US10187926B2 (en) | Apparatus and method for setting up active networking of smart devices for providing converged service | |
CN105657040A (en) | Inter-device intranet communication method and system | |
CN104581685A (en) | Method and device for sending and receiving discovery signal | |
CN109936603B (en) | Non-direct connection network communication method based on HTTP | |
CN103069877A (en) | Apparatus and methods for inter-user equipment transfers | |
WO2015168908A1 (en) | Resource scheduling method, device and system | |
US20160088076A1 (en) | Method, device and system for obtaining mobile network data resources | |
CN105210347B (en) | Monitoring server, resolution server, request equipment and node selecting method | |
CN107689986B (en) | Data communication method of communication equipment in wireless self-organizing network, communication equipment and storage device | |
CN110474781B (en) | Method and device for forwarding multicast data | |
SG178407A1 (en) | Method and apparatus for constructing seed group in peer-to-peer application and method for using seed group | |
CN109495918B (en) | Data transmission method and device | |
JP4748094B2 (en) | Satellite communication method, slave station and master station |
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 | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20210326 Address after: Room 2201, 703c, Desai science and technology building, 9789 Shennan Avenue, high tech Zone community, Yuehai street, Nanshan District, Shenzhen, Guangdong 518000 Applicant after: Benchainless Technology (Shenzhen) Co.,Ltd. Address before: 361000 unit 21, 201, building B, 86 Haijing Road, Xiamen area, China (Fujian) pilot Free Trade Zone, Xiamen City, Fujian Province Applicant before: XIAMEN INSTINCT BLOCKCHAIN TECHNOLOGY Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |