WO2017000147A1 - 一种数据传输方法及装置、数据接收方法及装置 - Google Patents

一种数据传输方法及装置、数据接收方法及装置 Download PDF

Info

Publication number
WO2017000147A1
WO2017000147A1 PCT/CN2015/082731 CN2015082731W WO2017000147A1 WO 2017000147 A1 WO2017000147 A1 WO 2017000147A1 CN 2015082731 W CN2015082731 W CN 2015082731W WO 2017000147 A1 WO2017000147 A1 WO 2017000147A1
Authority
WO
WIPO (PCT)
Prior art keywords
data packet
local area
area network
data
receiving end
Prior art date
Application number
PCT/CN2015/082731
Other languages
English (en)
French (fr)
Inventor
杨新宇
张文锋
熊华丽
Original Assignee
深圳走天下科技有限公司
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 深圳走天下科技有限公司 filed Critical 深圳走天下科技有限公司
Priority to PCT/CN2015/082731 priority Critical patent/WO2017000147A1/zh
Publication of WO2017000147A1 publication Critical patent/WO2017000147A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/18Selecting a network or a communication service

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a data transmission method and apparatus, and a data receiving method and apparatus.
  • Wireless network is common to use a wireless router.
  • the wireless coverage of the wireless router can be wirelessly connected using a wireless fidelity connection. If the wireless router is connected to an ADSL line or another Internet line, then Known as a hot spot. Since the "hotspot" emits radio waves that can reach tens of meters to 100 meters from the access point, users can put a wireless-fidelity laptop or PDA or mobile phone or psp or ipodtouch into the area. , you can access the Internet at high speed.
  • the wireless fidelity signal is also provided by the wired network, such as ADSL in the home, broadband in the community (collectively referred to as the public network), etc., as long as a wireless router is connected, the wired signal can be converted into a wireless fidelity signal.
  • public network connections can become unstable.
  • WiFi hotspots established by mobile routing usually use 3G/4G to access the Internet, while 3G/4G Internet access is greatly affected by the environment and tends to become unstable. Especially in the wild, the stability of the public network is very poor.
  • the wireless network generated by the hotspot is also unable to communicate, which is very inconvenient for the user who travels.
  • the present invention provides a data transmission method and apparatus, a data receiving method and apparatus.
  • An embodiment of the present invention provides a data transmission method, including: connecting a local area network; broadcasting a first data packet with an identity identifier to a local area network, where the identity identifier includes network location information of the client; Receiving a second data packet from the local area network fed back by the receiving end, wherein the second data packet records an identity identifier carried by the first data packet, and if it is confirmed that the second data packet is received, Protocol, sending data to the receiving end through the local area network, Then, confirm that the first packet transmission failed.
  • Another embodiment of the present invention provides a data receiving method, including the steps of: receiving a data packet from a public network server or a local area network, wherein the data packet includes a unique identifier; and extracting a unique identifier in the data packet; Performing a search in a processed list of identifiers to confirm whether the data packet has been processed, and if so, discarding the data packet; otherwise, processing the data packet and adding a unique identifier in the data packet to the processed In the list of identities.
  • a further embodiment of the present invention provides a data transmission apparatus, including: a connection module, configured to connect to a local area network; and a broadcast module, configured to broadcast, to the local area network, a first data packet with an identity identifier, where the identity identifier includes The network location information of the data transmission device; the confirmation module is configured to check whether a second data packet from the local area network fed back by the receiving end is received, and the second data packet records the first data packet The identity identifier, if the confirmation module confirms that the second data packet is received, sending data to the receiving end through the local area network by using a specific protocol, and if it is confirmed that the second data packet is not received, Confirm that the first packet failed to be sent.
  • a further embodiment of the present invention provides a data receiving apparatus, including: a receiving module, configured to receive a data packet from a public network server or a local area network, wherein the data packet includes a unique identifier; and an extracting module, configured to extract the a unique identifier in the data packet; a retrieval module for retrieving from the processed one of the identification lists and confirming whether the data packet has been processed, and if so, discarding the data packet; otherwise, processing the data packet The package, and the unique identifier in the packet is added to the list of processed identifiers.
  • the data transmission method and device provided by the invention can realize data transmission by establishing an internal local area network in a public network communication environment, thereby avoiding the problem of data transmission failure due to instability of the public network and improving the stability of network data transmission. .
  • FIG. 1 is a schematic diagram of application of a data transmission method according to a first embodiment of the present invention
  • FIG. 2 is a flowchart of a data transmission method according to a first embodiment of the present invention
  • FIG. 3 is a flowchart of a data transmission method according to a second embodiment of the present invention.
  • FIG. 4 is a flowchart of a data receiving method according to an embodiment of the present invention.
  • FIG. 5 is a functional block diagram of a data transmission apparatus according to a first embodiment of the present invention.
  • FIG. 6 is a functional block diagram of a data transmission apparatus according to a second embodiment of the present invention.
  • FIG. 7 is a functional block diagram of a data receiving apparatus according to an embodiment of the present invention.
  • the first embodiment of the present invention provides a data transmission method for performing data transmission through a local area network set by a user when the communication quality of the public network is unstable.
  • the data transmission method can be used to support a wireless fidelity notebook computer, a tablet computer, a PDA, a mobile phone, a psp, an ipodtouch, and the like.
  • the data transmission method includes the following steps:
  • Step S101 establishing a local area network.
  • a WLAN local area network is established by the routing hotspot.
  • Step S102 the client connects to the local area network.
  • Step S103 The client sends a data packet to a public network server, where the public network server may be a network server such as 2G, 3G or 4G.
  • the public network server may be a network server such as 2G, 3G or 4G.
  • Step S104 checking whether the public network server receives the receipt of the data packet in the specific time period, and if yes, executing step S105, confirming that the data packet is successfully sent, and causing the public network server to use the data. The packet is forwarded to the receiving end. Otherwise, step S106 is executed to determine that the data packet fails to be transmitted on the public network, and a data packet with an identity identifier is broadcasted to the local area network, where the identity identifier includes network location information of the client.
  • Step S107 it is checked whether a data packet from the local area network fed back by the receiving end is received, and the identity identifier carried in the sent data packet is recorded in the data packet, and if it is confirmed that the data packet is received, step S108 is performed, A data packet is sent to the receiving end in the local area network. If the data packet from the local area network fed back by the receiving end is not received, step S109 is performed to confirm that the data packet transmission fails.
  • step S110 is performed to check whether the connection is received within a period of time.
  • Receiving, by the receiving end, the receipt of the data packet if receiving the receipt of the data packet by the receiving end, performing step S111, confirming that the data packet is successfully sent, and continuing to the receiving end through the local area network by using a specific protocol. send data.
  • step S112 is performed to determine whether the number of times the data packet is sent to the receiving end exceeds a preset value. If not, the process returns to step S108 to continue to the local area network. The data packet sent by the receiving end is described. Otherwise, step S113 is performed to confirm that the data packet transmission fails.
  • the method before the step S108, the method further includes the step S108: recording the identity of the client carried in the data packet, and simultaneously broadcasting the identity of the user to the local area network in a loop.
  • steps S101, S103 to S105, and the like may be omitted.
  • the data transmission method of the first embodiment of the present invention it is first confirmed whether data transmission can be performed through a public network server, and if data transmission cannot be performed through a public network server, data transmission is performed by establishing a local area network, thereby avoiding instability due to the public network.
  • the problem of data transmission failure has improved the stability of network data transmission.
  • the second embodiment of the present invention further provides a data transmission method, which is basically the same as the data transmission method provided by the first embodiment, except that the data transmission method adds a unique identifier to the data packet.
  • the data is transmitted to the local area network and the public network server at the same time. When at least one of the local area network and the public network server can perform data transmission, the data transmission stability can be ensured.
  • the data transmission method provided by the second embodiment includes the following steps:
  • a local area network is established.
  • a WLAN local area network is established by the routing hotspot.
  • Step S202 the client connects to the local area network.
  • Step S203 adding a unique identifier to the data packet to be sent.
  • Step S204 Send the data packet to at least one public network server while broadcasting the data packet to the local area network.
  • step S205 it is checked whether the data packet fed back by the receiving end is received in a specific time period. If yes, step S206 is performed to send a data packet to the receiving end through the local area network. Otherwise, step S207 is performed to abandon the local area network. Data transfer.
  • Step S208 After transmitting the data packet to the receiving end through the local area network, check whether the public network server or the receiving end receives the receipt of the data packet in a specific time period, if received back If yes, step S209 is performed to confirm that the data packet is successfully sent, and the public network server forwards the data packet to the receiving end. Otherwise, step S210 is performed to determine whether the number of times the data packet is repeatedly sent to the network server or the receiving end exceeds a preset value. If not, the process returns to step S205 to continue to check whether the data packet from the local area network fed back by the receiving end is received. And returning to step S204 to continue transmitting the data packet to the public network server. Otherwise, step S211 is performed to confirm that the data packet transmission has failed.
  • the data transmission method of the second embodiment of the present invention can simultaneously confirm data transmission through a public network server or a local area network, and when the public network is unstable, data can be transmitted through the local area network, thereby avoiding data caused by instability of the public network.
  • the problem of transmission failure improves the stability of network data transmission.
  • the above data transmission method is used when traveling, and it is very convenient for the user to perform network communication. For example, when a tour group travels to a remote field, it cannot connect to the public network. At this time, by establishing the above-mentioned local area network, it can communicate with other client users within a specific communication range (for example, 100 meters), thereby ensuring at least A small range of network communication and data transmission.
  • a specific communication range for example, 100 meters
  • the present invention further provides a data receiving method.
  • the data receiving method includes the following steps:
  • Step S301 Receive a data packet from the public network server or a local area network, where the data packet includes the unique identifier.
  • Step S302 extracting the unique identifier in the data packet.
  • Step S303 performing a search from the processed one of the identification lists to confirm whether the data packet has been processed. If yes, executing step S304, discarding the data packet, otherwise performing step S305, processing the data packet, and Add the unique ID in the packet to the list of processed IDs. Thereby, it is possible to prevent the data packet from being repeatedly processed.
  • the present invention further provides a data transmission device 400.
  • the data transmission device 400 includes a connection module 410, a broadcast module 420, and a confirmation module 430.
  • the connection module 410 is configured to connect to a local area network.
  • the broadcast module 420 is configured to broadcast an identifierd data packet to the local area network, where the identity identifier includes network location information of a client.
  • the broadcast module 420 is further configured to send a data packet to a public network server before broadcasting the data packet with the identity identifier to the local area network.
  • the confirmation module 430 is configured to check whether data received from a local area network is received by a receiving end. a packet, wherein the data packet records an identity identifier carried in the sent data packet, and if the confirmation module 430 confirms that the data packet is received, sends the data packet to the receiving end through the local area network by using a specific protocol. Data, if it is confirmed that the packet is not received, it is confirmed that the packet transmission failed.
  • the confirmation module 430 is further configured to check whether the public network server receives the receipt of the data packet in a specific time period, and if yes, confirm that the data packet is successfully sent, and the public The network server forwards the data packet to the receiving end. Otherwise, it determines that the data packet fails to be transmitted on the public network, and starts broadcasting the identity-identified data packet to the local area network.
  • the difference between the data transmission device 500 provided by the second embodiment of the present invention and the data transmission device 400 of the first embodiment is:
  • the data transmission device 500 further includes an identification module 540 for adding a unique identifier to the data packet to be transmitted.
  • the broadcast module 520 is further configured to send the data packet to at least one public network server while broadcasting the data packet to the local area network.
  • the confirmation module 530 is further configured to: check whether the public network server or the receipt sent back by the receiving end for the data packet is received within a specific time period, and if the receipt is received, confirm that the data packet is successfully sent, otherwise, continue Checking whether the second data packet from the local area network fed back by the receiving end is received, and the data packet is continuously sent to the public network server.
  • the present invention provides a data receiving apparatus 600 corresponding to the data transmission apparatus 500 provided by the second embodiment of the present invention.
  • the data receiving device 600 includes a receiving module 610, an extracting module 620, and a retrieving module 630.
  • the receiving module 610 is configured to receive a data packet from a public network server or a local area network, where the data packet includes the unique identifier.
  • the extraction module 620 is configured to retrieve a unique identifier in the data packet.
  • the retrieval module 630 is configured to perform a retrieval from the processed one of the identification lists, and confirm whether the data packet has been processed, and if so, discard the data packet; otherwise, process the data packet, and process the data packet
  • the unique ID in the package is added to the list of processed IDs.
  • the public network when the public network is unstable, data transmission can be performed through the local area network, thereby avoiding the problem of data transmission failure due to instability of the public network, and improving the stability of network data transmission.
  • the above data transmission method is used when traveling, which is very convenient for the user to carry out.
  • Telecommunication For example, when a tour group travels to a remote field, it cannot connect to the public network. At this time, by establishing the above-mentioned local area network, it can communicate with other client users within a specific communication range (for example, 100 meters), thereby ensuring at least A small range of network communication and stable data transmission.

Abstract

本发明公开一种数据传输方法,包括:连接局域网;向局域网中广播一个带身份标识的第一数据包,所述身份标识中包含客户端所处的网络位置信息;查看是否接收到一接收端反馈的来自局域网的第二数据包,所述第二数据包中记录所述第一数据包所携带的身份标识,如果确认接收到所述第二数据包,则以特定的协议,通过所述局域网向所述接收端发送数据,否则,确认第一数据包发送失败。本发明还提供一种数据接收方法、数据传输装置以及数据接收装置。

Description

一种数据传输方法及装置、数据接收方法及装置 技术领域
本发明涉及通信技术领域,尤其涉及一种数据传输方法及装置、数据接收方法及装置。
背景技术
无线网络(Wi-Fi)常见的是使用无线路由器,在无线路由器的电波覆盖的有效范围都可以采用无线保真连接方式进行联网,如果无线路由器连接了一条ADSL线路或者别的上网线路,则又被称为热点。由于“热点”所发射出的电波可以达到距接入点半径数十米至100米的地方,用户只要将支持无线保真的笔记本电脑或PDA或手机或psp或ipodtouch等放到所述区域内,即可高速接入因特网。
但是,无线保真信号也是由有线网提供的,比如家里的ADSL、小区宽带(统称为公网)等,只要接一个无线路由器,就可以把有线信号转换成无线保真信号。但是,在某些场景中,公网连接会变得不稳定。比如,由移动路由建立的WiFi热点通常使用3G/4G来上网,而3G/4G上网受环境影响很大,容易变得不稳定,尤其是在荒郊野外的时候,公网稳定性非常差,使得通过热点产生的无线网络也无法通信,对于外出旅游的用户来说,非常不便。
发明内容
为了解决上述问题,本发明提供一种数据传输方法及装置、数据接收方法及装置。
本发明一实施例提供本发明公开一种数据传输方法,包括:连接局域网;向局域网中广播一个带身份标识的第一数据包,所述身份标识中包含客户端所处的网络位置信息;查看是否接收到一接收端反馈的来自局域网的第二数据包,所述第二数据包中记录所述第一数据包所携带的身份标识,如果确认接收到所述第二数据包,则以特定的协议,通过所述局域网向所述接收端发送数据,否 则,确认第一数据包发送失败。
本发明另一实施例提供一种数据接收方法,包括以下步骤:接收来自公网服务器或局域网的一个数据包,其中所述数据包包含一个唯一标识;取出所述数据包中的唯一标识;从处理过的一个标识列表中进行检索,确认所述数据包是否被处理过,如果是,则丢弃所述数据包,否则,处理所述数据包,并将数据包中的唯一标识加入到已处理的标识列表中。
本发明又一实施例提供一种数据传输装置,包括:连接模块,用于连接局域网;广播模块,用于向所述局域网中广播一个带身份标识的第一数据包,所述身份标识中包含所述数据传输装置所处的网络位置信息;确认模块,用于查看是否接收到一接收端反馈的来自局域网的第二数据包,所述第二数据包中记录所述第一数据包所携带的身份标识,如果所述确认模块确认接收到所述第二数据包,则以特定的协议,通过所述局域网向所述接收端发送数据,如果确认未接收到所述第二数据包,则确认第一数据包发送失败。
本发明再一实施例提供一种数据接收装置,包括:接收模块,用于接收来自公网服务器或局域网的一个数据包,其中所述数据包包含一个唯一标识;提取模块,用于取出所述数据包中的唯一标识;检索模块,用于从处理过的一个标识列表中进行检索,并确认所述数据包是否被处理过,如果是,则丢弃所述数据包,否则,处理所述数据包,并将数据包中的唯一标识加入到已处理的标识列表中。
本发明提供的数据传输方法以及装置,在无公网通信环境下,通过建立内部局域网进行数据传输,从而能够避免因公网不稳定而导致数据传输失败的问题,提高了网络数据传输的稳定性。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本发明第一实施例提供的数据传输方法的应用示意图;
图2为本发明第一实施例提供的数据传输方法的流程图;
图3为本发明第二实施例提供的数据传输方法的流程图;
图4为本发明实施例提供的数据接收方法的流程图;
图5为本发明第一实施例提供的数据传输装置的功能模块图;
图6为本发明第二实施例提供的数据传输装置的功能模块图;
图7为本发明实施例提供的数据接收装置的功能模块图。
具体实施方式
下面结合附图和具体实施方式对本发明的技术方案作进一步更详细的描述。显然,所描述的实施例仅仅是本发明的一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动的前提下所获得的所有其他实施例,都应属于本发明保护的范围。
如图1、图2所示,本发明第一实施例提供一种数据传输方法,用于在公网通信质量不稳定的情况下,通过用户另外设置的局域网进行数据传输。本实施例中,所述数据传输方法可用于支持无线保真的笔记本电脑、平板电脑、PDA、手机、psp、ipodtouch等客户端设备中。
本实施例中,所述数据传输方法包括以下步骤:
步骤S101,建立局域网。本实施例中,由路由热点建立一Wifi局域网。
步骤S102,客户端连接所述局域网。
步骤S103,客户端向一个公网服务器发送数据包,所述公网服务器可以是2G、3G或4G等网络服务器。
步骤S104,在特定时间段内查看是否接收到所述公网服务器对于所述数据包的回执,如果是,则执行步骤S105,确认数据包发送成功,且使所述公网服务器将所述数据包转发给所述接收端。否则,执行步骤S106,判定数据包在公网传输失败,并向局域网中广播一个带身份标识的数据包,所述身份标识中包含客户端所处的网络位置信息。
步骤S107,查看是否接收到一接收端反馈的来自局域网的数据包,所述数据包中记录所发送的数据包中携带的身份标识,如果确认接收到所述数据包,则执行步骤S108,在局域网内向所述接收端发送数据包。如果未接收到接收端反馈的来自局域网的数据包,则执行步骤S109,确认数据包发送失败。
在所述步骤S108之后,执行步骤S110,在一段时间内查看是否收到所述接 收端对于所述数据包的回执,如果接收到所述接收端对于所述数据包的回执,则执行步骤S111,确认数据包发送成功,并以特定的协议,通过所述局域网向接收端连续发送数据。如果未接收到所述接收端对于所述数据包的回执,则执行步骤S112,判断向接收端发送数据包的次数是否超过预设值,如果未超过,则返回步骤S108,继续在局域网内向所述接收端发送的数据包,否则,执行步骤S113,确认数据包发送失败。
本实施例中,在所述步骤S108之前,进一步包括步骤S108a:记录所述数据包中所携带的客户端身份标识,同时循环的隔一段时间向局域网中广播自身的身份标识。
可以理解的是,本发明并不以上述步骤以及步骤的顺序为限,在其他实施例中,步骤S101、S103~S105等可省略。
本发明第一实施的数据传输方法中,先确认是否能够通过公网服务器进行数据传输,如果不能通过公网服务器进行数据传输,则通过建立局域网进行数据传输,从而能够避免因公网不稳定而导致数据传输失败的问题,提高了网络数据传输的稳定性。
如图3所示,本发明第二实施例另提供一种数据传输方法,其与第一实施例提供的数据传输方法基本相同,不同之处在于,所述数据传输方法在数据包中加入唯一标识,并同时将数据包发送至局域网和公网服务器,当局域网和公网服务器至少其中之一能够进行数据传输时,可保证数据传输稳定性。
具体的,第二实施例提供的数据传输方法包括以下步骤:
步骤S201,建立局域网。本实施例中,由路由热点建立一Wifi局域网。
步骤S202,客户端连接所述局域网。
步骤S203,在待发送的数据包中加入一个唯一标识。
步骤S204,向局域网中广播所述数据包的同时,向至少一个公网服务器发送所述数据包。
步骤S205,在特定时间段内查看是否接收到所述接收端反馈的数据包,如果接收到,则执行步骤S206,通过局域网向所述接收端发送数据包,否则,执行步骤S207,放弃通过局域网进行数据传输。
步骤S208,当通过局域网向所述接收端发送数据包后,在特定时间段内查看是否接收到所述公网服务器或接收端对于所述数据包的回执,如果接收到回 执,则执行步骤S209,确认数据包发送成功,且使所述公网服务器将所述数据包转发给所述接收端。否则,执行步骤S210,判断向网络服务器或接收端重复发送数据包的次数是否超过预设值,如果未超过,则返回步骤S205,继续查看是否接收到所述接收端反馈的来自局域网的数据包,以及返回步骤S204,继续向公网服务器发送所述数据包。否则,执行步骤S211,确认数据包发送失败。
本发明第二实施的数据传输方法,通过同时确认是否能够通过公网服务器或局域网进行数据传输,当公网不稳定时,可通过局域网进行数据传输,从而能够避免因公网不稳定而导致数据传输失败的问题,提高了网络数据传输的稳定性。
此外,上述数据传输方法在外出旅游时进行使用,能够非常方便用户进行网络通信。例如,当旅游团行至偏僻的野外时,无法连接公网,此时,可通过建立上述局域网,在特定的通信范围内(例如100米)与其他客户端用户进行通信,从而至少能够保证在小范围进行网络通信,并进行数据传输。
如图4所示,对应上述第二实施例的数据传输方法,本发明还提供一种数据接收方法。所述数据接收方法包括以下步骤:
步骤S301,接收来自该公网服务器或局域网的一个数据包,其中所述数据包包含所述唯一标识。
步骤S302,取出所述数据包中的唯一标识。
步骤S303,从处理过的一个标识列表中进行检索,确认所述数据包是否被处理过,如果是,则执行步骤S304,丢弃所述数据包,否则执行步骤S305,处理所述数据包,并将数据包中的唯一标识加入到已处理的标识列表中。由此,能够避免数据包被重复处理。
请参阅图5,本发明另提供一种数据传输装置400。在第一实施例中,所述数据传输装置400包括连接模块410、广播模块420以及确认模块430。
所述连接模块410用于连接局域网。
所述广播模块420用于向所述局域网中广播一个带身份标识的数据包,所述身份标识中包含一客户端所处的网络位置信息。本实施例中,所述广播模块420还用于向局域网中广播带身份标识的数据包之前,向一公网服务器发送数据包。
所述确认模块430用于查看是否接收到一接收端反馈的来自局域网的数据 包,所述数据包中记录所发送的数据包中所携带的身份标识,如果所述确认模块430确认接收到所述数据包,则以特定的协议,通过所述局域网向所述接收端发送数据,如果确认未接收到所述数据包,则确认数据包发送失败。本实施例中,所述确认模块430还用于在特定时间段内查看是否接收到所述公网服务器对于所述数据包的回执,如果是,则确认数据包发送成功,且使所述公网服务器将所述数据包转发给所述接收端,否则,判定数据包在公网传输失败,并开始向局域网中广播所述带身份标识的数据包。
请参阅图6,本发明第二实施例提供的数据传输装置500与第一实施例的数据传输装置400之间的区别在于:
数据传输装置500进一步包括标识模块540,用于在待发送的数据包中加入一个唯一标识。
广播模块520还用于在向局域网中广播所述数据包的同时,向至少一个公网服务器发送所述数据包。
确认模块530还用于在特定时间段内查看是否接收到所述公网服务器或所述接收端反馈的对于所述数据包的回执,如果接收到回执,则确认数据包发送成功,否则,继续查看是否接收到所述接收端反馈的来自局域网的第二数据包,以及继续向公网服务器发送所述数据包。
请参阅图7,本发明提供一种数据接收装置600,其对应于本发明第二实施例提供的数据传输装置500。所述数据接收装置600包括接收模块610、提取模块620以及检索模块630。
所述接收模块610用于接收来自公网服务器或局域网的一个数据包,其中所述数据包包含所述唯一标识。
所述提取模块620用于取出所述数据包中的唯一标识。
所述检索模块630用于从处理过的一个标识列表中进行检索,并确认所述数据包是否被处理过,如果是,则丢弃所述数据包,否则,处理所述数据包,并将数据包中的唯一标识加入到已处理的标识列表中。
本发明数据传输方法,当公网不稳定时,可通过局域网进行数据传输,从而能够避免因公网不稳定而导致数据传输失败的问题,提高了网络数据传输的稳定性。
此外,上述数据传输方法在外出旅游时进行使用,能够非常方便用户进行 网络通信。例如,当旅游团行至偏僻的野外时,无法连接公网,此时,可通过建立上述局域网,在特定的通信范围内(例如100米)与其他客户端用户进行通信,从而至少能够保证在小范围进行网络通信,并进行稳定的数据传输。
需要说明的是,通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本发明可借助软件加必需的硬件平台的方式来实现,当然也可以全部通过硬件来实施。基于这样的理解,本发明的技术方案对背景技术做出贡献的全部或者部分可以以软件产品的形式体现出来,所述计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。
以上所揭露的仅为本发明实施例中的较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。

Claims (10)

  1. 一种数据传输方法,包括:
    连接局域网;
    向局域网中广播一个带身份标识的第一数据包,所述身份标识中包含客户端所处的网络位置信息;
    查看是否接收到一接收端反馈的来自局域网的第二数据包,所述第二数据包中记录所述第一数据包所携带的身份标识,如果确认接收到所述第二数据包,则以特定的协议,通过所述局域网向所述接收端发送数据,否则,确认第一数据包发送失败。
  2. 如权利要求1所述的数据传输方法,其特征在于,在所述向局域网中广播一个带身份标识的第一数据包之前,包括步骤:
    向一公网服务器发送所述第一数据包;
    在特定时间段内查看是否接收到所述公网服务器对于所述第一数据包的回执,如果是,则确认第一数据包发送成功,且使所述公网服务器将所述第一数据包转发给所述接收端,否则,判定第一数据包在公网传输失败,并开始向局域网中广播所述带身份标识的第一数据包。
  3. 如权利要求2所述的数据传输方法,其特征在于,在所述通过所述局域网向所述接收端发送所述第一数据包的步骤之后,进一步包括步骤:
    在一段时间内查看是否收到所述接收端对于所述第一数据包的回执,如果是,则确认第一数据包发送成功,并通过所述局域网向接收端连续发送数据。
  4. 如权利要求1所述的数据传输方法,进一步包括步骤:
    在待发送的第一数据包中加入一个唯一标识;
    向局域网中广播所述第一数据包的同时,向至少一个公网服务器发送所述第一数据包;以及
    当通过所述局域网向所述接收端发送数据后,在特定时间段内查看是否接收到所述公网服务器或所述接收端反馈的对于所述第一数据包的回执,如果接收到回执,则确认第一数据包发送成功,否则,继续查看是否接收到所述接收端反馈的来自局域网的第二数据包,以及继续向公网服务器发送所述第一数据包。
  5. 如权利要求3或4所述的数据传输方法,进一步包括步骤:如果没有接收到所述接收端或公网服务器对于所述第一数据包的回执,则判断向所述网络服务器或接收端重复发送所述第一数据包的次数是否超过预设值,如果未超过,则继续查看是否接收到所述接收端反馈的来自局域网的第二数据包,以及继续所述向公网服务器发送所述第一数据包,否则,确认第一数据包发送失败。
  6. 一种数据接收方法,包括以下步骤:
    接收来自公网服务器或局域网的一个数据包,其中所述数据包包含一个唯一标识;
    取出所述数据包中的唯一标识;
    从处理过的一个标识列表中进行检索,确认所述数据包是否被处理过,如果是,则丢弃所述数据包,否则,处理所述数据包,并将数据包中的唯一标识加入到所述已处理的标识列表中。
  7. 一种数据传输装置,包括:
    连接模块,用于连接局域网;
    广播模块,用于向所述局域网中广播一个带身份标识的第一数据包,所述身份标识中包含所述数据传输装置所处的网络位置信息;
    确认模块,用于查看是否接收到一接收端反馈的来自局域网的第二数据包,所述第二数据包中记录所述第一数据包所携带的身份标识,如果所述确认模块确认接收到所述第二数据包,则以特定的协议,通过所述局域网向所述接收端发送数据,如果确认未接收到所述第二数据包,则确认第一数据包发送失败。
  8. 如权利要求7所述的数据传输装置,其特征在于,所述广播模块还用于在向局域网中广播所述第一数据包之前,向一公网服务器发送所述第一数据包;所述确认模块还用于在特定时间段内查看是否接收到所述公网服务器对于所述第一数据包的回执,如果是,则确认第一数据包发送成功,且使所述公网服务器将所述第一数据包转发给所述接收端,否则,判定第一数据包在公网传输失败,并开始向局域网中广播所述带身份标识的第一数据包。
  9. 如权利要求7所述的数据传输装置,进一步包括标识模块,用于在待发送的数据包中加入一个唯一标识;以及
    所述广播模块还用于在向局域网中广播所述第一数据包的同时,向至少一个公网服务器发送所述第一数据包;
    所述确认模块还用于在特定时间段内查看是否接收到所述公网服务器或所述接收端反馈的对于所述第一数据包的回执,如果接收到回执,则确认第一数据包发送成功,否则,继续查看是否接收到所述接收端反馈的来自局域网的第二数据包,以及继续向公网服务器发送所述第一数据包。
  10. 一种数据接收装置,包括:
    接收模块,用于接收来自公网服务器或局域网的一个数据包,其中所述数据包包含一个唯一标识;
    提取模块,用于取出所述数据包中的唯一标识;
    检索模块,用于从处理过的一个标识列表中进行检索,并确认所述数据包是否被处理过,如果是,则丢弃所述数据包,否则,处理所述数据包,并将数据包中的唯一标识加入到已处理的标识列表中。
PCT/CN2015/082731 2015-06-30 2015-06-30 一种数据传输方法及装置、数据接收方法及装置 WO2017000147A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/082731 WO2017000147A1 (zh) 2015-06-30 2015-06-30 一种数据传输方法及装置、数据接收方法及装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/082731 WO2017000147A1 (zh) 2015-06-30 2015-06-30 一种数据传输方法及装置、数据接收方法及装置

Publications (1)

Publication Number Publication Date
WO2017000147A1 true WO2017000147A1 (zh) 2017-01-05

Family

ID=57607480

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/082731 WO2017000147A1 (zh) 2015-06-30 2015-06-30 一种数据传输方法及装置、数据接收方法及装置

Country Status (1)

Country Link
WO (1) WO2017000147A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111106901A (zh) * 2019-12-31 2020-05-05 深圳Tcl新技术有限公司 WiFi数据传输方法、装置、设备及存储介质
CN111211879A (zh) * 2019-12-25 2020-05-29 中电科航空电子有限公司 北斗报文传输方法及机载北斗系统
CN111769915A (zh) * 2020-06-28 2020-10-13 杭州涂鸦信息技术有限公司 数据传输方法及相关设备
CN113703364A (zh) * 2021-08-25 2021-11-26 京东方科技集团股份有限公司 数据传输方法、设备及介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005018252A1 (en) * 2002-08-02 2005-02-24 Pctel Inc. Systems and methods for seamless roaming between wireless networks
CN101389078A (zh) * 2008-10-31 2009-03-18 苏州佳世达电通有限公司 无线终端装置、无线通讯系统以及连结网络的方法
CN102118419A (zh) * 2009-12-30 2011-07-06 华为技术有限公司 一种图片信息的传输方法、装置和通信系统
CN103516567A (zh) * 2012-06-26 2014-01-15 腾讯科技(深圳)有限公司 设备发现方法、系统及服务器

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005018252A1 (en) * 2002-08-02 2005-02-24 Pctel Inc. Systems and methods for seamless roaming between wireless networks
CN101389078A (zh) * 2008-10-31 2009-03-18 苏州佳世达电通有限公司 无线终端装置、无线通讯系统以及连结网络的方法
CN102118419A (zh) * 2009-12-30 2011-07-06 华为技术有限公司 一种图片信息的传输方法、装置和通信系统
CN103516567A (zh) * 2012-06-26 2014-01-15 腾讯科技(深圳)有限公司 设备发现方法、系统及服务器

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111211879A (zh) * 2019-12-25 2020-05-29 中电科航空电子有限公司 北斗报文传输方法及机载北斗系统
CN111211879B (zh) * 2019-12-25 2023-08-15 中电科航空电子有限公司 北斗报文传输方法及机载北斗系统
CN111106901A (zh) * 2019-12-31 2020-05-05 深圳Tcl新技术有限公司 WiFi数据传输方法、装置、设备及存储介质
CN111769915A (zh) * 2020-06-28 2020-10-13 杭州涂鸦信息技术有限公司 数据传输方法及相关设备
CN113703364A (zh) * 2021-08-25 2021-11-26 京东方科技集团股份有限公司 数据传输方法、设备及介质

Similar Documents

Publication Publication Date Title
US9693266B2 (en) System and method to assign an internet protocol address to a mobile device during a handoff
US9386004B2 (en) Peer based authentication
JP5985774B2 (ja) 拡張サービスセットを通じた直接リンク設定
JP5037685B2 (ja) 無線lanにおける外部ネットワークとのインターワーキング手順及びこのためのメッセージフォーマット
US7545771B2 (en) Independent direct link protocol
JP6174055B2 (ja) アクセス識別子ベースマルチキャスト通信のための装置および方法
JP6698771B2 (ja) 効果的なアクセスポイント発見のためのシステムおよび方法
US20050130634A1 (en) Location awareness in wireless networks
TW201637505A (zh) 終端直通中繼節點的確定、使用方法及裝置
EP2432265A1 (en) Method and apparatus for sending a key on a wireless local area network
EP2583409B1 (en) Apparatus and method for registering personal network
CN111869261A (zh) Lwa 通信中的发现与安全
KR101453523B1 (ko) 무선랜 네트워크에 기반한 정보 제공 방법 및 장치
WO2017000147A1 (zh) 一种数据传输方法及装置、数据接收方法及装置
WO2014019420A1 (zh) 无线接入点信息的发送方法、装置及移动终端
JP2017538321A (ja) 認証相互運用性のための方法およびシステム
EP3534648A1 (en) Access method for access point, apparatus, and system
US10149134B2 (en) Near field discovery method, user equipment, and storage medium
US20090232115A1 (en) Supporting communications in a wireless network using an ip address
WO2012162976A1 (zh) 一种获取WiFi接入点信息的方法与设备
US10771957B2 (en) Wireless communication apparatus, communication system and wireless communication apparatus control method to exchange services
JP2015104047A (ja) 接続認証方法、そのシステム、無線基地局および端末
US11956236B2 (en) System and method for tracking privacy policy in access networks
WO2015089717A1 (zh) 一种站点接入方法、站点装置、接入系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15896678

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25.05.2018)

122 Ep: pct application non-entry in european phase

Ref document number: 15896678

Country of ref document: EP

Kind code of ref document: A1