CN108900385A - Method for connecting network and Related product - Google Patents

Method for connecting network and Related product Download PDF

Info

Publication number
CN108900385A
CN108900385A CN201810821203.5A CN201810821203A CN108900385A CN 108900385 A CN108900385 A CN 108900385A CN 201810821203 A CN201810821203 A CN 201810821203A CN 108900385 A CN108900385 A CN 108900385A
Authority
CN
China
Prior art keywords
network
nan equipment
equipment
nan
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810821203.5A
Other languages
Chinese (zh)
Other versions
CN108900385B (en
Inventor
胡亚东
柯世兴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810821203.5A priority Critical patent/CN108900385B/en
Publication of CN108900385A publication Critical patent/CN108900385A/en
Application granted granted Critical
Publication of CN108900385B publication Critical patent/CN108900385B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0894Packet rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Environmental & Geological Engineering (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the present application discloses a kind of method for connecting network and Related product,Establish the neighbouring sensing network NAN between electronic equipment and multiple NAN equipment,Determine the network downloading rate of every NAN equipment in the multiple NAN equipment,Obtain multiple network downloading rates,Determine the maximum target NAN equipment of network downloading rate in the multiple NAN equipment,First network request is sent to the target NAN equipment,The first network request is for requesting the target NAN equipment to send first network response data,Receive the first network response data that the target NAN equipment is sent,To,The network downloading rate for the NAN equipment that electronic equipment is surfed the Internet by comparing multiple energy,Choose the faster NAN device request network response data of network downloading rate,To realize the online of more excellent rate.

Description

Method for connecting network and Related product
Technical field
This application involves fields of communication technology, and in particular to a kind of method for connecting network and Related product.
Background technique
(such as with electronic equipment:Mobile phone, tablet computer etc.) a large amount of popularization and applications, the application that electronic equipment can be supported More and more, function is stronger and stronger, and electronic equipment develops towards diversification, personalized direction, becomes in user's life not The appliance and electronic that can lack.
In the prior art, electronic equipment can be based on neighbouring sensing network (neighbor awareness network, NAN) Carry out data transmission between other electronic equipments, can also carry out range measurement, still, the development of NAN network at present is in just Step section, function are more single.
Summary of the invention
The embodiment of the present application provides a kind of method for connecting network and Related product, and electronic equipment can be made to realize more excellent rate Online.
In a first aspect, the embodiment of the present application provides a kind of method for connecting network, the method includes:
Establish the neighbouring sensing network NAN between electronic equipment and multiple NAN equipment;
The network downloading rate for determining every NAN equipment in the multiple NAN equipment obtains multiple network downloading rates;
Determine the maximum target NAN equipment of network downloading rate in the multiple NAN equipment;
First network request is sent to the target NAN equipment, the first network request is for requesting the target NAN Equipment sends first network response data;
Receive the first network response data that the target NAN equipment is sent.
Second aspect, the embodiment of the present application provide a kind of network connection device, and the network connection device includes:
Connection unit, for establishing the neighbouring sensing network NAN between electronic equipment and multiple NAN equipment;
Determination unit obtains multiple for determining the network downloading rate of every NAN equipment in the multiple NAN equipment Network downloading rate;
The determination unit is also used to determine in the multiple NAN equipment that the maximum target NAN of network downloading rate is set It is standby;
Transmission unit, for sending first network request to the target NAN equipment, the first network request is for asking The target NAN equipment is asked to send first network response data;
The connection unit is also used to receive the first network response data that the target NAN equipment is sent.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, including:Processor and memory;And one Or multiple programs, one or more of programs are stored in the memory, and are configured to be held by the processor Row, described program includes the instruction for the step some or all of as described in first aspect.
Fourth aspect, the embodiment of the present application provide a kind of computer readable storage medium, wherein described computer-readable Storage medium is for storing computer program, wherein the computer program executes computer such as the embodiment of the present application the The instruction of step some or all of described in one side.
5th aspect, the embodiment of the present application provide a kind of computer program product, wherein the computer program product Non-transient computer readable storage medium including storing computer program, the computer program are operable to make to calculate Machine executes the step some or all of as described in the embodiment of the present application first aspect.The computer program product can be one A software installation packet.
Implement the embodiment of the present application, has the advantages that:
As can be seen that method for connecting network and Related product described in the embodiment of the present application, are set by establishing electronics The standby neighbouring sensing network NAN between multiple NAN equipment determines the network downloading speed of every NAN equipment in multiple NAN equipment Rate obtains multiple network downloading rates, the maximum target NAN equipment of network downloading rate in multiple NAN equipment is determined, to target NAN equipment sends first network request, and first network request sends first network response data for request target NAN equipment, The first network response data that target NAN equipment is sent is received, thus, electronic equipment is set by comparing multiple NAN that can be surfed the Internet Standby network downloading rate chooses the faster NAN device request network response data of network downloading rate, to realize more excellent speed The online of rate.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Figure 1A is a kind of structural schematic diagram of exemplary electronic device provided by the embodiments of the present application;
Figure 1B is a kind of flow diagram of method for connecting network provided by the embodiments of the present application;
Fig. 2 is the flow diagram of another method for connecting network provided by the embodiments of the present application;
Fig. 3 is the flow diagram of another method for connecting network provided by the embodiments of the present application;
Fig. 4 is another structural schematic diagram of a kind of electronic equipment provided by the embodiments of the present application;
Fig. 5 A is a kind of structural schematic diagram of network connection device provided by the embodiments of the present application;
Fig. 5 B is the modification structures of network connection device shown in Fig. 5 A provided by the embodiments of the present application.
Specific embodiment
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application Attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art Every other embodiment obtained without creative efforts, shall fall in the protection scope of this application.
The description and claims of this application and term " first " in above-mentioned attached drawing, " second " etc. are for distinguishing Different objects, are not use to describe a particular order.In addition, term " includes " and " having " and their any deformations, it is intended that It is to cover and non-exclusive includes.Such as the process, method, system, product or equipment for containing a series of steps or units do not have It is defined in listed step or unit, but optionally further comprising the step of not listing or unit, or optionally also wrap Include other step or units intrinsic for these process, methods, product or equipment.
Referenced herein " embodiment " is it is meant that a particular feature, structure, or characteristic described can wrap in conjunction with the embodiments It is contained in multiple embodiments of the application.The phrase, which occurs, in each position in the description might not each mean identical reality Example is applied, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art are explicitly and implicitly Ground understands that embodiment described herein can be combined with other embodiments.
Electronic equipment involved by the embodiment of the present application may include the various handheld devices with wireless communication function, Mobile unit, wearable device calculate equipment or are connected to other processing equipments and various forms of radio modem User equipment (user equipment, UE), mobile station (mobile station, MS), terminal device (terminal Device) etc..For convenience of description, apparatus mentioned above is referred to as electronic equipment.
It describes in detail below to the embodiment of the present application.
Figure 1A is please referred to, Figure 1A is the structural schematic diagram of a kind of electronic equipment disclosed in the embodiment of the present application, electronic equipment 100 may include control circuit, which may include storage and processing circuit 110.The storage and processing circuit 110 can With memory, such as hard drive memory, nonvolatile memory (such as flash memory or it is used to form the other of solid state drive Electrically programmable read only memory etc.), volatile memory (such as either statically or dynamically random access memory etc.) etc., the application Embodiment is with no restriction.Processing circuit in storage and processing circuit 110 can be used for the operating of controlling electronic devices 100.It should Processing circuit can microprocessor based on one or more, microcontroller, digital principal and subordinate's earphone switch controller, Base-Band Processing Device, power management unit, audio codec chip, specific integrated circuit, display-driver Ics etc. are realized.
Storage and processing circuit 110 can be used for running the software in electronic equipment 100, such as the Internet browser application journey Sequence, voice over internet protocol (voice over internet protocol, VOIP) call application program, Email Application program, media play-back application, operation system function etc..These softwares can be used for executing some control operations, example Such as, based on the Image Acquisition of camera, the ambient light measurement based on ambient light sensor, based on proximity sensor close to sensing Device measurement, the information display function that the positioning indicators such as status indicator lamp based on light emitting diode are realized, based on touch The touch event of sensor detects, function associated with information is shown on multiple (such as layering) displays, with execution The associated operation of wireless communication function, operation associated with collecting and generating audio signal, is pressed with collection and treatment button Other functions etc. in the associated control operation of event data and electronic equipment 100 are pressed, the embodiment of the present application does not limit System.
Electronic equipment 100 can also include input-output circuit 150.Input-output circuit 150 can be used for setting electronics Standby 100 realization data are output and input, i.e. permission electronic equipment 100 allows electronic equipment from outer equipment receiving data and also 100 export data to external equipment from electronic equipment 100.Input-output circuit 150 may further include sensor 170. Sensor 170 may include ambient light sensor, the proximity sensor based on light and capacitor, and touch sensor is (for example, be based on light Touch sensor and/or capacitive touch sensors, wherein touch sensor can be a part of touching display screen, can also Independently to be used as a touch sensor arrangement), acceleration transducer, gravity sensor and other sensors etc..
Input-output circuit 150 can also include one or more displays, such as display 130.Display 130 can To include liquid crystal display, organic light emitting diode display, electronic ink display, plasma display, using other aobvious Show combination one or several kinds of in the display of technology.Display 130 may include touch sensor array (that is, display 130 can be touching display screen).Touch sensor can be by transparent touch sensor electrode (such as tin indium oxide (ITO) Electrode) capacitive touch sensors that array is formed, or it can be the touch sensor formed using other touching techniques, example Such as sound wave touch-control, pressure sensible touch, resistive touch, optical touch etc., the embodiment of the present application is with no restriction.
Audio component 140 can be used for providing audio input and output function for electronic equipment 100.In electronic equipment 100 Audio component 140 may include loudspeaker, microphone, buzzer, tone generator and other for generating and detecting sound The component of sound.
Telecommunication circuit 120 can be used for providing the ability with external device communication for electronic equipment 100.Telecommunication circuit 120 It may include analog- and digital- input-output interface circuit, and the radio communication circuit based on radiofrequency signal and/or optical signal. Radio communication circuit in telecommunication circuit 120 may include radio-frequency transceiver circuitry, power amplifier circuit, low noise amplification Device, switch, filter and antenna.For example, the radio communication circuit in telecommunication circuit 120 may include for passing through transmitting The circuit of near-field communication (near field communication, NFC) is supported with near-field coupling electromagnetic signal is received.Example Such as, telecommunication circuit 120 may include near-field communication aerial and near-field communication transceiver.Telecommunication circuit 120 can also include honeycomb Telephone transceiver and antenna, wireless lan transceiver circuit and antenna etc..
Electronic equipment 100 can further include battery, power management circuitry and other input-output units 160.It is defeated Enter-output unit 160 may include button, control stick, click wheel, scroll wheel, touch tablet, keypad, keyboard, camera, hair Optical diode and other positioning indicators etc..
User can input a command for the operation of controlling electronic devices 100 by input-output circuit 150, and can be with Status information and other outputs from electronic equipment 100 are received using the output data of input-output circuit 150 to realize.
Figure 1B is please referred to, Figure 1B is a kind of flow diagram of method for connecting network provided by the embodiments of the present application, this reality Method for connecting network described in example is applied, applied to the electronic equipment of such as Figure 1A, which includes:
101, the neighbouring sensing network NAN between electronic equipment and multiple NAN equipment is established.
Wherein, multiple NAN equipment are the equipment that can be surfed the Internet near electronic equipment, in the embodiment of the present application, electronics Equipment can establish NAN network with multiple NAN equipment, and optionally, electronic equipment can create a NAN group, and set the NAN groups The group identification information of group, electronic equipment can send beacon (Beacon) to neighbouring NAN equipment, and neighbouring NAN equipment is receiving After the Beacon sent to electronic equipment, the request that NAN group is added can be sent to electronic equipment, electronic equipment can be according to reception To request establish NAN group, thus, in the NAN group, electronic equipment can with multiple NAN equipment carry out interacting message, number According to transmission etc..
102, the network downloading rate for determining every NAN equipment in the multiple NAN equipment obtains multiple network downloading speed Rate.
In the embodiment of the present application, the inquiry of network downloading rate can be sent by NAN equipment every into multiple NAN equipment and is asked It asks, to obtain the network downloading rate of every NAN equipment in multiple NAN equipment.
Optionally, in above-mentioned steps 102, the network downloading rate of every NAN equipment in the multiple NAN equipment is determined, Obtain multiple network downloading rates, it may include following steps:
21, into the multiple NAN equipment, every NAN equipment sends network downloading rate inquiry request;
22, the network downloading rate that every NAN equipment is sent in the multiple NAN equipment is received, is obtained under multiple networks Carry rate, when the network downloading rate is the preset data to be downloaded of every NAN device downloads in the multiple NAN equipment Speed of download.
In the embodiment of the present application, electronic equipment successively can send the inquiry of network downloading rate to neighbouring multiple NAN equipment Request;Every NAN equipment can be according to network downloading rate inquiry request, and the Internet download connected by itself is preset under Data are carried, and then obtain the network downloading rate of the data to be downloaded, and network downloading rate is sent to electronic equipment, In, preset data to be downloaded are lesser one piece of data, so that electronic equipment is completed in a relatively short time downloading task, and Quickly obtain the network downloading rate of the NAN equipment;To which electronic equipment can receive every NAN equipment in multiple NAN equipment The network downloading rate of transmission obtains multiple network downloading rates.
103, the maximum target NAN equipment of network downloading rate in the multiple NAN equipment is determined.
In the embodiment of the present application, multiple networks downloading rate obtained in step 102 can be ranked up, be obtained maximum Network downloading rate, and determine the corresponding target NAN equipment of maximum network downloading rate.
Optionally, in above-mentioned steps 103, determine that the maximum target NAN of network downloading rate is set in the multiple NAN equipment It is standby, it may include following steps:
31, the MAC Address for obtaining every NAN equipment in the multiple NAN equipment, obtains multiple MAC Address;
32, network downloading rate and MAC Address are established according to the multiple network downloading rate and the multiple MAC Address Between corresponding relationship;
33, the multiple network downloading rate is ranked up, obtains maximum target network downloading rate;
34, the corresponding destination-mac address of the target network downloading rate is determined according to the corresponding relationship, according to described Destination-mac address determines the target NAN equipment.
Wherein, electronic equipment every NAN equipment can send media access control (media into multiple NAN equipment Access control, MAC) address lookup request;Every NAN equipment can be sent out according to MAC Address inquiry request to electronic equipment Give the MAC Address of the NAN equipment;To which multiple MAC Address can be obtained in electronic equipment, in turn, can be by the MAC of every NAN equipment Address and network downloading rate establish corresponding relationship, obtain the corresponding pass between multiple network downloading rates and multiple MAC Address System, in turn, multiple network downloading rates are ranked up, obtain maximum target network downloading rate, and according to target network The corresponding destination-mac address of downloading rate determines target NAN equipment.
104, first network request is sent to the target NAN equipment, the first network request is for requesting the mesh It marks NAN equipment and sends first network response data.
Wherein, network response data refers to that internet is directed to the network data of network request response, for example, visiting for user It asks the request of network address, the data responded about the corresponding website of the network address can be corresponded to, in another example, user uses in electronic equipment In application, needing to connect the network request for the function that network is just able to achieve, in the embodiment of the present application, electronic equipment is determining network After the maximum target NAN equipment of downloading rate, first network request can be sent to target NAN equipment, to pass through target NAN Equipment realizes online, and target NAN equipment can forward first network request to internet, in the side by data network or WIFI After formula obtains the first network response data of internet, first network response data is sent to electronic equipment.
For example, electronic equipment can will access the network access request of the website when user needs to access a website It is sent to target NAN equipment, target NAN equipment forwards the network access request of the website to internet, to get the net The network response data stood, is then sent to electronic equipment for the network response data of the website, and electronic equipment can be got The network response data of the website realizes web page browsing function.
Again for example, when user is using a function in an application in electronic equipment, the function need using Network, therefore, electronic equipment can be sent to target NAN equipment about the network request for being directed to the application, and target NAN equipment is to mutual Networking forwards the network request of the application, to get the network response data of the application, then rings the network of the application Data are answered to be sent to electronic equipment, electronic equipment can get the network response data of the website, to realize in application Function.
105, the first network response data that the target NAN equipment is sent is received.
Wherein, the first network response data sent by target NAN equipment, electronic equipment can realize that internet connects, For example, can send network rate inquiry to neighbouring multiple NAN equipment in the case where electronic equipment be cannot get online and ask It asks, to obtain the network downloading rate of every NAN equipment in multiple NAN equipment, and determines network downloading in multiple NAN equipment The maximum target NAN equipment of rate by sending first network request to target NAN equipment, and receives the transmission of target NAN equipment First network request corresponding first network response data, realize the data communication between internet.
Optionally, after sending network connecting request to the target NAN equipment, the method may also include following step Suddenly:
If 51, the target NAN equipment is carrying out the downloading task that downloading data is greater than the first preset threshold, institute is received State the response message of the refusal request of target NAN equipment transmission;
52, into the multiple NAN equipment, network downloading rate is less than the target NAN equipment, is greater than other NAN equipment Alternative NAN equipment send the second network request, second network request is for requesting the target NAN equipment to send the Two network response datas;
53, the second network response data that the alternative NAN equipment is sent is received.
Wherein, if target NAN equipment is carrying out the downloading task that downloading data is greater than the first preset threshold, show target Equipment is downloading biggish downloading file, then electronic equipment connects internet by target NAN equipment, it may be difficult to obtain speed Faster network is spent, also will affect the downloading rate of the current downloading task of target NAN equipment, it therefore, can be to network downloading rate The alternative NAN equipment for being only smaller than target NAN equipment sends the second network request, then passes through alternative the second net of NAN device forwards Network request, and the corresponding second network response data of the second network request is obtained from internet, the second network response data is sent out It send to electronic equipment, to guarantee that electronic equipment can be realized preferably network connection effect.
Optionally, in the embodiment of the present application, following steps be can also carry out:
A1, wireless network connection is established;
If A2, the wireless network connection fail, alternatively, wireless network connection success, but the electronic equipment Network rate executes the neighbouring sensing network established between electronic equipment and multiple NAN equipment less than the second preset threshold The operation of NAN.
Wherein, electronic equipment can first establish wireless network connection, if electronic equipment can connect internet, and electronics is set Standby network rate is more than or equal to the second preset threshold, shows that electronic equipment can execute downloading normal through wireless network and appoint Business, when the network rate of electronic equipment connection wireless network failure or electronic equipment is less than the second preset threshold, just foundation is electric Neighbouring sensing network NAN between sub- equipment and multiple NAN equipment, and it is very fast by network downloading rate in multiple NAN equipment Target NAN equipment surf the Internet.
As can be seen that method for connecting network described in the embodiment of the present application, by establishing electronic equipment and multiple NAN Neighbouring sensing network NAN between equipment, determines the network downloading rate of every NAN equipment in multiple NAN equipment, obtains multiple Network downloading rate determines the maximum target NAN equipment of network downloading rate in multiple NAN equipment, sends to target NAN equipment First network request, first network request send first network response data for request target NAN equipment, receive target NAN The first network response data that equipment is sent, thus, electronic equipment is downloaded by comparing the network of multiple NAN equipment that can be surfed the Internet Rate chooses the faster NAN device request network response data of network downloading rate, to realize the online of more excellent rate.
Referring to Fig. 2, Fig. 2 is the flow diagram of another method for connecting network provided by the embodiments of the present application, this reality Method for connecting network described in example is applied, applied to the electronic equipment of such as Figure 1A, this method may include following steps:
201, the neighbouring sensing network NAN between electronic equipment and multiple NAN equipment is established.
202, the network downloading rate for determining every NAN equipment in the multiple NAN equipment obtains multiple network downloading speed Rate.
203, the maximum target NAN equipment of network downloading rate in the multiple NAN equipment is determined.
204, first network request is sent to the target NAN equipment, the first network request is for requesting the mesh It marks NAN equipment and sends first network response data.
205, the first network response data that the target NAN equipment is sent is received.
If 206, the target NAN equipment is carrying out the downloading task that downloading data is greater than the first preset threshold, receive The response message for the refusal request that the target NAN equipment is sent.
207, into the multiple NAN equipment, network downloading rate is less than the target NAN equipment, sets greater than other NAN Standby alternative NAN equipment sends the second network request, and second network request is for requesting the target NAN equipment to send the Two network response datas.
208, the second network response data that the alternative NAN equipment is sent is received.
Wherein, the specific implementation process of above-mentioned steps 201-208 can refer in method shown in Figure 1B describes accordingly, This is repeated no more.
As can be seen that method for connecting network described in the embodiment of the present application, by establishing electronic equipment and multiple NAN Neighbouring sensing network NAN between equipment, determines the network downloading rate of every NAN equipment in multiple NAN equipment, obtains multiple Network downloading rate determines the maximum target NAN equipment of network downloading rate in multiple NAN equipment, sends to target NAN equipment First network request, first network request send first network response data for request target NAN equipment, receive target NAN The first network response data that equipment is sent, if target NAN equipment is carrying out downloading data greater than under the first preset threshold Load task receives the response message for the refusal request that target NAN equipment is sent, and into multiple NAN equipment, network downloading rate is small In target NAN equipment, the alternative NAN equipment greater than other NAN equipment sends the second network request, receives alternative NAN equipment hair The the second network response data sent, thus, the network downloading rate for the NAN equipment that electronic equipment is surfed the Internet by comparing multiple energy, The faster NAN device request network response data of network downloading rate is chosen, to realize the online of more excellent rate.
Consistent with the abovely, referring to Fig. 3, being the embodiment of another method for connecting network provided by the embodiments of the present application Flow diagram, method for connecting network as described in this embodiment, applied to the electronic equipment of such as Figure 1A, this method may include Following steps:
301, wireless network connection is established.
If 302, the wireless network connection failure, alternatively, wireless network connection success, but the electronic equipment Network rate establishes the neighbouring sensing network NAN between electronic equipment and multiple NAN equipment less than the second preset threshold.
303, into the multiple NAN equipment, every NAN equipment sends network downloading rate inquiry request.
304, the network downloading rate that every NAN equipment is sent in the multiple NAN equipment is received, is obtained under multiple networks Carry rate, when the network downloading rate is the preset data to be downloaded of every NAN device downloads in the multiple NAN equipment Speed of download.
305, the maximum target NAN equipment of network downloading rate in the multiple NAN equipment is determined.
306, first network request is sent to the target NAN equipment, the first network request is for requesting the mesh It marks NAN equipment and sends first network response data.
307, the first network response data that the target NAN equipment is sent is received.
Wherein, the specific implementation process of above-mentioned steps 301-307 can refer in method shown in Figure 1B describes accordingly, This is repeated no more.
Method for connecting network described in the embodiment of the present application is connected by establishing wireless network connection in wireless network Failure is connect, alternatively, wireless network connection success, but when the network rate of electronic equipment is less than the second preset threshold, establish electronics Neighbouring sensing network NAN between equipment and multiple NAN equipment, into multiple NAN equipment, every NAN equipment sends network downloading Rate inquiry request receives the network downloading rate that every NAN equipment is sent in multiple NAN equipment, obtains multiple network downloadings Rate, speed of download when network downloading rate is the preset data to be downloaded of every NAN device downloads in multiple NAN equipment, It determines the maximum target NAN equipment of network downloading rate in multiple NAN equipment, sends first network request to target NAN equipment, First network request sends first network response data for request target NAN equipment, receives target NAN equipment is sent first Network response data, thus, electronic equipment chooses network by comparing the network downloading rate of multiple NAN equipment that can be surfed the Internet The faster NAN device request network response data of downloading rate, to realize the online of more excellent rate.
It is the device for implementing above-mentioned method for connecting network below, it is specific as follows:
Consistent with the abovely, referring to Fig. 4, Fig. 4 is a kind of electronic equipment provided by the embodiments of the present application, including:Processing Device and memory;And one or more programs, one or more of programs are stored in the memory, and are matched It is set to and is executed by the processor, described program includes the instruction for executing following steps:
Establish the neighbouring sensing network NAN between electronic equipment and multiple NAN equipment;
The network downloading rate for determining every NAN equipment in the multiple NAN equipment obtains multiple network downloading rates;
Determine the maximum target NAN equipment of network downloading rate in the multiple NAN equipment;
First network request is sent to the target NAN equipment, the first network request is for requesting the target NAN Equipment sends first network response data;
Receive the first network response data that the target NAN equipment is sent.
In a possible example, the network of every NAN equipment downloads speed in the multiple NAN equipment of the determination Rate, in terms of obtaining multiple network downloading rates, described program includes the instruction for executing following steps:
Into the multiple NAN equipment, every NAN equipment sends network downloading rate inquiry request;
The network downloading rate that every NAN equipment is sent in the multiple NAN equipment is received, multiple network downloading speed are obtained Rate, the downloading when network downloading rate is the preset data to be downloaded of every NAN device downloads in the multiple NAN equipment Speed.
In a possible example, the maximum target of network downloading rate in the multiple NAN equipment of the determination NAN equipment aspect, described program include the instruction for executing following steps:
The MAC Address for obtaining every NAN equipment in the multiple NAN equipment, obtains multiple MAC Address;
According to the multiple network downloading rate and the multiple MAC Address establish network downloading rate and MAC Address it Between corresponding relationship;
The multiple network downloading rate is ranked up, maximum target network downloading rate is obtained;
The corresponding destination-mac address of the target network downloading rate is determined according to the corresponding relationship, according to the mesh Mark MAC Address determines the target NAN equipment.
In a possible example, after the transmission network connecting request to the target NAN equipment, the journey Sequence further includes the instruction for executing following steps:
If the target NAN equipment is carrying out the downloading task that downloading data is greater than the first preset threshold, described in reception The response message for the refusal request that target NAN equipment is sent;
Into the multiple NAN equipment, network downloading rate is less than the target NAN equipment, greater than other NAN equipment Alternative NAN equipment sends the second network request, and second network request is for requesting the target NAN equipment to send the second net Network response data;
Receive the second network response data that the alternative NAN equipment is sent.
In a possible example, described program further includes the instruction for executing following steps:
Establish wireless network connection;
If the wireless network connection failure, alternatively, wireless network connection success, but the network of the electronic equipment Rate executes the neighbouring sensing network NAN's established between electronic equipment and multiple NAN equipment less than the second preset threshold Operation.
Fig. 5 A is please referred to, Fig. 5 A is a kind of structural schematic diagram of network connection device provided in this embodiment.The network connects Connection device is applied to electronic equipment as shown in Figure 1A, and the network connection device includes connection unit 501, determination unit 502 With transmission unit 503, wherein
The connection unit 501, for establishing the neighbouring sensing network NAN between electronic equipment and multiple NAN equipment;
The determination unit 502 is obtained for determining the network downloading rate of every NAN equipment in the multiple NAN equipment To multiple network downloading rates;
The determination unit 502 is also used to determine the maximum target NAN of network downloading rate in the multiple NAN equipment Equipment;
The transmission unit 503, for sending first network request to the target NAN equipment, the first network is asked It asks for requesting the target NAN equipment to send first network response data;
The connection unit 501 is also used to receive the first network response data that the target NAN equipment is sent.
Optionally, in the multiple NAN equipment of the determination every NAN equipment network downloading rate, obtain multiple In terms of network downloading rate, the determination unit 502 is specifically used for:
Into the multiple NAN equipment, every NAN equipment sends network downloading rate inquiry request;
The network downloading rate that every NAN equipment is sent in the multiple NAN equipment is received, multiple network downloading speed are obtained Rate, the downloading when network downloading rate is the preset data to be downloaded of every NAN device downloads in the multiple NAN equipment Speed.
Optionally, the maximum target NAN equipment aspect of network downloading rate in the multiple NAN equipment of the determination, The determination unit 502 is specifically used for:
The MAC Address for obtaining every NAN equipment in the multiple NAN equipment, obtains multiple MAC Address;
According to the multiple network downloading rate and the multiple MAC Address establish network downloading rate and MAC Address it Between corresponding relationship;
The multiple network downloading rate is ranked up, maximum target network downloading rate is obtained;
The corresponding destination-mac address of the target network downloading rate is determined according to the corresponding relationship, according to the mesh Mark MAC Address determines the target NAN equipment.
Optionally, such as Fig. 5 B, Fig. 5 B is the modification structures of network connection device shown in Fig. 5 A, compared with Fig. 5 A, Can also include:Receiving unit 504, wherein after the transmission network connecting request to the target NAN equipment,
The receiving unit 504, for being carrying out downloading data greater than the first preset threshold in the target NAN equipment Downloading task when, receive the response message for the refusal request that the target NAN equipment is sent;
The transmission unit 503 is also used to the network downloading rate into the multiple NAN equipment and is less than the target NAN Equipment, the alternative NAN equipment greater than other NAN equipment send the second network request, and second network request is for requesting institute It states target NAN equipment and sends the second network response data;
The connection unit 501 is also used to receive the second network response data that the alternative NAN equipment is sent.
Optionally, the connection unit 501, is also used to establish wireless network connection;
And fail in the wireless network connection, alternatively, wireless network connection success, but the electronic equipment Network rate less than the second preset threshold when, execute the neighbouring perception established between electronic equipment and multiple NAN equipment The operation of network N AN.
As can be seen that network connection device described in the embodiment of the present application, by establishing electronic equipment and multiple NAN Neighbouring sensing network NAN between equipment, determines the network downloading rate of every NAN equipment in multiple NAN equipment, obtains multiple Network downloading rate determines the maximum target NAN equipment of network downloading rate in multiple NAN equipment, sends to target NAN equipment First network request, first network request send first network response data for request target NAN equipment, receive target NAN The first network response data that equipment is sent, thus, electronic equipment is downloaded by comparing the network of multiple NAN equipment that can be surfed the Internet Rate chooses the faster NAN device request network response data of network downloading rate, to realize the online of more excellent rate.
It is understood that the function of each program module of the network connection device of the present embodiment can be according to above method reality The method specific implementation in example is applied, specific implementation process is referred to the associated description of above method embodiment, herein no longer It repeats.
The embodiment of the present application also provides a kind of computer storage medium, wherein computer storage medium storage is for electricity The computer program of subdata exchange, it is as any in recorded in above method embodiment which execute computer A kind of some or all of method for connecting network step.
The embodiment of the present application also provides a kind of computer program product, and the computer program product includes storing calculating The non-transient computer readable storage medium of machine program, the computer program are operable to that computer is made to execute such as above-mentioned side Some or all of any method for connecting network recorded in method embodiment step.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, the application is not limited by the described action sequence because According to the application, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, related actions and modules not necessarily the application It is necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed device, it can be by another way It realizes.For example, the apparatus embodiments described above are merely exemplary, such as the division of the unit, it is only a kind of Logical function partition, there may be another division manner in actual implementation, such as multiple units or components can combine or can To be integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Coupling, direct-coupling or communication connection can be through some interfaces, the indirect coupling or communication connection of device or unit, It can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also be realized in the form of software program module.
If the integrated unit is realized in the form of software program module and sells or use as independent product When, it can store in a computer-readable access to memory.Based on this understanding, the technical solution of the application substantially or Person says that all or part of the part that contributes to existing technology or the technical solution can body in the form of software products Reveal and, which is stored in a memory, including some instructions are used so that a computer equipment (can be personal computer, server or network equipment etc.) executes all or part of each embodiment the method for the application Step.And memory above-mentioned includes:USB flash disk, read-only memory (read-only memory, ROM), random access memory The various media that can store program code such as (random access memory, RAM), mobile hard disk, magnetic or disk.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can It is completed with instructing relevant hardware by program, which can store in a computer-readable memory, memory May include:Flash disk, ROM, RAM, disk or CD etc..
The embodiment of the present application is described in detail above, specific case used herein to the principle of the application and Embodiment is expounded, the description of the example is only used to help understand the method for the present application and its core ideas; At the same time, for those skilled in the art can in specific embodiments and applications according to the thought of the application There is change place, in conclusion the contents of this specification should not be construed as limiting the present application.

Claims (10)

1. a kind of method for connecting network, which is characterized in that the method includes:
Establish the neighbouring sensing network NAN between electronic equipment and multiple NAN equipment;
The network downloading rate for determining every NAN equipment in the multiple NAN equipment obtains multiple network downloading rates;
Determine the maximum target NAN equipment of network downloading rate in the multiple NAN equipment;
First network request is sent to the target NAN equipment, the first network request is for requesting the target NAN equipment Send first network response data;
Receive the first network response data that the target NAN equipment is sent.
2. the method according to claim 1, wherein every NAN equipment in the multiple NAN equipment of the determination Network downloading rate, obtain multiple network downloading rates, including:
Into the multiple NAN equipment, every NAN equipment sends network downloading rate inquiry request;
The network downloading rate that every NAN equipment is sent in the multiple NAN equipment is received, multiple network downloading rates are obtained, Downloading speed when the network downloading rate is the preset data to be downloaded of every NAN device downloads in the multiple NAN equipment Degree.
3. method according to claim 1 or 2, which is characterized in that network is downloaded in the multiple NAN equipment of determination The maximum target NAN equipment of rate, including:
The MAC Address for obtaining every NAN equipment in the multiple NAN equipment, obtains multiple MAC Address;
It is established between network downloading rate and MAC Address according to the multiple network downloading rate and the multiple MAC Address Corresponding relationship;
The multiple network downloading rate is ranked up, maximum target network downloading rate is obtained;
The corresponding destination-mac address of the target network downloading rate is determined according to the corresponding relationship, according to the Destination MAC Address determines the target NAN equipment.
4. according to the method described in claim 3, it is characterized in that, being connected to the network in described sent to the target NAN equipment After request, the method also includes:
If the target NAN equipment is carrying out the downloading task that downloading data is greater than the first preset threshold, the target is received The response message for the refusal request that NAN equipment is sent;
Into the multiple NAN equipment, network downloading rate is less than the target NAN equipment, alternative greater than other NAN equipment NAN equipment sends the second network request, and second network request is rung for requesting the target NAN equipment to send the second network Answer data;
Receive the second network response data that the alternative NAN equipment is sent.
5. method according to any one of claims 1 to 4, which is characterized in that the method also includes:
Establish wireless network connection;
If the wireless network connection failure, alternatively, wireless network connection success, but the network rate of the electronic equipment Less than the second preset threshold, the behaviour for establishing the neighbouring sensing network NAN between electronic equipment and multiple NAN equipment is executed Make.
6. a kind of network connection device, which is characterized in that the network connection device includes:
Connection unit, for establishing the neighbouring sensing network NAN between electronic equipment and multiple NAN equipment;
Determination unit obtains multiple networks for determining the network downloading rate of every NAN equipment in the multiple NAN equipment Downloading rate;
The determination unit is also used to determine the maximum target NAN equipment of network downloading rate in the multiple NAN equipment;
Transmission unit, for sending first network request to the target NAN equipment, the first network request is for requesting It states target NAN equipment and sends first network response data;
The connection unit is also used to receive the first network response data that the target NAN equipment is sent.
7. network connection device according to claim 6, which is characterized in that in the multiple NAN equipment of the determination The network downloading rate of every NAN equipment, in terms of obtaining multiple network downloading rates, the determination unit is specifically used for:
Into the multiple NAN equipment, every NAN equipment sends network downloading rate inquiry request;
The network downloading rate that every NAN equipment is sent in the multiple NAN equipment is received, multiple network downloading rates are obtained, Downloading speed when the network downloading rate is the preset data to be downloaded of every NAN device downloads in the multiple NAN equipment Degree.
8. network connection device according to claim 6 or 7, which is characterized in that in the multiple NAN equipment of the determination The middle maximum target NAN equipment aspect of network downloading rate, the determination unit are specifically used for:
The MAC Address for obtaining every NAN equipment in the multiple NAN equipment, obtains multiple MAC Address;
It is established between network downloading rate and MAC Address according to the multiple network downloading rate and the multiple MAC Address Corresponding relationship;
The multiple network downloading rate is ranked up, maximum target network downloading rate is obtained;
The corresponding destination-mac address of the target network downloading rate is determined according to the corresponding relationship, according to the Destination MAC Address determines the target NAN equipment.
9. a kind of electronic equipment, which is characterized in that including:Processor and memory;And one or more programs, it is one Or multiple programs are stored in the memory, and are configured to be executed by the processor, described program includes being used for Such as the instruction of any one of claim 1-5 method.
10. a kind of computer readable storage medium, which is characterized in that it is used to store computer program, wherein the computer Program makes computer execute the method according to claim 1 to 5.
CN201810821203.5A 2018-07-24 2018-07-24 Network connection method and related product Active CN108900385B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810821203.5A CN108900385B (en) 2018-07-24 2018-07-24 Network connection method and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810821203.5A CN108900385B (en) 2018-07-24 2018-07-24 Network connection method and related product

Publications (2)

Publication Number Publication Date
CN108900385A true CN108900385A (en) 2018-11-27
CN108900385B CN108900385B (en) 2021-02-26

Family

ID=64351636

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810821203.5A Active CN108900385B (en) 2018-07-24 2018-07-24 Network connection method and related product

Country Status (1)

Country Link
CN (1) CN108900385B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112788700A (en) * 2021-02-25 2021-05-11 芜湖美的厨卫电器制造有限公司 Communication method, terminal and readable storage medium
CN115567505A (en) * 2022-01-10 2023-01-03 荣耀终端有限公司 Method, device and storage medium for displaying network acceleration effect

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160073330A1 (en) * 2014-09-05 2016-03-10 Qualcomm Incorporated Infrastructure access via neighbor awareness networking data path
CN105430633A (en) * 2014-08-22 2016-03-23 电信科学技术研究院 Method and equipment for determining relay node
CN105933224A (en) * 2016-04-15 2016-09-07 国网河北省电力公司 Opportunistic routing method for improving reliability of communication network
CN106576287A (en) * 2015-02-27 2017-04-19 华为技术有限公司 Access point (AP) discovery method and apparatus
CN106713138A (en) * 2016-12-30 2017-05-24 北京奇虎科技有限公司 Cross-domain transmission method and apparatus of streaming data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105430633A (en) * 2014-08-22 2016-03-23 电信科学技术研究院 Method and equipment for determining relay node
US20160073330A1 (en) * 2014-09-05 2016-03-10 Qualcomm Incorporated Infrastructure access via neighbor awareness networking data path
CN106576287A (en) * 2015-02-27 2017-04-19 华为技术有限公司 Access point (AP) discovery method and apparatus
CN105933224A (en) * 2016-04-15 2016-09-07 国网河北省电力公司 Opportunistic routing method for improving reliability of communication network
CN106713138A (en) * 2016-12-30 2017-05-24 北京奇虎科技有限公司 Cross-domain transmission method and apparatus of streaming data

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112788700A (en) * 2021-02-25 2021-05-11 芜湖美的厨卫电器制造有限公司 Communication method, terminal and readable storage medium
CN115567505A (en) * 2022-01-10 2023-01-03 荣耀终端有限公司 Method, device and storage medium for displaying network acceleration effect
CN115567505B (en) * 2022-01-10 2023-06-30 荣耀终端有限公司 Method, device and storage medium for displaying network acceleration effect

Also Published As

Publication number Publication date
CN108900385B (en) 2021-02-26

Similar Documents

Publication Publication Date Title
CN108924910B (en) AI model updating method and related product
CN109068206A (en) Principal and subordinate's earphone method for handover control and Related product
CN109120683A (en) data transmission method and related product
CN106331213A (en) Domain name system DNS processing method and apparatus
CN108683444A (en) Data transmission method and related product
CN106055209B (en) A kind of starting application method and terminal device
CN108769377A (en) Method of controlling antenna and Related product
CN106412033A (en) Data migration method and terminal
CN108777741A (en) antenna switching control method and related product
CN110475020A (en) Apparatus control method and Related product
CN106446111A (en) Data migration method and terminal
CN109068372A (en) Neighbouring sensing network creation method and Related product
CN107145386A (en) Data migration method, terminal device and computer-readable recording medium
CN108934083A (en) Communicate to connect method for building up and relevant device
CN108769401A (en) Signal detecting method and related product
CN108900385A (en) Method for connecting network and Related product
CN108966290A (en) Method for connecting network and Related product
CN109271312A (en) Game test method and Related product
CN108769286A (en) Dns server configuration method and related product
CN109039563A (en) Carrier wave aggregation configuration method and Related product
CN107317828A (en) Document down loading method and device
CN108494851A (en) Application program recommends method, apparatus and mobile terminal
CN109195226A (en) data transmission method and related product
CN109117370A (en) Game test method and Related product
CN108667589A (en) Carrier wave aggregation configuration method and Related product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant