CN108064071B - Network connection method, device, storage medium and electronic equipment - Google Patents

Network connection method, device, storage medium and electronic equipment Download PDF

Info

Publication number
CN108064071B
CN108064071B CN201810150909.3A CN201810150909A CN108064071B CN 108064071 B CN108064071 B CN 108064071B CN 201810150909 A CN201810150909 A CN 201810150909A CN 108064071 B CN108064071 B CN 108064071B
Authority
CN
China
Prior art keywords
network
server
network connection
address
operation parameters
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.)
Expired - Fee Related
Application number
CN201810150909.3A
Other languages
Chinese (zh)
Other versions
CN108064071A (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 CN201810150909.3A priority Critical patent/CN108064071B/en
Publication of CN108064071A publication Critical patent/CN108064071A/en
Application granted granted Critical
Publication of CN108064071B publication Critical patent/CN108064071B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/02Access restriction performed under specific conditions
    • H04W48/06Access restriction performed under specific conditions based on traffic conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery

Landscapes

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

Abstract

The application discloses a network connection method, a device, a storage medium and an electronic device, wherein the network connection method is applied to the electronic device and comprises the following steps: when detecting that the electronic equipment is successfully accessed to the wireless access point, generating an address request data packet; acquiring current network operation parameters and adjusting the network operation parameters, wherein the network operation parameters comprise a network transmission rate and a network environment state; sending the address request data packet to at least one server based on the adjusted network operation parameters, so that the server returns corresponding address information according to the address request data packet; the address information returned by the server is utilized to carry out network connection, thereby avoiding the influence of network delay on network connection operation and reducing the packet loss phenomenon of the DHCP packet.

Description

Network connection method, device, storage medium and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a network connection method, an apparatus, a storage medium, and an electronic device.
Background
With the rapid development of mobile communication technology, mobile devices can not only realize the basic function of telephone messages, but also can realize the function of surfing the internet.
Currently, network connection of a mobile device is mainly implemented based on a wireless access node (generally referred to as an Access Point (AP)) and a DHCP Protocol (Dynamic Host Configuration Protocol), for example: when a mobile device wants to connect to a certain wireless network a, it obtains a Service Set Identifier (SSID) and a Password (Password) of an access point of the wireless network a, and accesses the AP through a WiFi device (e.g., a wireless router) by using the SSID and the Password, and after the access is successful, the mobile device sends an address request packet to a DHCP server to request the DHCP server to provide an available time-limited IP address, and then the mobile device performs network access by using the IP address. The existing network connection is easily influenced by the environment, the failure rate of the operation of obtaining the IP address is high in the complex environment, and the connection stability is difficult to guarantee.
Disclosure of Invention
The embodiment of the application provides a network connection method, a network connection device, a storage medium and an electronic device, which can improve the stability of network connection operation and have good connection effect.
The embodiment of the application provides a network connection method, which is applied to electronic equipment and comprises the following steps:
when the electronic equipment is detected to be successfully accessed to the wireless access point, generating an address request data packet;
acquiring current network operation parameters and adjusting the network operation parameters, wherein the network operation parameters comprise a network transmission rate and a network environment state;
sending the address request data packet to at least one server based on the adjusted network operation parameters, so that the server returns corresponding address information according to the address request data packet;
and performing network connection by using the address information returned by the server.
An embodiment of the present application further provides a network connection device, which is applied to an electronic device, and includes:
the generation module is used for generating an address request data packet when detecting that the electronic equipment is successfully accessed to the wireless access point;
the adjusting module is used for acquiring current network operation parameters and adjusting the network operation parameters, wherein the network operation parameters comprise network transmission rate and network environment state;
the sending module is used for sending the address request data packet to at least one server based on the adjusted network operation parameters so as to enable the server to return corresponding address information according to the address request data packet;
and the connection module is used for performing network connection by using the address information returned by the server.
The embodiment of the application also provides a storage medium, wherein a plurality of instructions are stored in the storage medium, and the instructions are suitable for being loaded by a processor to execute any one of the network connection methods.
An embodiment of the present application further provides an electronic device, which includes a processor and a memory, where the processor is electrically connected to the memory, the memory is used to store instructions and data, and the processor is used in any one of the steps in the network connection method.
The network connection method, the device, the storage medium and the electronic equipment are applied to the electronic equipment, when the electronic equipment is detected to be successfully accessed into a wireless access point, an address request data packet is generated, then, current network operation parameters are obtained and adjusted, the network operation parameters comprise network transmission rate and network environment state, then, the address request data packet is sent to at least one server based on the adjusted network operation parameters, so that the server returns corresponding address information according to the address request data packet, network connection is performed by utilizing the address information returned by the server, the influence of network delay on network connection operation can be avoided, the packet loss phenomenon of a DHCP packet is reduced, the stability of the network connection operation is improved, and the method is simple.
Drawings
The technical solution and other advantages of the present application will become apparent from the detailed description of the embodiments of the present application with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of a network connection method according to an embodiment of the present application.
Fig. 2 is another schematic flow chart of a network connection method according to an embodiment of the present disclosure.
Fig. 3 is a schematic view of a scenario of interaction between a server and an electronic device according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of a network connection device according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of a connection module according to an embodiment of the present application.
Fig. 6 is another schematic structural diagram of a network connection device according to an embodiment of the present application.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a network connection method, a network connection device, a storage medium and electronic equipment.
A network connection method is applied to electronic equipment and comprises the following steps: when detecting that the electronic equipment is successfully accessed to the wireless access point, generating an address request data packet; acquiring current network operation parameters and adjusting the network operation parameters, wherein the network operation parameters comprise a network transmission rate and a network environment state; sending the address request data packet to at least one server based on the adjusted network operation parameters, so that the server returns corresponding address information according to the address request data packet; and performing network connection by using the address information returned by the server.
As shown in fig. 1, fig. 1 is a schematic flow chart of a network connection method provided in an embodiment of the present application, which is applied to an electronic device, and a specific flow may be as follows:
101. and when the electronic equipment is detected to be successfully accessed into the wireless access point, generating an address request data packet.
In this embodiment, the wireless access point generally refers to an AP access point, which is equivalent to a bridge connecting a network and a wireless network, and is mainly used to connect wireless network clients together and then access the wireless network to an ethernet network. The address request packet is a broadcast packet, and is mainly used for requesting an available internet Protocol address (i.e., IP address) and subnet mask to a DHCP (Dynamic Host Configuration Protocol) server in a local area network where the electronic device is located.
102. And acquiring current network operation parameters, and adjusting the network operation parameters, wherein the network operation parameters comprise a network transmission rate and a network environment state.
In this embodiment, the network environment status mainly relates to some environmental factors that affect network connection, such as a network power saving mode and a network scanning operation that may cause network delay, where the network power saving mode is to automatically control WiFi to enter a sleep state when no data is received or transmitted, and the network scanning operation is to periodically or real-timely detect WiFi available around.
Further, the step of "adjusting the network operation parameter" may specifically include:
and adjusting the network transmission rate to a preset rate, and adjusting the network environment state to a preset state, wherein the preset state comprises the steps of closing a network power saving mode and forbidding network scanning.
In this embodiment, both the preset rate and the preset state may be set manually, for example, considering that the data volume of the address request data packet (i.e. DHCP packet) is usually small, in order to improve the success rate of sending the DHCP packet and reduce packet loss, the network transmission rate (i.e. preset rate) may be set to be small, for example, 6M/S. Meanwhile, the WiFi power saving mode and the WiFi scanning operation can be closed, the failure of sending the DHCP packet caused by network delay is avoided, and the stability of network connection is improved.
103. And sending the address request data packet to at least one server based on the adjusted network operation parameters, so that the server returns corresponding address information according to the address request data packet.
In this embodiment, since the same lan may be connected to a plurality of network outlets (i.e., DHCP servers, such as routers) with DHCP services, when the electronic device broadcasts in the lan, all servers in the lan can receive the broadcast signal and return a response packet to the electronic device according to the situation of the electronic device, where the response packet may include a server address of the response server, an available IP address provided by the response server, and a subnet mask, so that the electronic device connects to the network.
For example, the step 103 may specifically include:
and sending the address request data packet to at least one server by using the preset rate in the preset state.
In this embodiment, the address request packet is sent in the local area network in a broadcast manner, and all servers located in the local area network can receive the broadcast information.
104. And performing network connection by using the address information returned by the server.
In this embodiment, for response packets returned by the multiple servers, the electronic device may only select one of the multiple servers to perform network connection, and broadcast the selected result in the local area network, where the selected result usually includes the server address of the selected server and the allocated IP address, after broadcast, all the servers may determine whether the server is a server according to the server address in the selected result, if not, clear the allocation record of the corresponding IP address of the server, so as to perform subsequent reallocation, and if so, further determine the use lease of the IP address to the electronic device in an interactive manner, so as to ensure that the electronic device can effectively use the IP address in the use lease.
It should be noted that, for a plurality of response packets, the electronic device usually selects the server that has fed back the earliest response packet to perform network connection, and once the server and the electronic device have reached a lease consensus, unless the user changes the IP address manually, the leased IP address cannot be easily changed, and the IP address is used until the lease expires, but since the feedback time depends on the distance between the server and the electronic device, the closer the distance is, the stronger the signal strength is, and the earlier the feedback time is, the server connected in this way can only guarantee a better signal strength, and cannot guarantee a better network speed, and in this case, when selecting the appropriate IP address, some other factors can be referred to.
For example, the step 104 may specifically include:
acquiring the return time of the address information and the historical interaction times of the server and the electronic equipment;
determining a target server from the at least one server according to the historical interaction times and the return time;
and performing network connection by using the address information returned by the target server.
In this embodiment, the historical interaction times mainly refer to the times of renting the IP address provided by the server by the electronic device in the historical time period, and the renting may be automatically selected by the electronic device or manually input and selected by the user.
For example, the step of "determining a target server from the at least one server according to the historical interaction times and the return time" may specifically include:
calculating the recommendation degree of the corresponding server according to the historical interaction times and the return time;
and selecting the server with the highest recommendation degree as a target server.
In this embodiment, the user may preset respective weights of the historical interaction times and the return time, and calculate the recommendation degree according to the weights, for example, the weights of the historical interaction times and the return time may be 0.4 and 0.6, respectively, so that the calculation formula of the recommendation degree may be: 0.4 × historical interaction times +0.6 × return time.
Further, after the step 104, the network connection method may further include:
starting a network power saving mode and allowing network scanning;
detecting the data volume of data to be transmitted;
and adjusting the network transmission rate according to the data volume.
In this embodiment, after the electronic device is successfully connected to the network, the network power saving mode and the network scanning operation may be resumed, and the network transmission rate is changed from the fixed rate to the adaptive adjustment formula, so that the electronic device is in the best usage performance.
It can be known from the above that, the network connection method provided in this embodiment is applied to an electronic device, and is implemented by obtaining current network operation parameters, and adjusting the network operation parameters, where the network operation parameters include a network transmission rate and a network environment state, and then sending the address request data packet to at least one server based on the adjusted network operation parameters, so that the server returns corresponding address information according to the address request data packet, and performs network connection by using the address information returned by the server, thereby avoiding an influence of network delay on network connection operation, reducing a packet loss phenomenon of a DHCP packet, and improving stability of network connection operation.
In the present embodiment, the description will be made from the perspective of a network connection device, and in particular, the detailed description will be made by taking as an example that the network connection device is integrated in an electronic apparatus.
Referring to fig. 2, a network connection method is applied to an electronic device, and the specific process may be as follows:
201. when successful access to the wireless access point is detected, the electronic device generates an address request packet.
For example, when the electronic device is powered on, it will automatically search for the suitable AP points around for access, and when the access is successful, generate an address request packet to request the DHCP server in the local area network where the electronic device is located to allocate an available internet protocol address (i.e., IP address) and subnet mask.
202. The electronic equipment acquires current network operation parameters, wherein the network operation parameters comprise a network transmission rate and a network environment state, then adjusts the network transmission rate to a preset rate, and adjusts the network environment state to a preset state, and the preset state comprises a network power saving mode closing mode and a network scanning forbidding mode.
For example, to avoid the interaction failure with the DHCP server due to network delay, the network power saving mode of the electronic device may be turned off and network scanning may be disabled, and at the same time, to reduce packet loss, the network transmission rate may be adjusted to a fixed rate suitable for sending only DHCP packets.
203. And the electronic equipment sends the address request data packet to at least one server by utilizing the preset speed in the preset state, so that the server returns corresponding address information according to the address request data packet.
For example, the electronic device may send the address request packet in a broadcast manner, and the sending rate may be fixed at 6M/S.
204. The electronic equipment acquires the return time of the server for returning the address information and the historical interaction times of the server and the electronic equipment, and calculates the recommendation degree of the corresponding server according to the historical interaction times and the return time.
For example, referring to fig. 3, after receiving the broadcast, each server in the same lan returns a response packet to the electronic device according to its own condition, where the response packet may include a server address of the response server, an available IP address provided by the response server, and a subnet mask, so that the electronic device connects to the network, and the electronic device identifies which server is based on the returned server address, and obtains the historical interaction times of the server with itself and the return time of the address information. The weights of the historical interaction times and the return time may be artificially set to 0.4 and 0.6, so that the calculation formula of the recommendation degree may be: 0.4 × historical interaction times +0.6 × return time.
205. The electronic equipment selects the server with the highest recommendation degree as a target server, and network connection is carried out by utilizing address information returned by the target server.
For example, the higher the recommendation degree, the more the interaction times between the corresponding server and the electronic device are, and the faster the return time is, the server selected in this way can ensure a better network signal and network speed.
206. When the network connection is successful, the electronic equipment starts a network power saving mode, allows the network to scan, detects the data volume of data to be sent, and adjusts the network transmission rate according to the data volume.
For example, after the electronic device is successfully connected to the network, the WIFI power saving mode can be turned on again and WIFI scanning is allowed to be initiated, so that when no data exists, WIFI can sleep normally, electric quantity is saved as far as possible, and the fixed sending rate of data can be cancelled, so that WIFI can dynamically adjust the rate according to the actual environment, and the network transmission effect is high and flexible.
As can be seen from the above, the network connection method provided in this embodiment is applied to an electronic device, wherein when it is detected that a wireless access point is successfully accessed, the electronic device may generate an address request packet and obtain current network operation parameters, where the network operation parameters include a network transmission rate and a network environment state, then adjust the network transmission rate to a preset rate, and adjust the network environment state to a preset state, where the preset state includes turning off a network power saving mode and prohibiting network scanning, then, in the preset state, send the address request packet to at least one server using the preset rate, so that the server returns corresponding address information according to the address request packet, then, obtain a return time for the server to return the address information, and historical interaction times of the server and the electronic device, and calculating the recommendation degree of the corresponding server according to the historical interaction times and the return time, then selecting the server with the highest recommendation degree as a target server, and performing network connection by using address information returned by the target server, when the network connection is successful, starting a network power saving mode by the electronic equipment, allowing network scanning, simultaneously detecting the data volume of data to be sent, and adjusting the network transmission rate according to the data volume, thereby avoiding the influence of network delay on the network connection operation, reducing the packet loss phenomenon of a DHCP packet, and improving the stability of the network connection operation.
According to the method described in the foregoing embodiment, the present embodiment will be further described from the perspective of a network connection device, which may be specifically implemented as a stand-alone entity, or may be implemented by being integrated in an electronic device, such as a terminal, which may include a mobile phone, a tablet computer, a personal computer, and the like.
Referring to fig. 4, fig. 4 specifically illustrates a network connection device provided in the embodiment of the present application, which is applied to an electronic device, and the network connection device may include: a generating module 10, a first adjusting module 20, a sending module 30 and a connecting module 40, wherein:
(1) generating module 10
A generating module 10, configured to generate an address request packet when it is detected that the electronic device successfully accesses the wireless access point.
In this embodiment, the wireless access point generally refers to an AP access point, which is equivalent to a bridge connecting a network and a wireless network, and is mainly used to connect wireless network clients together and then access the wireless network to an ethernet network. The address request packet is a broadcast packet, and is mainly used for requesting an available internet Protocol address (i.e., IP address) and subnet mask to a DHCP (Dynamic Host Configuration Protocol) server in a local area network where the electronic device is located.
(2) First adjusting module 20
The first adjusting module 20 is configured to obtain a current network operating parameter, and adjust the network operating parameter, where the network operating parameter includes a network transmission rate and a network environment status.
In this embodiment, the network environment status mainly relates to some environmental factors that affect network connection, such as a network power saving mode and a network scanning operation that may cause network delay, where the network power saving mode is to automatically control WiFi to enter a sleep state when no data is received or transmitted, and the network scanning operation is to periodically or real-timely detect WiFi available around.
Further, the first adjusting module 20 may be configured to:
and adjusting the network transmission rate to a preset rate, and adjusting the network environment state to a preset state, wherein the preset state comprises the steps of closing a network power saving mode and forbidding network scanning.
In this embodiment, both the preset rate and the preset state may be set manually, for example, considering that the data volume of the address request data packet (i.e. DHCP packet) is usually small, in order to improve the success rate of sending the DHCP packet and reduce packet loss, the network transmission rate (i.e. preset rate) may be set to be small, for example, 6M/S. Meanwhile, the WiFi power saving mode and the WiFi scanning operation can be closed, the failure of sending the DHCP packet caused by network delay is avoided, and the stability of network connection is improved.
(3) Transmission module 30
A sending module 30, configured to send the address request data packet to at least one server based on the adjusted network operating parameter, so that the server returns corresponding address information according to the address request data packet.
In this embodiment, since the same lan may be connected to a plurality of network outlets (i.e., DHCP servers, such as routers) with DHCP services, when the electronic device broadcasts in the lan, all servers in the lan can receive the broadcast signal and return a response packet to the electronic device according to the situation of the electronic device, where the response packet may include a server address of the response server, an available IP address provided by the response server, and a subnet mask, so that the electronic device connects to the network.
For example, the sending module 30 may specifically be configured to:
and sending the address request data packet to at least one server by using the preset rate in the preset state.
In this embodiment, the sending module 30 sends the address request packet in the local area network in a broadcast manner, and all servers located in the local area network can receive the broadcast information.
(4) Connection module 40
And the connection module 40 is used for performing network connection by using the address information returned by the server.
In this embodiment, for response packets returned by the multiple servers, the electronic device may only select one of the multiple servers to perform network connection, and broadcast the selected result in the local area network, where the selected result usually includes the server address of the selected server and the allocated IP address, after broadcast, all the servers may determine whether the server is a server according to the server address in the selected result, if not, clear the allocation record of the corresponding IP address of the server, so as to perform subsequent reallocation, and if so, further determine the use lease of the IP address to the electronic device in an interactive manner, so as to ensure that the electronic device can effectively use the IP address in the use lease.
It should be noted that, for a plurality of response packets, the electronic device usually selects the server that has fed back the earliest response packet to perform network connection, and once the server and the electronic device have reached a lease consensus, unless the user changes the IP address manually, the leased IP address cannot be easily changed, and the IP address is used until the lease expires, but since the feedback time depends on the distance between the server and the electronic device, the closer the distance is, the stronger the signal strength is, and the earlier the feedback time is, the server connected in this way can only guarantee a better signal strength, and cannot guarantee a better network speed, and in this case, when selecting the appropriate IP address, some other factors can be referred to.
For example, referring to fig. 5, the connection module 40 may specifically include an obtaining sub-module 41, a determining sub-module 42, and a connecting sub-module 43, where:
an obtaining submodule 41, configured to obtain return time of the address information and historical interaction times of the server and the electronic device;
a determining submodule 42 for determining a target server from the at least one server according to the historical interaction times and the return time;
and a connection submodule 43, configured to perform network connection by using address information returned by the target server.
In this embodiment, the historical interaction times mainly refer to the times of renting the IP address provided by the server by the electronic device in the historical time period, and the renting may be automatically selected by the electronic device or manually input and selected by the user.
Further, the determining submodule 42 may be specifically configured to:
calculating the recommendation degree of the corresponding server according to the historical interaction times and the return time;
and selecting the server with the highest recommendation degree as a target server.
In this embodiment, the user may preset respective weights of the historical interaction times and the return time, and calculate the recommendation degree according to the weights, for example, the weights of the historical interaction times and the return time may be 0.4 and 0.6, respectively, so that the calculation formula of the recommendation degree may be: 0.4 × historical interaction times +0.6 × return time.
In addition, referring to fig. 6, the network connection device may further include a second adjusting module 50, configured to:
after the connection module 40 performs network connection by using the address information returned by the server, a network power saving mode is started, and network scanning is allowed;
detecting the data volume of data to be transmitted;
and adjusting the network transmission rate according to the data volume.
In this embodiment, after the electronic device is successfully connected to the network, the second adjusting module 50 may resume the network power saving mode and the network scanning operation, and change the network transmission rate from the fixed rate to the adaptive adjusting mode, so as to enable the electronic device to be in the best usage performance.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
As can be seen from the above, the network connection apparatus provided in this embodiment is applied to an electronic device, and when it is detected that the electronic device successfully accesses a wireless access point, by generating the address request packet through the generating module 10, the first adjusting module 20 obtains the current network operation parameter, and adjusts the network operation parameter, the network operating parameters include a network transmission rate and a network environment status, and then the sending module 30 sends the address request packet to at least one server based on the adjusted network operating parameters, so that the server returns corresponding address information according to the address request packet, the connection module 40 performs network connection using the address information returned by the server, therefore, the influence of network delay on network connection operation can be avoided, the packet loss phenomenon of the DHCP packet is reduced, the stability of the network connection operation is improved, and the method is simple.
In addition, the embodiment of the application also provides electronic equipment which can be equipment such as a smart phone and a tablet computer. As shown in fig. 7, the electronic device 900 includes a processor 901, a memory 902, a display 903, and a control circuit 904. The processor 901 is electrically connected to the memory 902, the display 903, and the control circuit 904.
The processor 901 is a control center of the electronic device 900, connects various parts of the whole electronic device by using various interfaces and lines, executes various functions of the electronic device and processes data by running or loading an application program stored in the memory 902 and calling the data stored in the memory 902, thereby performing overall monitoring of the electronic device.
In this embodiment, the processor 901 in the electronic device 900 loads instructions corresponding to processes of one or more application programs into the memory 902 according to the following steps, and the processor 901 runs the application programs stored in the memory 902, so as to implement various functions:
when detecting that the electronic equipment is successfully accessed to the wireless access point, generating an address request data packet;
acquiring current network operation parameters and adjusting the network operation parameters, wherein the network operation parameters comprise a network transmission rate and a network environment state;
sending the address request data packet to at least one server based on the adjusted network operation parameters, so that the server returns corresponding address information according to the address request data packet;
and performing network connection by using the address information returned by the server.
Memory 902 may be used to store applications and data. The memory 902 stores applications containing instructions executable in the processor. The application programs may constitute various functional modules. The processor 901 executes various functional applications and data processing by running an application program stored in the memory 902.
The display 903 may be used to display information input by or provided to the user as well as various graphical user interfaces of the terminal, which may be comprised of images, text, icons, video, and any combination thereof.
The control circuit 904 is electrically connected to the display 903, and is configured to control the display 903 to display information.
In some embodiments, as shown in fig. 7, electronic device 900 further comprises: a radio frequency circuit 905, an input unit 906, an audio circuit 907, a sensor 908, and a power supply 909. The processor 901 is electrically connected to the rf circuit 905, the input unit 906, the audio circuit 907, the sensor 908, and the power source 909.
The radio frequency circuit 905 is configured to receive and transmit radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and receive and transmit signals with the network device or other electronic devices.
The input unit 906 may be used to receive input numbers, character information, or user characteristic information (e.g., a fingerprint), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. The input unit 906 may include a fingerprint recognition module.
The audio circuit 907 may provide an audio interface between the user and the terminal through a speaker, microphone, or the like.
The electronic device 900 may also include at least one sensor 908, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that may turn off the display panel and/or the backlight when the terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal, detailed description is omitted here.
The power supply 909 is used to supply power to the various components of the electronic device 900. In some embodiments, the power source 909 may be logically connected to the processor 901 through a power management system, so that functions of managing charging, discharging, and power consumption management are realized through the power management system.
Although not shown in fig. 7, the electronic device 900 may further include a camera, a bluetooth module, etc., which are not described in detail herein.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor. To this end, the present invention provides a storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the network connection methods provided by the embodiments of the present invention.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium can execute the steps in any network connection method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any network connection method provided in the embodiments of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
In summary, although the present application has been described with reference to the preferred embodiments, the above-described preferred embodiments are not intended to limit the present application, and those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present application, so that the scope of the present application shall be determined by the appended claims.

Claims (8)

1. A network connection method applied to an electronic device is characterized by comprising the following steps:
when the electronic equipment is detected to be successfully accessed to the wireless access point, generating an address request data packet;
acquiring current network operation parameters and adjusting the network operation parameters, wherein the network operation parameters comprise a network transmission rate and a network environment state;
sending the address request data packet to at least one server based on the adjusted network operation parameters, so that the server returns corresponding address information according to the address request data packet, including: sending the address request data packet to at least one server by using a preset rate in a preset state, wherein the preset state comprises the steps of closing a network power saving mode and forbidding network scanning, and the preset rate is set to be a fixed rate suitable for sending a DHCP packet;
the network connection is carried out by utilizing the address information returned by the server, and the method comprises the following steps: acquiring the return time of the address information and the historical interaction times of the server and the electronic equipment; calculating the recommendation degree of the corresponding server according to the historical interaction times and the return time; selecting a server with the highest recommendation degree as a target server; and performing network connection by using the address information returned by the target server.
2. The network connection method of claim 1, wherein the adjusting the network operating parameter comprises:
and adjusting the network transmission rate to a preset rate, and adjusting the network environment state to a preset state, wherein the preset state comprises the steps of closing a network power saving mode and forbidding network scanning.
3. The network connection method according to claim 2, further comprising, after performing network connection using the address information returned by the server:
starting a network power saving mode and allowing network scanning;
detecting the data volume of data to be transmitted;
and adjusting the network transmission rate according to the data volume.
4. A network connection device applied to an electronic device, comprising:
the generation module is used for generating an address request data packet when detecting that the electronic equipment is successfully accessed to the wireless access point;
the first adjusting module is used for acquiring current network operation parameters and adjusting the network operation parameters, wherein the network operation parameters comprise a network transmission rate and a network environment state;
the sending module is used for sending the address request data packet to at least one server based on the adjusted network operation parameters so as to enable the server to return corresponding address information according to the address request data packet; the method is specifically used for: in a preset state, sending the address request data packet to at least one server by using a preset rate; the preset state comprises the steps of closing a network power saving mode and forbidding network scanning, and the preset rate is set to be a fixed rate suitable for sending a DHCP packet;
a connection module, configured to perform network connection using the address information returned by the server, and specifically configured to: acquiring the return time of the address information and the historical interaction times of the server and the electronic equipment; calculating the recommendation degree of the corresponding server according to the historical interaction times and the return time; selecting a server with the highest recommendation degree as a target server; and performing network connection by using the address information returned by the target server.
5. The network connection device of claim 4,
the first adjusting module is used for: and adjusting the network transmission rate to a preset rate, and adjusting the network environment state to a preset state, wherein the preset state comprises the steps of closing a network power saving mode and forbidding network scanning.
6. The network connection device of claim 5, further comprising a second adjustment module configured to:
after the connection module utilizes the address information returned by the server to carry out network connection, a network power saving mode is started, and network scanning is allowed;
detecting the data volume of data to be transmitted;
and adjusting the network transmission rate according to the data volume.
7. A storage medium having stored therein a plurality of instructions adapted to be loaded by a processor to perform the network connection method of any of claims 1 to 3.
8. An electronic device comprising a processor and a memory, the processor being electrically connected to the memory, the memory being configured to store instructions and data, the processor being configured to perform the steps of the network connection method of any of claims 1 to 3.
CN201810150909.3A 2018-02-13 2018-02-13 Network connection method, device, storage medium and electronic equipment Expired - Fee Related CN108064071B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810150909.3A CN108064071B (en) 2018-02-13 2018-02-13 Network connection method, device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810150909.3A CN108064071B (en) 2018-02-13 2018-02-13 Network connection method, device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN108064071A CN108064071A (en) 2018-05-22
CN108064071B true CN108064071B (en) 2020-06-16

Family

ID=62134530

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810150909.3A Expired - Fee Related CN108064071B (en) 2018-02-13 2018-02-13 Network connection method, device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN108064071B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110380937B (en) * 2019-07-23 2021-08-31 中国工商银行股份有限公司 Network testing method and device applied to electronic equipment
CN110505675B (en) * 2019-08-12 2022-02-01 RealMe重庆移动通信有限公司 Network connection method and device, storage medium and communication terminal
DE102019005675A1 (en) 2019-08-13 2021-02-18 Daimler Ag Method for transmitting a data packet from a central electronic computing device to at least one mobile terminal, as well as a network system
CN110928598B (en) * 2019-11-11 2024-01-30 南方电网财务有限公司 System configuration method, device, computer equipment and storage medium
CN111385166A (en) * 2020-02-21 2020-07-07 苏州浪潮智能科技有限公司 Network switch testing method, device, equipment and storage medium
CN111447107B (en) * 2020-03-20 2023-10-31 Oppo广东移动通信有限公司 Network state determining method and device, storage medium and electronic equipment
CN111404830B (en) * 2020-03-23 2021-06-15 北京创世云科技有限公司 Network optimization method, device and system
CN111526607B (en) 2020-04-14 2022-07-08 北京小米移动软件有限公司 Communication data processing method and device, terminal equipment and storage medium
CN111698744A (en) * 2020-06-23 2020-09-22 广州三星通信技术研究有限公司 Method for terminal to quickly return to preferred network and apparatus using the same
CN111935299B (en) * 2020-08-19 2022-09-20 南阳理工学院 Communication equipment
CN112866065B (en) * 2021-01-07 2021-12-24 珠海格力电器股份有限公司 Equipment network distribution method and device, electronic equipment and computer readable medium
CN114697258B (en) * 2022-04-11 2024-07-02 网易(杭州)网络有限公司 Data communication method, device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104519551A (en) * 2013-09-27 2015-04-15 中国电信股份有限公司 DHCP (Dynamic Host Configuration Protocol) negotiation method and client in WiFi (Wireless Fidelity) network
CN104853378A (en) * 2014-02-17 2015-08-19 中国移动通信集团内蒙古有限公司 Method, device and terminal for detecting access capability of WIFI network
CN105050163A (en) * 2015-08-24 2015-11-11 小米科技有限责任公司 Method and device for network connection
CN106713522A (en) * 2016-12-07 2017-05-24 广东欧珀移动通信有限公司 Wireless fidelity (Wi-Fi) connection method and mobile terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5348094B2 (en) * 2010-08-31 2013-11-20 ブラザー工業株式会社 Support device and computer program
US9712489B2 (en) * 2014-07-29 2017-07-18 Aruba Networks, Inc. Client device address assignment following authentication
US9736019B2 (en) * 2015-05-14 2017-08-15 Eero Inc. Methods for dynamic router configuration in a mesh network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104519551A (en) * 2013-09-27 2015-04-15 中国电信股份有限公司 DHCP (Dynamic Host Configuration Protocol) negotiation method and client in WiFi (Wireless Fidelity) network
CN104853378A (en) * 2014-02-17 2015-08-19 中国移动通信集团内蒙古有限公司 Method, device and terminal for detecting access capability of WIFI network
CN105050163A (en) * 2015-08-24 2015-11-11 小米科技有限责任公司 Method and device for network connection
CN106713522A (en) * 2016-12-07 2017-05-24 广东欧珀移动通信有限公司 Wireless fidelity (Wi-Fi) connection method and mobile terminal

Also Published As

Publication number Publication date
CN108064071A (en) 2018-05-22

Similar Documents

Publication Publication Date Title
CN108064071B (en) Network connection method, device, storage medium and electronic equipment
AU2021269359B2 (en) Display method and apparatus
EP3731495B1 (en) Method and electronic device for edge computing service
CN107332976B (en) Karaoke method, device, equipment and system
EP3934191A1 (en) Method for edge computing service and electronic device therefor
CN107786424B (en) Audio and video communication method, terminal and server
CN112752353B (en) Connection method and terminal equipment
CN111444237A (en) Server system, data transmission method and electronic equipment
CN109039989B (en) Address resolution protocol spoofing detection method, host and computer-readable storage medium
US20230018089A1 (en) Data transmission method and electronic device
CN112333114B (en) Data transmission method, device, storage medium, terminal and network access point equipment
US20230050458A1 (en) Cell selection method, cell selection control method and reated device
CN111431882B (en) Data processing method, device and storage medium
CN109495769B (en) Video communication method, terminal, smart television, server and storage medium
CN105306244B (en) Router management method, system and equipment
CN112839326A (en) Network switching method, device, storage medium and gateway equipment
JP7550790B2 (en) Random access method and terminal
CN108712513A (en) network address setting method, device, terminal device and storage medium
CN109992430B (en) Data transmission method, first terminal and second terminal
CN108541003B (en) VoWiFi call control method and device
CN108391305B (en) WiFi hotspot selection method and terminal equipment
KR20200007634A (en) Electronic device for performing data transmission and method thereof
CN115118636A (en) Method and device for determining network jitter state, electronic equipment and storage medium
CN110365842B (en) Terminal control method and terminal equipment
CN113746909A (en) Network connection method, device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200616

CF01 Termination of patent right due to non-payment of annual fee