WO2020019775A1 - 网络连接方法及相关产品 - Google Patents

网络连接方法及相关产品 Download PDF

Info

Publication number
WO2020019775A1
WO2020019775A1 PCT/CN2019/083919 CN2019083919W WO2020019775A1 WO 2020019775 A1 WO2020019775 A1 WO 2020019775A1 CN 2019083919 W CN2019083919 W CN 2019083919W WO 2020019775 A1 WO2020019775 A1 WO 2020019775A1
Authority
WO
WIPO (PCT)
Prior art keywords
nan
data transmission
devices
electronic device
nan devices
Prior art date
Application number
PCT/CN2019/083919
Other languages
English (en)
French (fr)
Inventor
胡亚东
柯世兴
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2020019775A1 publication Critical patent/WO2020019775A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/16Central resource management; Negotiation of resources or communication parameters, e.g. negotiating bandwidth or QoS [Quality of Service]
    • H04W28/18Negotiating wireless communication parameters
    • H04W28/22Negotiating communication rate

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a network connection method and related products.
  • NAN neighborhood awareness networks
  • the embodiments of the present application provide a network connection method and related products, which can be based on a NAN network, so that a device not connected to the Internet can implement data communication with the Internet.
  • an embodiment of the present application provides a network connection method, where the method includes:
  • an embodiment of the present application provides a network connection device.
  • the network connection device includes:
  • a connection unit configured to establish a proximity sensing network NAN between the electronic device and a plurality of NAN devices
  • a determining unit configured to determine a distance between the electronic device and each of the NAN devices in the multiple NAN devices to obtain multiple distance values
  • An arithmetic unit configured to estimate a data transmission rate between the electronic device and each NAN device in the plurality of NAN devices to obtain a plurality of data transmission rates
  • the determining unit is further configured to determine a transmission performance score value corresponding to each NAN device in the multiple NAN devices according to the multiple distance values and the multiple data transmission rates to obtain multiple transmission performance scores. Value; and determining a target NAN device corresponding to a maximum transmission performance score value among the plurality of transmission performance score values;
  • a sending unit configured to send a first network request to the target NAN device, where the first network request is used to request the target NAN device to send network response data;
  • the receiving unit is configured to receive network response data sent by the target NAN device.
  • an embodiment of the present application provides an electronic device.
  • the electronic device includes a processor and a transceiver connected to the processor.
  • the processor is configured to establish a proximity sensing network NAN between an electronic device and a plurality of NAN devices; determine a distance between the electronic device and each NAN device in the plurality of NAN devices, and obtain a plurality of distance values ; Estimating the data transmission rate between the electronic device and each of the NAN devices in the plurality of NAN devices to obtain a plurality of data transmission rates; and determining all data transmission rates based on the plurality of distance values and the plurality of data transmission rates.
  • the transmission performance score values corresponding to each NAN device in the plurality of NAN devices are described to obtain a plurality of transmission performance score values; and a target NAN device corresponding to a maximum transmission performance score value among the plurality of transmission performance score values is determined;
  • the transceiver is configured to send a first network request to the target NAN device, and the first network request is used to request the target NAN device to send network response data; and receive a network response sent by the target NAN device data.
  • an embodiment of the present application provides an electronic device, including: a processor and a memory; and one or more programs, the one or more programs are stored in the memory and configured to be provided by the The processor executes, and the program includes instructions for some or all of the steps as described in the first aspect.
  • an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium is used to store a computer program, and the computer program causes a computer to execute the first aspect of the embodiment of the present application. Instructions for some or all of the steps described in.
  • an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to make a computer execute Some or all of the steps described in the first aspect of the embodiment of the application.
  • the computer program product can be a software installation package.
  • the network connection method and related products described in the embodiments of the present application determine the proximity between the electronic device and each of the multiple NAN devices by establishing a proximity sensing network NAN between the electronic device and the multiple NAN devices.
  • the distance between the two to obtain multiple distance values, to estimate the data transmission rate between the electronic device and each of the NAN devices, to obtain multiple data transmission rates, to determine based on multiple distance values and multiple data transmission rates
  • the transmission performance score value corresponding to each NAN device in the multiple NAN devices is obtained, and the multiple transmission performance score values are obtained.
  • the target NAN device corresponding to the maximum transmission performance score value among the multiple transmission performance score values is determined, and the target NAN is sent to the target NAN device.
  • the device sends a first network request.
  • the first network request is used to request the target NAN device to send network response data and receive the network response data sent by the target NAN device. Therefore, the electronic device selects the transmission performance by comparing the transmission performance score of the NAN device. A better NAN device establishes a connection with the Internet and obtains a better data transmission rate.
  • FIG. 1A is a schematic structural diagram of an exemplary electronic device according to an embodiment of the present application.
  • FIG. 1B is a schematic flowchart of a network connection method according to an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of another network connection method according to an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of another network connection method according to an embodiment of the present application.
  • FIG. 4 is another schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a network connection device according to an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of another example electronic device according to an embodiment of the present application.
  • an embodiment herein means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in multiple embodiments of the present application.
  • the appearances of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are they independent or alternative embodiments that are mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
  • the electronic devices involved in the embodiments of the present application may include various handheld devices with wireless communication functions, vehicle-mounted devices, wearable devices, computing devices, or other processing devices connected to a wireless modem, and various forms of user equipment (user equipment equipment, UE), mobile station (MS), terminal device (terminal), and so on.
  • UE user equipment equipment
  • MS mobile station
  • terminal terminal
  • electronic devices the devices mentioned above are collectively referred to as electronic devices.
  • FIG. 1A is a schematic structural diagram of an electronic device 100 according to an embodiment of the present application.
  • the electronic device 100 includes a housing 110, a circuit board 120 disposed in the housing 110, and A display screen 130 on the housing 110, and a processor 121 and a transceiver 122 are disposed on the circuit board 120.
  • the transceiver 122 is connected to the processor 121, and the processor 121 is connected to the display screen 130. among them,
  • the processor 121 is configured to establish a proximity sensing network NAN between an electronic device and multiple NAN devices; determine a distance between the electronic device and each of the multiple NAN devices, and obtain multiple distances Value; estimating the data transmission rate between the electronic device and each NAN device in the plurality of NAN devices to obtain a plurality of data transmission rates; determined according to the plurality of distance values and the plurality of data transmission rates A transmission performance score value corresponding to each NAN device in the plurality of NAN devices to obtain a plurality of transmission performance score values; determining a target NAN device corresponding to a maximum transmission performance score value among the plurality of transmission performance score values ;
  • the transceiver 122 is configured to send a first network request to the target NAN device, where the first network request is used to request the target NAN device to send network response data; and receive a network sent by the target NAN device. Response data.
  • the processor 121 is specifically configured to:
  • a distance corresponding to each target signal strength in the plurality of target signal strengths is determined, and multiple distance values are obtained.
  • the processor 121 is specifically configured to:
  • the distances between the electronic device and the multiple NAN devices are determined according to the multiple first moments, the multiple second moments, and the multiple signal transmission speeds, and multiple distance values are obtained.
  • the processor 121 is specifically configured to:
  • the data transmission rate of each NAN device in the plurality of NAN devices is estimated according to a data transmission parameter set corresponding to each NAN device in the plurality of NAN devices to obtain a plurality of data transmission rates.
  • the processor 121 is specifically configured to:
  • the transceiver 122 is specifically configured to:
  • FIG. 1B is a schematic flowchart of a network connection method according to an embodiment of the present application.
  • the network connection method described in this embodiment is applied to an electronic device as shown in FIG. 1A.
  • the network connection method includes:
  • the multiple NAN devices are all devices capable of surfing the Internet near the electronic device.
  • the electronic device may establish a proximity sensing network NAN with multiple NAN devices.
  • the electronic device may create a NAN group. And set the group identification information of the NAN group.
  • the electronic device can send a beacon to the nearby NAN device. After receiving the beacon from the electronic device, the nearby NAN device can send the electronic device to join the NAN group.
  • the electronic device may establish a NAN group according to the received request, so that in the NAN group, the electronic device may perform message interaction, data transmission, and the like with multiple NAN devices.
  • the electronic device and the multiple NAN devices may be determined by sending a searching request to each of the multiple NAN devices, and then according to the feedback information received from each of the multiple NAN devices.
  • determining the distance between the electronic device and each of the NAN devices in the multiple NAN devices to obtain multiple distance values may include the following steps:
  • determining the distance between the electronic device and each of the NAN devices in the multiple NAN devices to obtain multiple distance values may include the following steps:
  • the electronic device may send a time detection request to the NAN device.
  • the NAN device may send a reply message to the electronic device, and record the first moment and the signal transmission speed of the reply message, and send the first moment to the electronic device.
  • the device can record the second moment when the reply message is received, and then calculate the distance between the electronic device and the NAN device according to the following formula:
  • the signal strength between the electronic device and each NAN device in the multiple NAN devices may be obtained first, and then the data transmission parameter set of each NAN device in the multiple NAN devices may be obtained, and The signal strength and data transmission parameter set corresponding to each NAN device in the NAN device estimate the data transmission rate corresponding to the NAN device, and obtain multiple data transmission rates.
  • estimating the data transmission rate between the electronic device and each of the NAN devices in the multiple NAN devices to obtain multiple data transmission rates may include the following steps:
  • Each data transmission parameter set includes at least one of the following data transmission parameters: a signal frequency band, the number of connected devices, historical data transmission rates, and the like.
  • an electronic device operating in the above signal frequency band may be determined according to the signal strength of the electronic device.
  • the maximum achievable data transmission rate and then based on the number of devices connected to the electronic device and the historical data transmission rate, determine the data transmission rate corresponding to the data processing request that is expected to be processed.
  • acquiring the data transmission parameter set corresponding to each NAN device in the multiple NAN devices to obtain multiple data transmission parameter sets may include the following steps:
  • the electronic device may send transmission parameter query requests to multiple nearby NAN devices; each of the multiple NAN devices may obtain its own signal frequency band, number of connected devices, or historical data transmission according to the transmission parameter query request.
  • the data transmission parameters such as rate are sent to the electronic device; thus, the electronic device can obtain the data transmission parameter set sent by each NAN device among the multiple NAN devices.
  • a correspondence relationship between a distance value and a score value may be set in advance.
  • different score values may be set for distance values within different numerical ranges, the smaller the distance value is. , The higher the score value, therefore, for the distance value corresponding to each NAN device in multiple NAN devices, a first score value corresponding to the distance value can be determined; the data transmission rate and the score value can also be set in advance
  • Corresponding relationship between them specifically, different score values can be set for data transmission rates of different numerical ranges. The larger the data transmission rate, the higher the score value. Therefore, for each NAN device in multiple NAN devices, The corresponding data transmission rate may determine a second score value corresponding to the data transmission rate.
  • the first weight, data transmission rate, and preset data transmission rate corresponding to the distance value and the preset distance value may be determined. To calculate the second transmission weight score corresponding to each NAN device. The calculation formula is as follows:
  • Transmission performance score distance value * first weight + data transmission rate second weight
  • the target NAN device corresponding to the maximum transmission performance score value can be selected, so that the electronic device can achieve a faster transmission rate when transmitting data through the target NAN device.
  • the first network request is a network request that the electronic device needs to implement a specific function through the Internet, the first network request is a request for data transmission through the target NAN device, and so on.
  • the network response data refers to network data that the Internet responds to a network request.
  • a request for a user to access a website may respond to data about a website corresponding to the website.
  • a network request for a function that can only be implemented by connecting to a network.
  • the electronic device may send a first network request to the target NAN device, so as to achieve Internet access through the target NAN device.
  • the NAN device may forward the first network request to the Internet, and after obtaining the first network response data of the Internet through a data network or WIFI, send the first network response data to the electronic device.
  • sending the first network request to the target NAN device includes:
  • the electronic device may send a media access control (MAC) address query request to the target NAN device, and the target NAN device may send the target MAC address of the target NAN device to the electronic device according to the MAC address query request. Therefore, the electronic device can obtain the target MAC address and send a first network request to the target NAN device according to the target MAC address.
  • MAC media access control
  • the electronic device may send a network access request to access the website to the target NAN device, and the target NAN device forwards the network access request of the website to the Internet, thereby obtaining the network response data of the website. Then, the network response data of the website is sent to the electronic device, and the electronic device can obtain the network response data of the website to implement the webpage browsing function.
  • the electronic device can send a network request for the application to the target NAN device, and the target NAN device forwards the application to the Internet.
  • the electronic device can obtain the network response data of the application, and then send the network response data of the application to the electronic device, and the electronic device can obtain the network response data of the website, thereby realizing the functions in the application.
  • the network request corresponding to the download task can be sent to the target NAN device, and the target NAN device forwards the network request corresponding to the download task to the Internet, thereby obtaining the corresponding download task. Download the data, and then send the download data to the electronic device, and the electronic device can obtain the download data.
  • the electronic device can implement the Internet access function. For example, when the electronic device cannot access the Internet, it can send data requests to multiple nearby NAN devices and determine multiple NAN devices.
  • the target NAN device with the best medium transmission performance realizes data communication with the Internet by sending a first network request to the target NAN device and receiving network response data corresponding to the first network request sent by the target NAN device.
  • the network connection method described in the embodiment of the present application determines the distance between the electronic device and each of the NAN devices by establishing a proximity sensing network NAN between the electronic device and the multiple NAN devices.
  • To obtain multiple distance values estimate the data transmission rate between the electronic device and each of the NAN devices in the multiple NAN devices, obtain multiple data transmission rates, and determine multiple NANs based on multiple distance values and multiple data transmission rates
  • the transmission performance score value corresponding to each NAN device in the device obtains multiple transmission performance score values, determines the target NAN device corresponding to the maximum transmission performance score value among the multiple transmission performance score values, and sends the first NAN device to the target NAN device.
  • a network request obtains the target NAN device corresponding to the maximum transmission performance score value among the multiple transmission performance score values.
  • the first network request is used to request the target NAN device to send network response data and receive the network response data sent by the target NAN device. Therefore, the electronic device selects a better transmission performance by comparing the transmission performance score of the NAN device.
  • the NAN device establishes a connection with the Internet and obtains a better data transmission rate.
  • FIG. 2 is a schematic flowchart of another network connection method provided by an embodiment of the present application.
  • the network connection method described in this embodiment is applied to an electronic device as shown in FIG. 1A.
  • the method may include the following steps: :
  • Each data transmission parameter set in the multiple data transmission parameter sets includes multiple data transmission parameters.
  • steps 201 to 208 For specific implementation processes of steps 201 to 208, reference may be made to corresponding descriptions in the method shown in FIG. 1B, and details are not described herein again.
  • the network connection method described in the embodiment of the present application determines the distance between the electronic device and each NAN device in the multiple NAN devices by establishing a NAN network between the electronic device and multiple NAN devices.
  • Multiple distance values to obtain the data transmission parameter set corresponding to each NAN device in multiple NAN devices, to obtain multiple data transmission parameter sets, each data transmission parameter set contains multiple data transmission parameters, according to
  • the data transmission parameter set corresponding to each NAN device in the multiple NAN devices estimates the data transmission rate of each NAN device in the multiple NAN devices to obtain multiple data transmission rates, which are determined based on multiple distance values and multiple data transmission rates
  • the transmission performance scores corresponding to each NAN device in the multiple NAN devices are obtained to obtain multiple transmission performance score values, and the target NAN device corresponding to the maximum transmission performance score value among the multiple transmission performance score values is determined, and the target NAN The device sends the first network request and receives the network response data sent by the target NAN device, so that the electronic device compares the transmission performance score value of the NAN device Select better transmission
  • FIG. 3 is a schematic flowchart of another network connection method according to an embodiment of the present application.
  • the network connection method described in this embodiment is applied to an electronic device as shown in FIG. 1A.
  • the method may include the following steps:
  • the network connection method described in the embodiment of the present application determines a distance between an electronic device and each of the multiple NAN devices by establishing a NAN network between the electronic device and multiple NAN devices, and obtains multiple distance values.
  • the data transmission parameter set corresponding to each NAN device determines the data transmission rate of each NAN device in the multiple NAN devices, obtains multiple data transmission rates, and determines each of the multiple NAN devices based on multiple distance values and multiple data transmission rates.
  • a transmission performance score value corresponding to a NAN device to obtain multiple transmission performance score values determine a target NAN device corresponding to a maximum transmission performance score value among the multiple transmission performance score values, and send a first network request to the target NAN device To receive the network response data sent by the target NAN device, so that the electronic device selects the N with better transmission performance by comparing the transmission performance score of the NAN device AN equipment establishes a connection with the Internet to obtain a better data transmission rate.
  • the following is a device for implementing the above network connection method, as follows:
  • FIG. 4 is an electronic device provided by an embodiment of the present application, including: a processor and a memory; and one or more programs, where the one or more programs are stored in the In memory, and configured to be executed by the processor, the program includes instructions for performing the following steps:
  • the program includes instructions for performing the following steps :
  • a distance corresponding to each target signal strength in the plurality of target signal strengths is determined, and multiple distance values are obtained.
  • the program includes instructions for performing the following steps :
  • the distances between the electronic device and the multiple NAN devices are determined according to the multiple first moments, the multiple second moments, and the multiple signal transmission speeds, and multiple distance values are obtained.
  • the program includes a program for executing Instructions for the following steps:
  • a data transmission rate of each NAN device in the plurality of NAN devices is determined according to a data transmission parameter set corresponding to each NAN device in the plurality of NAN devices, and multiple data transmission rates are obtained.
  • the program further includes instructions for performing the following steps. :
  • the program further includes instructions for performing the following steps:
  • FIG. 5 is a schematic structural diagram of a network connection device according to this embodiment.
  • the network connection device is applied to an electronic device as shown in FIG. 1A.
  • the network connection device includes a connection unit 501, a determination unit 502, an operation unit 503, a sending unit 504, and a receiving unit 505.
  • connection unit 501 is configured to establish a proximity sensing network NAN between an electronic device and a plurality of NAN devices;
  • the determining unit 502 is configured to determine a distance between the electronic device and each of the NAN devices in the multiple NAN devices to obtain multiple distance values;
  • the arithmetic unit 503 is configured to estimate a data transmission rate between the electronic device and each of the NAN devices in the multiple NAN devices to obtain multiple data transmission rates;
  • the determining unit 502 is further configured to determine a transmission performance score value corresponding to each NAN device in the multiple NAN devices according to the multiple distance values and the multiple data transmission rates, to obtain multiple transmission performance results. A score value; and determining a target NAN device corresponding to a maximum transmission performance score value among the plurality of transmission performance score values;
  • the sending unit 504 is configured to send a first network request to the target NAN device, where the first network request is used to request the target NAN device to send network response data;
  • the receiving unit 505 is configured to receive network response data sent by the target NAN device.
  • the determining unit 502 is specifically configured to:
  • a distance corresponding to each target signal strength in the plurality of target signal strengths is determined, and multiple distance values are obtained.
  • the determining unit 502 is specifically configured to:
  • the distances between the electronic device and the multiple NAN devices are determined according to the multiple first moments, the multiple second moments, and the multiple signal transmission speeds, and multiple distance values are obtained.
  • the operation unit 503 is specifically configured to:
  • the data transmission rate of each NAN device in the plurality of NAN devices is estimated according to a data transmission parameter set corresponding to each NAN device in the plurality of NAN devices to obtain a plurality of data transmission rates.
  • the operation unit 503 is specifically configured to:
  • the sending unit 504 is specifically configured to:
  • the network connection device described in the embodiment of the present application determines the distance between the electronic device and each of the NAN devices by establishing a proximity sensing network NAN between the electronic device and the multiple NAN devices.
  • To obtain multiple distance values estimate the data transmission rate between the electronic device and each of the NAN devices in the multiple NAN devices, obtain multiple data transmission rates, and determine multiple NANs based on multiple distance values and multiple data transmission rates
  • the transmission performance score value corresponding to each NAN device in the device obtains multiple transmission performance score values, determines the target NAN device corresponding to the maximum transmission performance score value among the multiple transmission performance score values, and sends the first A network request.
  • the first network request is used to request the target NAN device to send network response data and receive the network response data sent by the target NAN device. Therefore, the electronic device selects a better transmission performance by comparing the transmission performance score of the NAN device.
  • the NAN device establishes a connection with the Internet and obtains a better data transmission rate.
  • the electronic device 600 may include a control circuit, and the control circuit may include a storage and processing circuit 610.
  • the storage and processing circuit 610 may be a memory, such as a hard disk drive memory, a non-volatile memory (such as a flash memory or other electronic programmable read-only memory used to form a solid-state drive, etc.), a volatile memory (such as a static or dynamic random storage Access to memory, etc.), this embodiment is not limited.
  • the processing circuit in the storage and processing circuit 610 may be used to control the operation of the electronic device 600.
  • the processing circuit can be implemented based on one or more microprocessors, microcontrollers, digital master-slave headphone switching controllers, baseband processors, power management units, audio codec chips, application specific integrated circuits, display driver integrated circuits, etc. .
  • the storage and processing circuit 610 can be used to run software in the electronic device 600, such as an Internet browsing application, a voice over Internet protocol (VOIP) telephone calling application, an email application, a media playback application, and an operating system function Wait.
  • These software can be used to perform some control operations, such as camera-based image acquisition, ambient light sensor-based ambient light measurement, proximity sensor-based proximity sensor measurement, and information based on status indicators such as LED status indicators Display functions, touch event detection based on touch sensors, functions associated with displaying information on multiple (e.g., layered) displays, operations associated with performing wireless communication functions, operations associated with collecting and generating audio signals
  • the control operations associated with collecting and processing button press event data, and other functions in the electronic device 600 are not limited in the embodiment of the present application.
  • the electronic device 600 may further include an input-output circuit 650.
  • the input-output circuit 650 may be used to enable the electronic device 600 to input and output data, that is, to allow the electronic device 600 to receive data from an external device and also allow the electronic device 600 to output data from the electronic device 600 to an external device.
  • the input-output circuit 650 may further include a sensor 670.
  • the sensor 670 may include an ambient light sensor, a light and capacitance-based proximity sensor, and a touch sensor (for example, a light-based touch sensor and / or a capacitive touch sensor, where the touch sensor may be part of a touch display screen or may be used as a Touch sensor structure is used independently), acceleration sensor, gravity sensor, and other sensors.
  • the input-output circuit 650 may also include one or more displays, such as the display 630.
  • the display 630 may include one or a combination of a liquid crystal display, an organic light emitting diode display, an electronic ink display, a plasma display, and a display using other display technologies.
  • the display 630 may include a touch sensor array (ie, the display 630 may be a touch display screen).
  • the touch sensor can be a capacitive touch sensor formed by a transparent array of touch sensor electrodes (such as indium tin oxide (ITO) electrodes), or it can be a touch sensor formed using other touch technologies, such as sonic touch, pressure-sensitive touch, resistance Touch, optical touch, etc. are not limited in the embodiments of the present application.
  • the audio component 640 may be used to provide audio input and output functions for the electronic device 600.
  • the audio component 640 in the electronic device 600 may include a speaker, a microphone, a buzzer, a tone generator, and other components for generating and detecting sound.
  • the communication circuit 620 may be used to provide the electronic device 600 with the ability to communicate with external devices.
  • the communication circuit 620 may include analog and digital input-output interface circuits, and wireless communication circuits based on radio frequency signals and / or optical signals.
  • the wireless communication circuit in the communication circuit 620 may include a radio frequency transceiver circuit, a power amplifier circuit, a low noise amplifier, a switch, a filter, and an antenna.
  • the wireless communication circuit in the communication circuit 620 may include a circuit for supporting near field communication (NFC) by transmitting and receiving a near field coupled electromagnetic signal.
  • the communication circuit 620 may include a near field communication antenna and a near field communication transceiver.
  • the communication circuit 620 may further include a cellular phone transceiver and antenna, a wireless local area network transceiver circuit and antenna, and the like.
  • the electronic device 600 may further include a battery, a power management circuit, and other input-output units 660.
  • the input-output unit 660 may include a button, a joystick, a click wheel, a scroll wheel, a touch pad, a keypad, a keyboard, a camera, a light emitting diode, and other status indicators.
  • the user may input commands through the input-output circuit 650 to control the operation of the electronic device 600, and may use output data of the input-output circuit 650 to realize receiving status information and other outputs from the electronic device 600.
  • An embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program causes a computer to execute a part of any one of the network connection methods described in the foregoing method embodiments. Or all steps.
  • An embodiment of the present application further provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform the operations described in the foregoing method embodiments. Part or all of the steps of any network connection method.
  • the disclosed device may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the unit is only a logical function division.
  • multiple units or components may be combined or may be combined. Integration into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit.
  • the above integrated unit may be implemented in the form of hardware or in the form of software program modules.
  • the integrated unit When the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it may be stored in a computer-readable memory.
  • the technical solution of the present application essentially or part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory.
  • a computer device which may be a personal computer, a server, or a network device, etc.
  • the foregoing memory includes: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk, and other media that can store program codes.
  • the program may be stored in a computer-readable memory, and the memory may include a flash disk. , ROM, RAM, disk or disc, etc.

Abstract

本申请实施例公开了一种网络连接方法及相关产品,建立电子设备与多个NAN设备之间的NAN网络,确定电子设备与多个NAN设备中每一NAN设备之间的距离,得到多个距离值,预估电子设备与所述多个NAN设备中每一NAN设备之间的数据传输速率,得到多个数据传输速率,根据多个距离值、所述多个数据传输速率确定多个NAN设备中每一NAN设备对应的传输性能得分值,得到多个传输性能得分值,确定多个传输性能得分值中最大传输性能得分值对应的目标NAN设备,向所述目标NAN设备发送第一网络请求,接收所述目标NAN设备发送的网络响应数据,从而,电子设备通过比较多个NAN设备的传输性能得分值,选取传输性能较好的NAN设备建立与互联网之间的连接,获得较好的数据传输速率。

Description

网络连接方法及相关产品
本申请要求2018年07月24日递交的发明名称为“网络连接方法及相关产品”的申请号2018108159029的在先申请优先权,上述在先申请的内容以引入的方式并入本文本中。
技术领域
本申请涉及通信技术领域,具体涉及一种网络连接方法及相关产品。
背景技术
随着电子设备(如:手机、平板电脑等)的大量普及应用,电子设备能够支持的应用越来越多,功能越来越强大,电子设备向着多样化、个性化的方向发展,成为用户生活中不可缺少的电子用品。
现有技术中,电子设备可基于邻近感知网络(neighbor awareness network,NAN)与其他电子设备之间进行数据传输,还可进行距离测量,但是,目前NAN网络的发展处于初步阶段,功能较为单一。
发明内容
本申请实施例提供了一种网络连接方法及相关产品,能够基于NAN网络,使得未连接互联网的设备实现与互联网之间的数据通信。
第一方面,本申请实施例提供了一种网络连接方法,所述方法包括:
建立电子设备与多个NAN设备之间的邻近感知网络NAN;
确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值;
预估所述电子设备与所述多个NAN设备中每一NAN设备之间的数据传输速率,得到多个数据传输速率;
根据所述多个距离值、所述多个数据传输速率确定所述多个NAN设备中每一NAN设备对应的传输性能得分值,得到多个传输性能得分值;
确定所述多个传输性能得分值中最大传输性能得分值对应的目标NAN设备;
向所述目标NAN设备发送第一网络请求,所述第一网络请求用于请求所述目标NAN设备发送网络响应数据;
接收所述目标NAN设备发送的网络响应数据。
第二方面,本申请实施例提供了一种网络连接装置,所述网络连接装置包括:
连接单元,用于建立电子设备与多个NAN设备之间的邻近感知网络NAN;
确定单元,用于确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值;
运算单元,用于预估所述电子设备与所述多个NAN设备中每一NAN设备之间的数据传输速率,得到多个数据传输速率;
所述确定单元,还用于根据所述多个距离值、所述多个数据传输速率确定所述多个NAN设备中每一NAN设备对应的传输性能得分值,得到多个传输性能得分值;以及,确定所述多个传输性能得分值中最大传输性能得分值对应的目标NAN设备;
发送单元,用于向所述目标NAN设备发送第一网络请求,所述第一网络请求用于请求所述目标NAN 设备发送网络响应数据;
接收单元,用于接收所述目标NAN设备发送的网络响应数据。
第三方面,本申请实施例提供了一种电子设备,所述电子设备包括处理器,以及与所述处理器连接的收发器,其中,
所述处理器,用于建立电子设备与多个NAN设备之间的邻近感知网络NAN;确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值;预估所述电子设备与所述多个NAN设备中每一NAN设备之间的数据传输速率,得到多个数据传输速率;根据所述多个距离值、所述多个数据传输速率确定所述多个NAN设备中每一NAN设备对应的传输性能得分值,得到多个传输性能得分值;确定所述多个传输性能得分值中最大传输性能得分值对应的目标NAN设备;
所述收发器,用于向所述目标NAN设备发送第一网络请求,所述第一网络请求用于请求所述目标NAN设备发送网络响应数据;以及,接收所述目标NAN设备发送的网络响应数据。
第四方面,本申请实施例提供了一种电子设备,包括:处理器和存储器;以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置成由所述处理器执行,所述程序包括用于如第一方面中所描述的部分或全部步骤的指令。
第五方面,本申请实施例提供了一种计算机可读存储介质,其中,所述计算机可读存储介质用于存储计算机程序,其中,所述计算机程序使得计算机执行如本申请实施例第一方面中所描述的部分或全部步骤的指令。
第六方面,本申请实施例提供了一种计算机程序产品,其中,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如本申请实施例第一方面中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包。
实施本申请实施例,具有如下有益效果:
可以看出,本申请实施例中所描述的网络连接方法及相关产品,通过建立电子设备与多个NAN设备之间的邻近感知网络NAN,确定电子设备与多个NAN设备中每一NAN设备之间的距离,得到多个距离值,预估电子设备与多个NAN设备中每一NAN设备之间的数据传输速率,得到多个数据传输速率,根据多个距离值、多个数据传输速率确定多个NAN设备中每一NAN设备对应的传输性能得分值,得到多个传输性能得分值,确定多个传输性能得分值中最大传输性能得分值对应的目标NAN设备,向目标NAN设备发送第一网络请求,第一网络请求用于请求目标NAN设备发送网络响应数据,接收目标NAN设备发送的网络响应数据,从而,电子设备通过比较NAN设备的传输性能得分值,选取传输性能较好的NAN设备建立与互联网之间的连接,获得较好的数据传输速率。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1A是本申请实施例提供的一种示例电子设备的结构示意图;
图1B是本申请实施例提供的一种网络连接方法的流程示意图;
图2是本申请实施例提供的另一种网络连接方法的流程示意图;
图3是本申请实施例提供的另一种网络连接方法的流程示意图;
图4是本申请实施例提供的一种电子设备的另一结构示意图;
图5是本申请实施例提供的一种网络连接装置的结构示意图;
图6是本申请实施例提供的另一种示例电子设备的结构示意图。
具体实施方式
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的多个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
本申请实施例所涉及到的电子设备可以包括各种具有无线通信功能的手持设备、车载设备、可穿戴设备、计算设备或连接到无线调制解调器的其他处理设备,以及各种形式的用户设备(user equipment,UE),移动台(mobile station,MS),终端设备(terminal device)等等。为方便描述,上面提到的设备统称为电子设备。
下面对本申请实施例进行详细介绍。
请参阅图1A,图1A是本申请实施例提供的一种电子设备100的结构示意图,上述电子设备100包括:壳体110、设置于所述壳体110内的电路板120和设置于所述壳体110上的显示屏130,所述电路板120上设置有处理器121和收发器122,所述收发器122与所述处理器121连接,所述处理器121连接所述显示屏130,其中,
所述处理器121,用于建立电子设备与多个NAN设备之间的邻近感知网络NAN;确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值;预估所述电子设备与所述多个NAN设备中每一NAN设备之间的数据传输速率,得到多个数据传输速率;根据所述多个距离值、所述多个数据传输速率确定所述多个NAN设备中每一NAN设备对应的传输性能得分值,得到多个传输性能得分值;确定所述多个传输性能得分值中最大传输性能得分值对应的目标NAN设备;
所述收发器122,用于向所述目标NAN设备发送第一网络请求,所述第一网络请求用于请求所述目标NAN设备发送网络响应数据;以及,接收所述目标NAN设备发送的网络响应数据。
可选地,在所述确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个 距离值方面,所述处理器121具体用于:
获取所述电子设备与所述多个NAN设备中每一NAN设备之间的目标信号强度,得到多个目标信号强度;
根据预设的信号强度与距离之间的对应关系,确定所述多个目标信号强度中每一目标信号强度对应的距离,得到多个距离值。
可选地,在所述确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值方面,所述处理器121具体用于:
向所述多个NAN设备中每一NAN设备发送时间检测请求;
接收所述多个NAN设备中每一NAN设备发送的回复消息,所述回复消息包括所述多个NAN设备中每一NAN设备发送所述回复消息的第一时刻和信号传输速度,得到多个第一时刻和多个信号传输速度;
记录接收所述多个NAN设备中每一NAN设备发送的回复消息的第二时刻,得到多个第二时刻,其中,每一所述第一时刻早于所述每一NAN设备对应的所述第二时刻;
根据所述多个第一时刻、所述多个第二时刻和所述多个信号传输速度确定电子设备分别与多个NAN设备之间的距离,得到多个距离值。
可选地,在所述预估所述电子设备与所述多个NAN设备中每一NAN设备之间的数据传输速率,得到多个数据传输速率方面,所述处理器121具体用于:
获取所述多个NAN设备中每一NAN设备对应的数据传输参数集,得到多个数据传输参数集,所述多个数据传输参数集中每一数据传输参数集包含多个数据传输参数;
根据所述多个NAN设备中每一NAN设备对应的数据传输参数集预估所述多个NAN设备中每一NAN设备的数据传输速率,得到多个数据传输速率。
可选地,在所述获取所述多个NAN设备中每一NAN设备对应的数据传输参数集,得到多个数据传输参数集方面,所述处理器121具体用于:
向所述多个NAN设备中每一NAN设备发送传输参数查询请求,所述传输参数查询请求用于请求所述多个NAN设备中每一NAN设备发送数据传输参数集;
接收所述多个NAN设备中每一NAN设备发送的所述数据传输参数集,得到所述多个数据传输参数集。
可选地,在所述向所述目标NAN设备发送第一网络请求方面,所述收发器122具体用于:
获取所述目标NAN设备的目标MAC地址;
根据所述目标MAC地址向所述目标NAN设备发送所述第一网络请求。
请参阅图1B,图1B是本申请实施例提供的一种网络连接方法的流程示意图,本实施例中所描述的网络连接方法,应用于如图1A的电子设备,该网络连接方法包括:
101、建立电子设备与多个NAN设备之间的邻近感知网络NAN。
其中,多个NAN设备均为电子设备附近的能够上网的设备,本申请实施例中,电子设备可与多个NAN设备建立邻近感知网络NAN,可选地,电子设备可创建一个NAN群组,并设定该NAN群组的群标识信息,电子设备可向附近的NAN设备发送信标(Beacon),附近的NAN设备在接收到电子设备发送的Beacon后,可向电子设备发送加入NAN群组的请求,电子设备可根据接收到的请求建立NAN群 组,从而,在该NAN群组中,电子设备可与多个NAN设备进行消息交互,数据传输等等。
102、确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值。
本申请实施例中,可通过向多个NAN设备中每一NAN设备发送搜索(ranging)请求,然后根据接收到的多个NAN设备中每一NAN设备的反馈信息确定电子设备与多个NAN设备中每一NAN设备之间的目标距离。
可选地,上述步骤102中,确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值,可包括以下步骤:
21、获取所述电子设备与所述多个NAN设备中每一NAN设备之间的目标信号强度,得到多个目标信号强度;
22、根据预设的信号强度与距离之间的对应关系,确定所述多个目标信号强度中每一目标信号强度对应的距离,得到多个距离值。
本申请实施例中,考虑到信号强度和距离之间存在正相关的联系,因此,可预先获取不同的多个距离下的多个信号强度,并建立信号强度与距离之间的对应关系,进而,可通过电子设备依次向多个NAN设备中每一NAN设备发送搜索(ranging)请求,接受每一NAN设备的反馈消息,并获取电子设备与每一NAN设备之间的目标信号强度,然后根据预设的信号强度与距离之间的对应关系,确定每一目标信号强度对应的距离,从而得到电子设备与多个NAN设备中每一NAN设备之间的距离值。
可选地,上述步骤102中,确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值,可包括以下步骤:
23、向所述多个NAN设备中每一NAN设备发送时间检测请求;
24、接收所述多个NAN设备中每一NAN设备发送的回复消息,所述回复消息包括所述多个NAN设备中每一NAN设备发送所述回复消息的第一时刻和信号传输速度,得到多个第一时刻和多个信号传输速度;
25、记录接收所述多个NAN设备中每一NAN设备发送的回复消息的第二时刻,得到多个第二时刻,其中,每一所述第一时刻早于所述每一NAN设备对应的所述第二时刻;
26、根据所述多个第一时刻、所述多个第二时刻和所述多个信号传输速度确定电子设备分别与多个NAN设备之间的距离,得到多个距离值。
其中,电子设备可向NAN设备发送时间检测请求,NAN设备可向电子设备发送回复消息,并记录发送该回复消息的第一时刻和信号传输速度,并将该第一时刻发送至电子设备,电子设备可记录接收到回复消息的第二时刻,进而可根据如下公式计算电子设备与NAN设备之间的距离:
距离值=信号传输速度*(第二时刻-第一时刻)
103、预估所述电子设备与所述多个NAN设备中每一NAN设备之间的数据传输速率,得到多个数据传输速率。
本申请实施例中,可先获取电子设备与所述多个NAN设备中每一NAN设备之间的信号强度,然后获取多个NAN设备中每一NAN设备的数据传输参数集,然后通过多个NAN设备中每一NAN设备对应的信号强度和数据传输参数集预估该NAN设备对应的数据传输速率,得到多个数据传输速率。
可选地,上述步骤103中,预估所述电子设备与所述多个NAN设备中每一NAN设备之间的数据传输速率,得到多个数据传输速率,可包括以下步骤:
31、获取所述多个NAN设备中每一NAN设备对应的数据传输参数集,得到多个数据传输参数集, 所述多个数据传输参数集中每一数据传输参数集包含多个数据传输参数;
32、根据所述多个NAN设备中每一NAN设备对应的数据传输参数集预估所述多个NAN设备中每一NAN设备的数据传输速率,得到多个数据传输速率。
其中,每一数据传输参数集包含以下至少一种数据传输参数:信号频段、连接设备数量、历史数据传输速率等等,具体地,可根据电子设备的信号强度确定工作在上述信号频段下电子设备可达到的最大数据传输速率,然后根据电子设备连接的设备数量和历史数据传输速率,确定预计处理的数据传输请求对应的数据传输速率。
可选地,上述步骤31中,获取所述多个NAN设备中每一NAN设备对应的数据传输参数集,得到多个数据传输参数集,可包括以下步骤:
向所述多个NAN设备中每一NAN设备发送传输参数查询请求,所述传输参数查询请求用于请求所述多个NAN设备中每一NAN设备发送数据传输参数集;
接收所述多个NAN设备中每一NAN设备发送的所述数据传输参数集,得到所述多个数据传输参数集。
本申请实施例中,电子设备可向附近的多个NAN设备发送传输参数查询请求;多个NAN设备中每一NAN设备可根据传输参数查询请求获取自身的信号频段、连接设备数量或历史数据传输速率等数据传输参数,并发送至电子设备;从而,电子设备可获取到多个NAN设备中每一NAN设备发送的数据传输参数集。
104、根据所述多个距离值、所述多个数据传输速率确定所述多个NAN设备中每一NAN设备对应的传输性能得分值,得到多个传输性能得分值。
其中,本申请实施例中,可预先设定距离值与得分值之间的对应关系,具体地,可对处于不同的数值范围内的距离值设定不同的得分值,距离值越小,得分值越高,从而,针对多个NAN设备中每一NAN设备对应的距离值,可确定与该距离值对应的第一得分值;还可预先设定数据传输速率与得分值之间的对应关系,具体地,可对不同数值范围的数据传输速率设定不同的得分值,数据传输速率越大,得分值越高,从而,针对多个NAN设备中每一NAN设备对应的数据传输速率,可确定与该数据传输速率对应的第二得分值,最后,可根据距离值和预设的距离值对应的第一权重、数据传输速率和预设的数据传输速率对应的第二权重,计算每一NAN设备对应的传输性能得分值,计算公式如下:
传输性能得分值=距离值*第一权重+数据传输速率第二权重
105、确定所述多个传输性能得分值中最大传输性能得分值对应的目标NAN设备。
本申请实施例中,可通过选取最大传输性能得分值对应的目标NAN设备,从而使电子设备通过目标NAN设备进行传输数据时达到更快的传输速率。
106、向所述目标NAN设备发送第一网络请求,所述第一网络请求用于请求所述目标NAN设备发送网络响应数据。
其中,第一网络请求为电子设备需要通过互联网实现特定功能的网络请求,第一网络请求为通过目标NAN设备进行数据传输的请求等等。
其中,网络响应数据是指互联网针对网络请求响应的网络数据,例如,针对用户访问网址的请求,可对应响应关于该网址对应的网站的数据,又例如,用户使用电子设备中的应用时,需要连接网络才能实现的功能的网络请求,本申请实施例中,电子设备在确定网络下载速率最大的目标NAN设备之后,可向目标NAN设备发送第一网络请求,从而通过目标NAN设备实现上网,目标NAN设备可向互联网 转发第一网络请求,在通过数据网络或者WIFI的方式取得互联网的第一网络响应数据后,将第一网络响应数据发送给电子设备。
可选地,上述步骤106中,向向所述目标NAN设备发送第一网络请求,包括:
61、获取所述目标NAN设备的目标MAC地址;
62、根据所述目标MAC地址向所述目标NAN设备发送所述第一网络请求。
本申请实施例中,电子设备可向目标NAN设备发送媒体访问控制(media access control,MAC)地址查询请求,目标NAN设备可根据MAC地址查询请求,向电子设备发送该目标NAN设备的目标MAC地址;从而,电子设备可得到目标MAC地址,并根据目标MAC地址向目标NAN设备发送第一网络请求。
举例说明,当用户需要访问一个网站,电子设备可将访问该网站的网络访问请求发送至目标NAN设备,目标NAN设备向互联网转发该网站的网络访问请求,从而获取到该网站的网络响应数据,然后将该网站的网络响应数据发送至电子设备,电子设备即可获取到该网站的网络响应数据,实现网页浏览功能。
再举例说明,当用户使用电子设备中的一个应用中的一个功能,该功能需要使用网络,因此,电子设备可向目标NAN设备发送关于针对该应用的网络请求,目标NAN设备向互联网转发该应用的网络请求,从而获取到该应用的网络响应数据,然后将该应用的网络响应数据发送至电子设备,电子设备即可获取到该网站的网络响应数据,从而实现应用中的功能。
再举例说明,当电子设备需要执行一个下载任务,可将该下载任务对应的网络请求发送至目标NAN设备,目标NAN设备向互联网转发该下载任务对应的网络请求,从而获取到该下载任务对应的下载数据,然后将该下载数据发送至电子设备,电子设备即可获取到该下载数据。
107、接收所述目标NAN设备发送的网络响应数据。
其中,通过目标NAN设备发送的网络响应数据,电子设备可实现上网功能,举例说明,在电子设备不能上网的情况下,可向附近的多个NAN设备发送数据请求,并确定出多个NAN设备中传输性能最佳的目标NAN设备,通过向目标NAN设备发送第一网络请求,并接收目标NAN设备发送的第一网络请求对应的网络响应数据,实现与互联网之间的数据通信。
可以看出,本申请实施例中所描述的网络连接方法,通过建立电子设备与多个NAN设备之间的邻近感知网络NAN,确定电子设备与多个NAN设备中每一NAN设备之间的距离,得到多个距离值,预估电子设备与多个NAN设备中每一NAN设备之间的数据传输速率,得到多个数据传输速率,根据多个距离值、多个数据传输速率确定多个NAN设备中每一NAN设备对应的传输性能得分值,得到多个传输性能得分值,确定多个传输性能得分值中最大传输性能得分值对应的目标NAN设备,向目标NAN设备发送第一网络请求,第一网络请求用于请求目标NAN设备发送网络响应数据,接收目标NAN设备发送的网络响应数据,从而,电子设备通过比较NAN设备的传输性能得分值,选取传输性能较好的NAN设备建立与互联网之间的连接,获得较好的数据传输速率。
请参阅图2,图2是本申请实施例提供的另一种网络连接方法的流程示意图,本实施例中所描述的网络连接方法,应用于如图1A的电子设备,该方法可包括以下步骤:
201、建立电子设备与多个NAN设备之间的邻近感知网络NAN。
202、确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值。
203、获取所述多个NAN设备中每一NAN设备对应的数据传输参数集,得到多个数据传输参数集,所述多个数据传输参数集中每一数据传输参数集包含多个数据传输参数。
204、根据所述多个NAN设备中每一NAN设备对应的数据传输参数集预估所述多个NAN设备中每一NAN设备的数据传输速率,得到多个数据传输速率。
205、根据所述多个距离值、所述多个数据传输速率确定所述多个NAN设备中每一NAN设备对应的传输性能得分值,得到多个传输性能得分值。
206、确定所述多个传输性能得分值中最大传输性能得分值对应的目标NAN设备。
207、向所述目标NAN设备发送第一网络请求,所述第一网络请求用于请求所述目标NAN设备发送网络响应数据。
208、接收所述目标NAN设备发送的网络响应数据。
其中,上述步骤201-208的具体实现过程可参照图1B所示的方法中相应的描述,在此不再赘述。
可以看出,本申请实施例中所描述的网络连接方法,通过建立电子设备与多个NAN设备之间的NAN网络,确定电子设备与多个NAN设备中每一NAN设备之间的距离,得到多个距离值,获取多个NAN设备中每一NAN设备对应的数据传输参数集,得到多个数据传输参数集,多个数据传输参数集中每一数据传输参数集包含多个数据传输参数,根据多个NAN设备中每一NAN设备对应的数据传输参数集预估多个NAN设备中每一NAN设备的数据传输速率,得到多个数据传输速率,根据多个距离值、多个数据传输速率确定多个NAN设备中每一NAN设备对应的传输性能得分值,得到多个传输性能得分值,确定多个传输性能得分值中最大传输性能得分值对应的目标NAN设备,向目标NAN设备发送第一网络请求,接收目标NAN设备发送的网络响应数据,从而,电子设备通过比较NAN设备的传输性能得分值,选取传输性能较好的NAN设备建立与互联网之间的连接,获得较好的数据传输速率。
与上述一致地,请参阅图3,为本申请实施例提供的另一种网络连接方法的实施例流程示意图,本实施例中所描述的网络连接方法,应用于如图1A的电子设备,本方法可包括以下步骤:
301、建立电子设备与多个NAN设备之间的邻近感知网络NAN。
302、确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值。
303、向所述多个NAN设备中每一NAN设备发送传输参数查询请求,所述传输参数查询请求用于请求所述多个NAN设备中每一NAN设备发送数据传输参数集。
304、接收所述多个NAN设备中每一NAN设备发送的所述数据传输参数集,得到所述多个数据传输参数集。
305、根据所述多个NAN设备中每一NAN设备对应的数据传输参数集预估所述多个NAN设备中每一NAN设备的数据传输速率,得到多个数据传输速率。
306、根据所述多个距离值、所述多个数据传输速率确定所述多个NAN设备中每一NAN设备对应的传输性能得分值,得到多个传输性能得分值。
307、确定所述多个传输性能得分值中最大传输性能得分值对应的目标NAN设备。
308、向所述目标NAN设备发送第一网络请求,所述第一网络请求用于请求所述目标NAN设备发送网络响应数据。
309、接收所述目标NAN设备发送的网络响应数据。
其中,上述步骤301-309的具体实现过程可参照图1B所示的方法中相应的描述,在此不再赘述。
本申请实施例中所描述的网络连接方法,通过建立电子设备与多个NAN设备之间的NAN网络,确定电子设备与多个NAN设备中每一NAN设备之间的距离,得到多个距离值,向多个NAN设备中每一NAN设备发送传输参数查询请求,接收多个NAN设备中每一NAN设备发送的所述数据传输参数集,得到多个数据传输参数集,根据多个NAN设备中每一NAN设备对应的数据传输参数集确定多个NAN设备中每一NAN设备的数据传输速率,得到多个数据传输速率,根据多个距离值、多个数据传输速率确定多个NAN设备中每一NAN设备对应的传输性能得分值,得到多个传输性能得分值,确定多个传输性能得分值中最大传输性能得分值对应的目标NAN设备,向目标NAN设备发送第一网络请求,接收目标NAN设备发送的网络响应数据,从而,电子设备通过比较NAN设备的传输性能得分值,选取传输性能较好的NAN设备建立与互联网之间的连接,获得较好的数据传输速率。
以下是实施上述网络连接方法的装置,具体如下:
与上述一致地,请参阅图4,图4是本申请实施例提供的一种电子设备,包括:处理器和存储器;以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置成由所述处理器执行,所述程序包括用于执行以下步骤的指令:
建立电子设备与多个NAN设备之间的邻近感知网络NAN;
确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值;
预估所述电子设备与所述多个NAN设备中每一NAN设备之间的数据传输速率,得到多个数据传输速率;
根据所述多个距离值、所述多个数据传输速率确定所述多个NAN设备中每一NAN设备对应的传输性能得分值,得到多个传输性能得分值;
确定所述多个传输性能得分值中最大传输性能得分值对应的目标NAN设备;
向所述目标NAN设备发送第一网络请求,所述第一网络请求用于请求所述目标NAN设备发送网络响应数据;
接收所述目标NAN设备发送的网络响应数据。
在一个可能的示例中,在所述确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值方面,所述程序包括用于执行以下步骤的指令:
获取所述电子设备与所述多个NAN设备中每一NAN设备之间的目标信号强度,得到多个目标信号强度;
根据预设的信号强度与距离之间的对应关系,确定所述多个目标信号强度中每一目标信号强度对应的距离,得到多个距离值。
在一个可能的示例中,在所述确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值方面,所述程序包括用于执行以下步骤的指令:
向所述多个NAN设备中每一NAN设备发送时间检测请求;
接收所述多个NAN设备中每一NAN设备发送的回复消息,所述回复消息包括所述多个NAN设备中每一NAN设备发送所述回复消息的第一时刻和信号传输速度,得到多个第一时刻和多个信号传输速度;
记录接收所述多个NAN设备中每一NAN设备发送的回复消息的第二时刻,得到多个第二时刻,其中,每一所述第一时刻早于所述每一NAN设备对应的所述第二时刻;
根据所述多个第一时刻、所述多个第二时刻和所述多个信号传输速度确定电子设备分别与多个NAN设备之间的距离,得到多个距离值。
在一个可能的示例中,在所述预估所述电子设备与所述多个NAN设备中每一NAN设备之间的数据传输速率,得到多个数据传输速率方面,所述程序包括用于执行以下步骤的指令:
获取所述多个NAN设备中每一NAN设备对应的数据传输参数集,得到多个数据传输参数集,所述多个数据传输参数集中每一数据传输参数集包含多个数据传输参数;
根据所述多个NAN设备中每一NAN设备对应的数据传输参数集确定所述多个NAN设备中每一NAN设备的数据传输速率,得到多个数据传输速率。
在一个可能的示例中,在所述获取所述多个NAN设备中每一NAN设备对应的数据传输参数集,得到多个数据传输参数集方面,所述程序还包括用于执行以下步骤的指令:
向所述多个NAN设备中每一NAN设备发送传输参数查询请求,所述传输参数查询请求用于请求所述多个NAN设备中每一NAN设备发送数据传输参数集;
接收所述多个NAN设备中每一NAN设备发送的所述数据传输参数集,得到所述多个数据传输参数集。
在一个可能的示例中,在所述向所述目标NAN设备发送第一网络请求方面,所述程序还包括用于执行以下步骤的指令:
获取所述目标NAN设备的目标MAC地址;
根据所述目标MAC地址向所述目标NAN设备发送所述第一网络请求。
请参阅图5,图5是本实施例提供的一种网络连接装置的结构示意图。该网络连接装置应用于如图1A所示的电子设备,所述网络连接装置包括连接单元501、确定单元502、运算单元503、发送单元504和接收单元505,其中,
所述连接单元501,用于建立电子设备与多个NAN设备之间的邻近感知网络NAN;
所述确定单元502,用于确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值;
所述运算单元503,用于预估所述电子设备与所述多个NAN设备中每一NAN设备之间的数据传输速率,得到多个数据传输速率;
所述确定单元502,还用于根据所述多个距离值、所述多个数据传输速率确定所述多个NAN设备中每一NAN设备对应的传输性能得分值,得到多个传输性能得分值;以及,确定所述多个传输性能得分值中最大传输性能得分值对应的目标NAN设备;
所述发送单元504,用于向所述目标NAN设备发送第一网络请求,所述第一网络请求用于请求所述目标NAN设备发送网络响应数据;
所述接收单元505,用于接收所述目标NAN设备发送的网络响应数据。
可选地,在所述确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值方面,所述确定单元502具体用于:
获取所述电子设备与所述多个NAN设备中每一NAN设备之间的目标信号强度,得到多个目标信号强度;
根据预设的信号强度与距离之间的对应关系,确定所述多个目标信号强度中每一目标信号强度对应 的距离,得到多个距离值。
可选地,在所述确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值方面,所述确定单元502具体用于:
向所述多个NAN设备中每一NAN设备发送时间检测请求;
接收所述多个NAN设备中每一NAN设备发送的回复消息,所述回复消息包括所述多个NAN设备中每一NAN设备发送所述回复消息的第一时刻和信号传输速度,得到多个第一时刻和多个信号传输速度;
记录接收所述多个NAN设备中每一NAN设备发送的回复消息的第二时刻,得到多个第二时刻,其中,每一所述第一时刻早于所述每一NAN设备对应的所述第二时刻;
根据所述多个第一时刻、所述多个第二时刻和所述多个信号传输速度确定电子设备分别与多个NAN设备之间的距离,得到多个距离值。
可选地,所述运算单元503具体用于:
获取所述多个NAN设备中每一NAN设备对应的数据传输参数集,得到多个数据传输参数集,所述多个数据传输参数集中每一数据传输参数集包含多个数据传输参数;
根据所述多个NAN设备中每一NAN设备对应的数据传输参数集预估所述多个NAN设备中每一NAN设备的数据传输速率,得到多个数据传输速率。
可选地,在所述获取所述多个NAN设备中每一NAN设备对应的数据传输参数集,得到多个数据传输参数集方面,所述运算单元503具体用于:
向所述多个NAN设备中每一NAN设备发送传输参数查询请求,所述传输参数查询请求用于请求所述多个NAN设备中每一NAN设备发送数据传输参数集;
接收所述多个NAN设备中每一NAN设备发送的所述数据传输参数集,得到所述多个数据传输参数集。
可选地,在所述向所述目标NAN设备发送第一网络请求方面,所述发送单元504具体用于:
获取所述目标NAN设备的目标MAC地址;
根据所述目标MAC地址向所述目标NAN设备发送所述第一网络请求。
可以看出,本申请实施例中所描述的网络连接装置,通过建立电子设备与多个NAN设备之间的邻近感知网络NAN,确定电子设备与多个NAN设备中每一NAN设备之间的距离,得到多个距离值,预估电子设备与多个NAN设备中每一NAN设备之间的数据传输速率,得到多个数据传输速率,根据多个距离值、多个数据传输速率确定多个NAN设备中每一NAN设备对应的传输性能得分值,得到多个传输性能得分值,确定多个传输性能得分值中最大传输性能得分值对应的目标NAN设备,向目标NAN设备发送第一网络请求,第一网络请求用于请求目标NAN设备发送网络响应数据,接收目标NAN设备发送的网络响应数据,从而,电子设备通过比较NAN设备的传输性能得分值,选取传输性能较好的NAN设备建立与互联网之间的连接,获得较好的数据传输速率。
可以理解的是,本实施例的网络连接装置的各程序模块的功能可根据上述方法实施例中的方法具体实现,其具体实现过程可以参照上述方法实施例的相关描述,此处不再赘述。
请参阅图6,图6是本申请实施例公开的一种电子设备的结构示意图,电子设备600可以包括控制电路,该控制电路可以包括存储和处理电路610。该存储和处理电路610可以存储器,例如硬盘驱动存 储器,非易失性存储器(例如闪存或用于形成固态驱动器的其它电子可编程只读存储器等),易失性存储器(例如静态或动态随机存取存储器等)等,本申请实施例不作限制。存储和处理电路610中的处理电路可以用于控制电子设备600的运转。该处理电路可以基于一个或多个微处理器,微控制器,数字主从耳机切换控制器,基带处理器,功率管理单元,音频编解码器芯片,专用集成电路,显示驱动器集成电路等来实现。
存储和处理电路610可用于运行电子设备600中的软件,例如互联网浏览应用程序,互联网协议语音(voice over internet protocol,VOIP)电话呼叫应用程序,电子邮件应用程序,媒体播放应用程序,操作系统功能等。这些软件可以用于执行一些控制操作,例如,基于照相机的图像采集,基于环境光传感器的环境光测量,基于接近传感器的接近传感器测量,基于诸如发光二极管的状态指示灯等状态指示器实现的信息显示功能,基于触摸传感器的触摸事件检测,与在多个(例如分层的)显示器上显示信息相关联的功能,与执行无线通信功能相关联的操作,与收集和产生音频信号相关联的操作,与收集和处理按钮按压事件数据相关联的控制操作,以及电子设备600中的其它功能等,本申请实施例不作限制。
电子设备600还可以包括输入-输出电路650。输入-输出电路650可用于使电子设备600实现数据的输入和输出,即允许电子设备600从外部设备接收数据和也允许电子设备600将数据从电子设备600输出至外部设备。输入-输出电路650可以进一步包括传感器670。传感器670可以包括环境光传感器,基于光和电容的接近传感器,触摸传感器(例如,基于光触摸传感器和/或电容式触摸传感器,其中,触摸传感器可以是触控显示屏的一部分,也可以作为一个触摸传感器结构独立使用),加速度传感器,重力传感器,和其它传感器等。
输入-输出电路650还可以包括一个或多个显示器,例如显示器630。显示器630可以包括液晶显示器,有机发光二极管显示器,电子墨水显示器,等离子显示器,使用其它显示技术的显示器中一种或者几种的组合。显示器630可以包括触摸传感器阵列(即,显示器630可以是触控显示屏)。触摸传感器可以是由透明的触摸传感器电极(例如氧化铟锡(ITO)电极)阵列形成的电容式触摸传感器,或者可以是使用其它触摸技术形成的触摸传感器,例如音波触控,压敏触摸,电阻触摸,光学触摸等,本申请实施例不作限制。
音频组件640可以用于为电子设备600提供音频输入和输出功能。电子设备600中的音频组件640可以包括扬声器,麦克风,蜂鸣器,音调发生器以及其它用于产生和检测声音的组件。
通信电路620可以用于为电子设备600提供与外部设备通信的能力。通信电路620可以包括模拟和数字输入-输出接口电路,和基于射频信号和/或光信号的无线通信电路。通信电路620中的无线通信电路可以包括射频收发器电路、功率放大器电路、低噪声放大器、开关、滤波器和天线。举例来说,通信电路620中的无线通信电路可以包括用于通过发射和接收近场耦合电磁信号来支持近场通信(near field communication,NFC)的电路。例如,通信电路620可以包括近场通信天线和近场通信收发器。通信电路620还可以包括蜂窝电话收发器和天线,无线局域网收发器电路和天线等。
电子设备600还可以进一步包括电池,电力管理电路和其它输入-输出单元660。输入-输出单元660可以包括按钮,操纵杆,点击轮,滚动轮,触摸板,小键盘,键盘,照相机,发光二极管和其它状态指示器等。
用户可以通过输入-输出电路650输入命令来控制电子设备600的操作,并且可以使用输入-输出电路650的输出数据以实现接收来自电子设备600的状态信息和其它输出。
本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如上述方法实施例中记载的任何一种网络连接方法的部分或全部步骤。
本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如上述方法实施例中记载的任何一种网络连接方法的部分或全部步骤。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件程序模块的形式实现。
所述集成的单元如果以软件程序模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、ROM、RAM、磁盘或光盘等。
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (20)

  1. 一种网络连接方法,其特征在于,所述方法包括:
    建立电子设备与多个NAN设备之间的邻近感知网络NAN;
    确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值;
    预估所述电子设备与所述多个NAN设备中每一NAN设备之间的数据传输速率,得到多个数据传输速率;
    根据所述多个距离值、所述多个数据传输速率确定所述多个NAN设备中每一NAN设备对应的传输性能得分值,得到多个传输性能得分值;
    确定所述多个传输性能得分值中最大传输性能得分值对应的目标NAN设备;
    向所述目标NAN设备发送第一网络请求,所述第一网络请求用于请求所述目标NAN设备发送网络响应数据;
    接收所述目标NAN设备发送的网络响应数据。
  2. 根据权利要求1所述的方法,其特征在于,所述确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值,包括:
    获取所述电子设备与所述多个NAN设备中每一NAN设备之间的目标信号强度,得到多个目标信号强度;
    根据预设的信号强度与距离之间的对应关系,确定所述多个目标信号强度中每一目标信号强度对应的距离,得到多个距离值。
  3. 根据权利要求1所述的方法,其特征在于,确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值,包括:
    向所述多个NAN设备中每一NAN设备发送时间检测请求;
    接收所述多个NAN设备中每一NAN设备发送的回复消息,所述回复消息包括所述多个NAN设备中每一NAN设备发送所述回复消息的第一时刻和信号传输速度,得到多个第一时刻和多个信号传输速度;
    记录接收所述多个NAN设备中每一NAN设备发送的回复消息的第二时刻,得到多个第二时刻,其中,每一所述第一时刻早于所述每一NAN设备对应的所述第二时刻;
    根据所述多个第一时刻、所述多个第二时刻和所述多个信号传输速度确定电子设备分别与多个NAN设备之间的距离,得到多个距离值。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述预估所述电子设备与所述多个NAN设备中每一NAN设备之间的数据传输速率,得到多个数据传输速率,包括:
    获取所述多个NAN设备中每一NAN设备对应的数据传输参数集,得到多个数据传输参数集,所述多个数据传输参数集中每一数据传输参数集包含多个数据传输参数;
    根据所述多个NAN设备中每一NAN设备对应的数据传输参数集预估所述多个NAN设备中每一NAN设备的数据传输速率,得到多个数据传输速率。
  5. 根据权利要求4所述的方法,其特征在于,所述获取所述多个NAN设备中每一NAN设备对应的数据传输参数集,得到多个数据传输参数集,包括:
    向所述多个NAN设备中每一NAN设备发送传输参数查询请求,所述传输参数查询请求用于请求 所述多个NAN设备中每一NAN设备发送数据传输参数集;
    接收所述多个NAN设备中每一NAN设备发送的所述数据传输参数集,得到所述多个数据传输参数集。
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述向所述目标NAN设备发送第一网络请求,包括:
    获取所述目标NAN设备的目标MAC地址;
    根据所述目标MAC地址向所述目标NAN设备发送所述第一网络请求。
  7. 一种网络连接装置,其特征在于,所述网络连接装置包括:
    连接单元,用于建立电子设备与多个NAN设备之间的邻近感知网络NAN;
    确定单元,用于确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值;
    运算单元,用于预估所述电子设备与所述多个NAN设备中每一NAN设备之间的数据传输速率,得到多个数据传输速率;
    所述确定单元,还用于根据所述多个距离值、所述多个数据传输速率确定所述多个NAN设备中每一NAN设备对应的传输性能得分值,得到多个传输性能得分值;以及,确定所述多个传输性能得分值中最大传输性能得分值对应的目标NAN设备;
    发送单元,用于向所述目标NAN设备发送第一网络请求,所述第一网络请求用于请求所述目标NAN设备发送网络响应数据;
    接收单元,用于接收所述目标NAN设备发送的网络响应数据。
  8. 根据权利要求7所述的网络连接装置,其特征在于,在所述确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值方面,所述确定单元具体用于:
    获取所述电子设备与所述多个NAN设备中每一NAN设备之间的目标信号强度,得到多个目标信号强度;
    根据预设的信号强度与距离之间的对应关系,确定所述多个目标信号强度中每一目标信号强度对应的距离,得到多个距离值。
  9. 根据权利要求7所述的网络连接装置,其特征在于,在所述确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值方面,所述确定单元具体用于:
    向所述多个NAN设备中每一NAN设备发送时间检测请求;
    接收所述多个NAN设备中每一NAN设备发送的回复消息,所述回复消息包括所述多个NAN设备中每一NAN设备发送所述回复消息的第一时刻和信号传输速度,得到多个第一时刻和多个信号传输速度;
    记录接收所述多个NAN设备中每一NAN设备发送的回复消息的第二时刻,得到多个第二时刻,其中,每一所述第一时刻早于所述每一NAN设备对应的所述第二时刻;
    根据所述多个第一时刻、所述多个第二时刻和所述多个信号传输速度确定电子设备分别与多个NAN设备之间的距离,得到多个距离值。
  10. 根据权利要求6-9任一项所述的网络连接装置,其特征在于,所述运算单元具体用于:
    获取所述多个NAN设备中每一NAN设备对应的数据传输参数集,得到多个数据传输参数集,所述多个数据传输参数集中每一数据传输参数集包含多个数据传输参数;
    根据所述多个NAN设备中每一NAN设备对应的数据传输参数集预估所述多个NAN设备中每一NAN设备的数据传输速率,得到多个数据传输速率。
  11. 根据权利要求10所述的网络连接装置,其特征在于,在所述获取所述多个NAN设备中每一NAN设备对应的数据传输参数集,得到多个数据传输参数集方面,所述运算单元具体用于:
    向所述多个NAN设备中每一NAN设备发送传输参数查询请求,所述传输参数查询请求用于请求所述多个NAN设备中每一NAN设备发送数据传输参数集;
    接收所述多个NAN设备中每一NAN设备发送的所述数据传输参数集,得到所述多个数据传输参数集。
  12. 根据权利要求7-11任一项所述的网络连接装置,其特征在于,在所述向所述目标NAN设备发送第一网络请求方面,所述发送单元具体用于:
    获取所述目标NAN设备的目标MAC地址;
    根据所述目标MAC地址向所述目标NAN设备发送所述第一网络请求。
  13. 一种电子设备,其特征在于,所述电子设备包括处理器,以及与所述处理器连接的收发器,其中,
    所述处理器,用于建立电子设备与多个NAN设备之间的邻近感知网络NAN;确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值;预估所述电子设备与所述多个NAN设备中每一NAN设备之间的数据传输速率,得到多个数据传输速率;根据所述多个距离值、所述多个数据传输速率确定所述多个NAN设备中每一NAN设备对应的传输性能得分值,得到多个传输性能得分值;确定所述多个传输性能得分值中最大传输性能得分值对应的目标NAN设备;
    所述收发器,用于向所述目标NAN设备发送第一网络请求,所述第一网络请求用于请求所述目标NAN设备发送网络响应数据;以及,接收所述目标NAN设备发送的网络响应数据。
  14. 根据权利要求13所述的电子设备,其特征在于,在所述确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值方面,所述处理器具体用于:
    获取所述电子设备与所述多个NAN设备中每一NAN设备之间的目标信号强度,得到多个目标信号强度;
    根据预设的信号强度与距离之间的对应关系,确定所述多个目标信号强度中每一目标信号强度对应的距离,得到多个距离值。
  15. 根据权利要求13所述的电子设备,其特征在于,在所述确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值方面,所述处理器具体用于:
    向所述多个NAN设备中每一NAN设备发送时间检测请求;
    接收所述多个NAN设备中每一NAN设备发送的回复消息,所述回复消息包括所述多个NAN设备中每一NAN设备发送所述回复消息的第一时刻和信号传输速度,得到多个第一时刻和多个信号传输速度;
    记录接收所述多个NAN设备中每一NAN设备发送的回复消息的第二时刻,得到多个第二时刻,其中,每一所述第一时刻早于所述每一NAN设备对应的所述第二时刻;
    根据所述多个第一时刻、所述多个第二时刻和所述多个信号传输速度确定电子设备分别与多个NAN设备之间的距离,得到多个距离值。
  16. 根据权利要求13-15任一项所述的电子设备,其特征在于,在所述预估所述电子设备与所述多 个NAN设备中每一NAN设备之间的数据传输速率,得到多个数据传输速率方面,所述处理器具体用于:
    获取所述多个NAN设备中每一NAN设备对应的数据传输参数集,得到多个数据传输参数集,所述多个数据传输参数集中每一数据传输参数集包含多个数据传输参数;
    根据所述多个NAN设备中每一NAN设备对应的数据传输参数集预估所述多个NAN设备中每一NAN设备的数据传输速率,得到多个数据传输速率。
  17. 根据权利要求16所述的电子设备,其特征在于,在所述获取所述多个NAN设备中每一NAN设备对应的数据传输参数集,得到多个数据传输参数集方面,所述处理器具体用于:
    向所述多个NAN设备中每一NAN设备发送传输参数查询请求,所述传输参数查询请求用于请求所述多个NAN设备中每一NAN设备发送数据传输参数集;
    接收所述多个NAN设备中每一NAN设备发送的所述数据传输参数集,得到所述多个数据传输参数集。
  18. 一种电子设备,其特征在于,包括:处理器和存储器;以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置成由所述处理器执行,所述程序包括用于执行如下操作的指令:
    建立电子设备与多个NAN设备之间的邻近感知网络NAN;
    确定所述电子设备与所述多个NAN设备中每一NAN设备之间的距离,得到多个距离值;
    预估所述电子设备与所述多个NAN设备中每一NAN设备之间的数据传输速率,得到多个数据传输速率;
    根据所述多个距离值、所述多个数据传输速率确定所述多个NAN设备中每一NAN设备对应的传输性能得分值,得到多个传输性能得分值;
    确定所述多个传输性能得分值中最大传输性能得分值对应的目标NAN设备;
    向所述目标NAN设备发送第一网络请求,所述第一网络请求用于请求所述目标NAN设备发送网络响应数据;
    接收所述目标NAN设备发送的网络响应数据。
  19. 一种计算机可读存储介质,其特征在于,其存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如权利要求1至6任意一项所述的方法,所述计算机包括终端设备。
  20. 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如权利要求1-6任一项所述的方法。
PCT/CN2019/083919 2018-07-24 2019-04-23 网络连接方法及相关产品 WO2020019775A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810815902.9 2018-07-24
CN201810815902.9A CN108966290B (zh) 2018-07-24 2018-07-24 网络连接方法及相关产品

Publications (1)

Publication Number Publication Date
WO2020019775A1 true WO2020019775A1 (zh) 2020-01-30

Family

ID=64463230

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/083919 WO2020019775A1 (zh) 2018-07-24 2019-04-23 网络连接方法及相关产品

Country Status (2)

Country Link
CN (1) CN108966290B (zh)
WO (1) WO2020019775A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108966290B (zh) * 2018-07-24 2021-04-16 Oppo广东移动通信有限公司 网络连接方法及相关产品
EP4187930A4 (en) * 2020-07-22 2024-04-03 Beijing Xiaomi Mobile Software Co Ltd INFORMATION TRANSMISSION METHOD AND APPARATUS, AND COMMUNICATION DEVICE

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105430633A (zh) * 2014-08-22 2016-03-23 电信科学技术研究院 一种确定中继节点的方法及设备
WO2016204497A1 (ko) * 2015-06-15 2016-12-22 엘지전자 주식회사 무선 통신 시스템에서 nan 프록시 서버가 릴레이 디바이스 역할을 수행하는 방법 및 장치
CN107646199A (zh) * 2015-05-27 2018-01-30 高通股份有限公司 邻域知悉网络数据链路简档
CN107872734A (zh) * 2016-09-23 2018-04-03 乐蜜有限公司 流媒体信息观看和直播的方法和装置
US20180115618A1 (en) * 2015-03-16 2018-04-26 Lg Electronics Inc. Method and device for performing service discovery in wireless communication system
CN108966290A (zh) * 2018-07-24 2018-12-07 Oppo广东移动通信有限公司 网络连接方法及相关产品

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9872234B2 (en) * 2015-02-12 2018-01-16 Intel IP Corporation Apparatus, system and method of communicating in an awareness cluster
CN105554869B (zh) * 2015-12-04 2020-02-07 努比亚技术有限公司 一种移动终端通信方法、设备及通信系统
CN106713138A (zh) * 2016-12-30 2017-05-24 北京奇虎科技有限公司 一种流数据的跨域传输方法和装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105430633A (zh) * 2014-08-22 2016-03-23 电信科学技术研究院 一种确定中继节点的方法及设备
US20180115618A1 (en) * 2015-03-16 2018-04-26 Lg Electronics Inc. Method and device for performing service discovery in wireless communication system
CN107646199A (zh) * 2015-05-27 2018-01-30 高通股份有限公司 邻域知悉网络数据链路简档
WO2016204497A1 (ko) * 2015-06-15 2016-12-22 엘지전자 주식회사 무선 통신 시스템에서 nan 프록시 서버가 릴레이 디바이스 역할을 수행하는 방법 및 장치
CN107872734A (zh) * 2016-09-23 2018-04-03 乐蜜有限公司 流媒体信息观看和直播的方法和装置
CN108966290A (zh) * 2018-07-24 2018-12-07 Oppo广东移动通信有限公司 网络连接方法及相关产品

Also Published As

Publication number Publication date
CN108966290B (zh) 2021-04-16
CN108966290A (zh) 2018-12-07

Similar Documents

Publication Publication Date Title
US10831161B2 (en) Method and device for sending communication message
TWI663541B (zh) 行動終端、指紋識別控制方法及裝置、電腦可讀儲存媒體及電腦程式產品
US11330417B2 (en) Method for electromagnetic interference adjustment and related devices
CN108900231B (zh) 动态天线调整方法及相关产品
US20220159777A1 (en) Method for network control and related products
WO2018161353A1 (zh) 一种分享照片的方法和装置
CN109240551B (zh) 使用手势控制电子装置的方法及相关产品
CN109067984B (zh) 数据传输方法、电子装置及计算机可读存储介质
US11701580B2 (en) Display control method and related products
CN107786424B (zh) 音视频通信方法、终端及服务器
US10942644B2 (en) Method for sliding response acceleration and related products
JP7193641B2 (ja) 電磁干渉制御方法および関連する製品
CN108833683B (zh) 动态天线调整实现方法及相关产品
WO2020019775A1 (zh) 网络连接方法及相关产品
CN108900385B (zh) 网络连接方法及相关产品
CN110891262A (zh) 一种蓝牙配对的方法、系统和终端设备
WO2018103379A1 (zh) 终端监测方法及移动终端
WO2018103440A1 (zh) 一种网络定位方法及终端设备
JP7249436B2 (ja) Pc5リンク確立方法、機器及びシステム
CN110569099B (zh) 消息显示方法及相关产品
WO2016119227A1 (zh) 随机接入竞争解决方法、用户设备以及基站
WO2020042759A1 (zh) 载波聚合配置方法及相关产品
CN111343334A (zh) 事件处理方法、装置、终端设备和存储介质
CN116367131A (zh) 处理方法、智能终端及存储介质
CN111273474A (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: 19840491

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19840491

Country of ref document: EP

Kind code of ref document: A1