Method and device for optimizing startup network connection speed, storage medium and equipment

By starting the Native network connection module during the Android system's Init phase to perform network initialization and protocol interaction in parallel, the problem of slow network connection speed and insufficient stability during Android smart device startup is solved, resulting in faster network connection and more stable system startup.

CN121567928APending Publication Date: 2026-02-24FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511890441.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-15
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Android smart devices have slow network connection speeds during the boot process, which cannot meet the fast boot requirements of carriers, and the system startup stability is greatly affected by fluctuations in the network environment.

Method used

In the Android system's Init phase, a separate Native network connection module is started to perform network interface initialization and protocol interaction in advance. Configuration information is then passed to the Java network service's IpClient component through cross-process communication to execute the network connection process in parallel.

Benefits of technology

It significantly shortens the total time from power-on to successful network connection, improves system startup stability, meets operators' requirements for fast power-on, and has greater resilience in the face of unsatisfactory network environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121567928A_ABST
    Figure CN121567928A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of network connection, in particular to a method and device for optimizing the startup network connection speed, a storage medium and electronic equipment, and the method comprises the steps: starting an independent Native network connection module in an Init stage of starting an Android system; before the Java network service of the Android system is started, a specified network interface is initialized through the Native network connection module, and network protocol interaction is carried out, so that network configuration information is obtained; and after an IpClient component in a Java network service of an Android system is started, sending the network configuration information to the IpClient component through the Native network connection module, so that the IpClient component directly sets a network state to be connected after obtaining the effective network configuration information. According to the method and the device, the total duration of the Android intelligent equipment from power-on startup to network connection can be reduced, the system startup stability is improved, and the actual use requirements can be better met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network connectivity technology, and in particular to a method, apparatus, storage medium, and electronic device for optimizing network connection speed during startup. Background Technology

[0002] The statements in this section are merely background information related to this application and do not necessarily constitute prior art.

[0003] Android smart set-top boxes, smart TVs, and other products are increasingly emphasizing boot speed under the requirements of operators. Since the boot-up service of set-top boxes and other devices is based on network connectivity, operators will directly require manufacturers to enable the launcher app interface within a certain number of seconds after power-on, or to enable protocol interaction within a certain number of seconds after power-on. The goal is to minimize the total time for system startup and launching the launcher app, and to improve system startup stability, with minimal fluctuations in startup time.

[0004] Starting with Android N (7.0), the Android system introduced IpClient, a Java-based component for configuring and managing network interface IPs. Therefore, the IpClient component only starts after the Android system's Java Virtual Machine has completed a series of network services. For example, the Android system's network services use the IpClient component to specify the eth0 network interface for IPv4 and IPv6 DHCP connections. The total time from power-on to successful network connection is actually the time from power-on to the start of the IpClient component by the Android system's network services, plus the total time for the specified DHCP protocol interaction. The protocol interaction start point also depends on the start of the IpClient component by the Android system's network services, so it cannot meet the requirements of some operators that protocol interaction should occur within a certain number of seconds after power-on. Furthermore, if the network environment fluctuates, the protocol interaction time will also fluctuate, increasing the total time for a successful network connection at boot, thus slowing down the Launcher startup and significantly affecting system startup stability.

[0005] In view of the above-mentioned deficiencies, this application has made improvements. Summary of the Invention

[0006] To overcome the shortcomings of the prior art, this application provides a method, apparatus, storage medium, and electronic device for optimizing the boot-up network connection speed, which can reduce the total time from power-on to network connection of Android smart devices and improve system startup stability, thus better meeting actual usage needs.

[0007] To achieve the above objectives, this application provides the following technical solution: Firstly, a method for optimizing network connection speed during system startup is provided, the method comprising: During the Init phase of the Android system startup, a separate Native network connectivity module is started. Before the Java network service of the Android system starts, the specified network interface is initialized and network protocol interaction is performed through the Native network connection module to obtain network configuration information; After the IpClient component in the Java network service of the Android system starts, the network configuration information is sent to the IpClient component through the Native network connection module, so that the IpClient component can directly set the network status to connected after obtaining the valid network configuration information.

[0008] Furthermore, The Native network connection module is started as a child process of the Init process and runs in parallel with the subsequent startup process of the Android system.

[0009] Furthermore, The Native network connection module and the IpClient component interact with each other through cross-process communication.

[0010] Furthermore, After the network configuration information is sent to the IpClient component via the Native network connection module, the following is also included: If the IpClient component fails to obtain valid network configuration information from the Native network connection module after startup, the IpClient component continues to execute the network connection protocol interaction process.

[0011] Furthermore, The network protocol interaction uses DHCPv4, DHCPv6, or PPPoE protocols.

[0012] Furthermore, The Native network connection module includes: The network interface control submodule is used to initialize and configure the parameters of the specified network interface; The protocol group submodule is used to perform the network protocol interaction on the initialized network interface; The data interaction submodule is used to manage data communication with the IpClient component.

[0013] Furthermore, The network interface parameters configured in the network port control submodule include the interface enable status and maximum transmission unit.

[0014] Secondly, an apparatus for optimizing boot-up network connection speed is also provided, the apparatus comprising: The module startup unit is used to start an independent native network connection module during the Init phase of the Android system startup. The protocol interaction unit is used to initialize a specified network interface and perform network protocol interaction through the Native network connection module before the Java network service of the Android system starts, so as to obtain network configuration information. The data synchronization unit is used to send the network configuration information to the IpClient component through the Native network connection module after the IpClient component in the Java network service of the Android system starts, so that the IpClient component can directly set the network status to connected after obtaining the valid network configuration information.

[0015] Based on the same inventive concept, this application also provides a computer-readable storage medium storing one or more programs, which, when executed, implement the method for optimizing boot-up network connection speed as described above.

[0016] Based on the same inventive concept, this application also provides an electronic device, including a processor, a communication interface, a computer-readable storage medium as described above, and a communication bus; wherein the processor, the communication interface, and the computer-readable storage medium communicate with each other through the communication bus; the processor is used to execute a program stored in the computer-readable storage medium.

[0017] Compared with the prior art, the beneficial effects of this application are as follows: 1. Directly optimizes boot speed: By executing time-consuming network protocol interactions in parallel with the startup of Android system services, the total time from booting to successful network connection is effectively shortened. This allows Android smart devices to enter the Launcher interface or start protocol interactions faster, meeting the stringent requirements of operators for boot speed.

[0018] 2. Significantly improves startup stability: The few seconds of error tolerance gained in advance make the system more stable when facing less than ideal network environments, and the reduced fluctuation in boot time makes the user experience more consistent and reliable.

[0019] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures pointed out in the description, claims and drawings.

[0020] The present application will be further described below with reference to the accompanying drawings. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a flowchart illustrating a method for optimizing boot-up network connection speed according to an embodiment of this application; Figure 2 This is a schematic diagram of the architecture of a Native network connection module according to one embodiment of this application; Figure 3 This is a schematic diagram illustrating the implementation process of a method for optimizing boot-up network connection speed according to an embodiment of this application; Figure 4 This is a schematic diagram illustrating the interaction between the Native network connection module and the IpClient component in one embodiment of this application; Figure 5 This is a schematic diagram of a device for optimizing boot-up network connection speed according to an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0024] like Figure 1 As shown, one embodiment of this application provides a method for optimizing network connection speed during startup, the method comprising the following steps: S1. In the Init phase of the Android system startup, start a separate Native network connection module; S2. Before the Java network service of the Android system starts, the specified network interface is initialized and network protocol interaction is performed through the Native network connection module to obtain network configuration information; S3. After the IpClient component in the Java network service of the Android system starts, the network configuration information is sent to the IpClient component through the Native network connection module, so that the IpClient component can directly set the network status to connected after obtaining the valid network configuration information.

[0025] In the above technical solution, by parallelizing the time-consuming network protocol interactions with the startup of Android system services, the total time from booting to successful network connection is effectively shortened. This allows Android smart devices to enter the Launcher interface or begin protocol interactions more quickly, meeting the stringent requirements of operators for boot speed. The several seconds of error tolerance gained in advance make the system more resilient to less-than-ideal network environments, and reduced boot time fluctuations result in a more consistent and reliable user experience. This solution not only directly optimizes boot speed but also significantly improves startup stability, thus better meeting practical usage needs.

[0026] This application relates to intelligent terminal power-on network connection technology, which is particularly applicable to intelligent devices such as set-top boxes and smart TVs equipped with the Android system.

[0027] As a preferred technical solution, the Native network connection module is started as a child process of the Init process and runs in parallel with the subsequent startup process of the Android system.

[0028] As a preferred technical solution, the Native network connection module and the IpClient component interact with each other through cross-process communication.

[0029] In some preferred embodiments, the Native network connectivity module and the IpClient component communicate with each other via a combination of AndroidProperty and Unix Domain Socket. After starting, the Native network connectivity module first creates a local socket file ( / dev / socket / preConnectSocket) using the Android standard rc script. After obtaining the IP information, it writes data to this socket and sets a Property to indicate a successful network connection. Upon starting, the IpClient component first reads the Property flag and then uses the flag to determine whether to read socket data. In the Android Property, the flag is set as key: "net.preconnect.result", value: "ok". When using the Socket method, information such as IP address is written in a fixed format string, for example, ip=192.168.1.10^gateway=192.168.1.1^dns=192.168.1.1,8.8.8.8^netmask=255.255.255.0. Then, the IpClient component parses the string to obtain the corresponding IP address, gateway, DNS, and other field values.

[0030] As a preferred technical solution, after sending the network configuration information to the IpClient component through the Native network connection module, the solution further includes: If the IpClient component fails to obtain valid network configuration information from the Native network connection module after startup, the IpClient component continues to execute the network connection protocol interaction process.

[0031] This solution possesses excellent compatibility and robustness, which is reflected in the following two aspects: Backward compatibility: This solution is non-intrusive to Android's original network connection process. If the native network connection module fails for some reason (such as not obtaining a valid configuration), the IpClient component will seamlessly fall back to the standard process for retrying, ensuring the reliability of the function.

[0032] Protocol transparency: This solution supports multiple network protocols (such as DHCPv4 / v6, PPPoE, etc.) and has good versatility.

[0033] As a preferred technical solution, the network protocol interaction adopts DHCPv4, DHCPv6 or PPPoE protocol.

[0034] As a preferred technical solution, the Native network connection module includes: The network interface control submodule is used to initialize and configure the parameters of the specified network interface; The protocol group submodule is used to perform the network protocol interaction on the initialized network interface; The data interaction submodule is used to manage data communication with the IpClient component.

[0035] As a preferred technical solution, the network interface parameters configured in the network port control submodule include the interface enable status and the maximum transmission unit.

[0036] Therefore, the key to this application lies in the innovation of architecture, which advances and parallelizes the critical steps of network connection, thereby fundamentally optimizing the boot-up network connection performance of Android smart devices and achieving a dual improvement in speed and stability.

[0037] To make the above methods for optimizing network connection speed during startup clearer, the following explanation will further elaborate on these methods in conjunction with the preferred technical solutions described above.

[0038] This application introduces a network connection module (i.e., the aforementioned Native network connection module) that can be started during the boot-up Native phase. This module enables boot-up network connection protocol interaction without relying on the Android system network service to start the IpClient component. During the boot-up Native phase, this module initializes a specified network interface in advance and performs specified protocol interaction to obtain network configuration information such as IP, routing, and DNS. After the Android system network service starts the IpClient component, it interacts with it. Once the IpClient component obtains valid data (i.e., valid network configuration information), it can directly send the routing, DNS, and other network configuration information to the network service and set it in the kernel. The network service enters a connected state and sends a broadcast notification to all applications. The IpClient component also directly enters the subsequent IP management state. This saves the time required for the Android system network service to start the IpClient component and then perform protocol interaction, thus optimizing the Android boot-up network connection speed.

[0039] Furthermore, since the protocol interaction occurs during the Native phase of the Android system startup, the starting point of the protocol interaction is 4 to 5 seconds earlier than the original startup via the IpClient component. This gives the protocol interaction a 4 to 5 second margin of error compared to the original process, which can greatly improve the startup stability of the Android system.

[0040] Specifically, this application embodiment adds a Native network connection module, which includes the following three sub-modules: a. network port control module, b. protocol group module, and c. data interaction module.

[0041] a. Network Interface Control Module: The network interface control module can initialize a specified network interface, such as controlling the eth0 network interface to go up and configuring parameters such as MTU. The parameter configuration can manipulate up / down settings, MTU values, and some network interface kernel configuration parameters, such as disable_ipv6 and autoconf configuration nodes, which do not conflict with subsequent Android system initialization.

[0042] b. Protocol Group Module: The Protocol Group Module can perform specified protocol interactions through a specified network port, including IPv4 / IPv6 DHCP and PPPoE protocol interaction processes.

[0043] c. Data Interaction Module: After completing protocol interaction on the network interface to obtain network configuration information such as IP, the data interaction module performs cross-process communication to interact with the IpClient component.

[0044] The architecture diagram of the Native network connection module in this embodiment is as follows: Figure 2 As shown.

[0045] The key steps of this method will be explained in detail below.

[0046] 1. After an Android smart device powers on, during the Android Init phase—that is, when the first Android user space process, Init, starts—a new subprocess is added to start the Native network connection module. This embodiment chooses to start during the Init phase because it allows for earlier initiation of protocol interaction, thus providing more time for error correction and improving the stability of the Android system startup.

[0047] 2. The Native network connection module is started as a child process of the Init process and will not block the Init process from starting the Java Virtual Machine. It initializes the specified network interface through the network interface control module.

[0048] 3. Once the designated network port is ready, the protocol group module selects the specified connection method to perform protocol interaction on the designated network port, such as IPv4 single-stack DHCP or IPv4 / IPv6 PPPoE dual-stack. After obtaining network configuration information, once the Android system starts the network service IpClient component, the data interaction module performs cross-process data interaction with the IpClient component to exchange network configuration information. The DHCPv4, DHCPv6, and PPPoE protocol stacks reuse open-source protocol libraries, but the part that obtains IP information and transmits it to the Android system after protocol interaction requires custom implementation.

[0049] 4. After the IpClient component starts and obtains valid network configuration information, it no longer engages in network connection protocol interaction. Instead, it directly transmits the obtained network configuration information to the system network service. The system network service enters the connected state and broadcasts a notification to the application. The IpClient component also directly enters the subsequent IP maintenance and management state.

[0050] 5. If the IpClient component does not obtain valid network configuration information after startup, it will continue to perform the subsequent network connection protocol interaction process normally.

[0051] Therefore, this method starts the Native network connection module in advance during the Init phase to obtain network configuration information through specified protocol interaction. After the Android system's JAVA network service starts, data interaction is performed, and the system directly jumps to the pending connection state, instead of relying on the Android system's JAVA network service to start before performing specified protocol interaction. This optimizes the boot network connection speed and effectively reduces the total time. Starting the Native network connection module in the Init phase for specified protocol interaction is 4 to 5 seconds earlier than the existing method of starting the Android system's JAVA network service before performing protocol interaction. This provides a 4 to 5 second fault tolerance time for protocol interaction, such as in scenarios with poor network conditions, which can improve system boot stability.

[0052] The Native module (i.e., the Native network connection module, hereinafter the same) is started in the boot phase of the Android system Init script, while the IpClient component starts to connect to the network after the SystemService starts the EthernetService service. Numerous test results show that the startup time of the Init script boot phase is 4.5 to 5.1 seconds earlier than the EthernetService service startup time.

[0053] In addition, operators generally have requirements for the DHCPv4 or DHCPv6 packet sending intervals of set-top boxes. For example, they require set-top boxes to send packets at intervals of 1, 2, 4, 8, 16, 32, ... to avoid network congestion caused by frequent packet sending. In the standard Android boot process of a set-top box, if there is a network fluctuation, the first or second request packet may not receive a response from the server. The third packet is sent after 3 seconds to request the server and finally a response is received. If the solution in this application is followed, and DHCP packets are sent in advance, even if there is a network fluctuation and the first or second packet does not respond, the third packet will receive a response from the server. The protocol interaction will be successful before the IpClient component starts, and IP information can be obtained.

[0054] For cross-process data interaction between the Native network connection module and the IpClient component, this explanation uses the AndroidProperty process communication method as an example. After the Native network connection module starts, it first creates a local socket file ( / dev / socket / preConnectSocket) through the Android rc script. After successfully obtaining an IP address through DHCPv4 protocol interaction, it writes data and sets the Property attribute indicating that the Native module has successfully connected to the network. After the IpClient component starts the boot connection process, it enters the RunningState state. According to the standard Android process, after the IpClient component enters the RunningState state, it starts the protocol interaction of the corresponding network connection mode. This solution changes this to read the Property first after entering this state to determine whether the Native module has successfully connected to the network. If successful, it reads the socket data. If the IP information data is successfully read, the IP information is passed to the system through the standard Android callback method, and the subsequent IP maintenance and management process (such as listening to lease renewal status, user network disconnection, etc.) is directly entered, without performing the standard Android protocol interaction process of the IpClient component. If reading the socket fails, the standard Android protocol interaction process of the IpClient component is performed normally. If reading the Property flag fails, the IpClient component will still proceed with the Android standard protocol interaction process normally.

[0055] In summary, the method for optimizing boot network connection speed in this application significantly shortens boot network connection time, substantially improves system startup stability, and also optimizes system resource management and user experience. Further explanation follows.

[0056] First, by changing the timing architecture of network connections (i.e., changing from "serial" to "parallel") and eliminating waiting delays, the boot-up network connection time can be significantly shortened.

[0057] Shifting from "serial" to "parallel": In traditional solutions, network protocol interaction can only begin after the Android system's Java network service and IpClient component have fully started—a sequential process. However, the solution in this application starts the Native network connection module during the system's Init phase, allowing network protocol interaction and the Android system's Java layer initialization process to proceed in parallel.

[0058] Eliminate waiting delays: such as Figure 3 As shown, the protocol interaction process of the Native module is synchronized with the startup of the Java Virtual Machine and the initialization of system services. This means that when the IpClient component finally starts, it no longer needs to spend time on protocol interaction, but can directly obtain "ready-made" network configuration information. This directly eliminates the protocol interaction time of several seconds or even tens of seconds that must be waited in the traditional process.

[0059] Secondly, by creating a "fault tolerance window" and resisting network fluctuations, the system startup stability can be significantly improved.

[0060] Creating a "fault tolerance window": Because the starting point of the protocol interaction is significantly advanced (from the IpClient startup to the Init phase), the entire protocol interaction process gains an additional few seconds (i.e., 4-5 seconds of fault tolerance time). This extra time becomes a valuable "fault tolerance window".

[0061] Resisting Network Fluctuations: In situations with poor network conditions, slow DHCP server responses, or brief network congestion, traditional serial processes may lead to network connection failures or system startup delays due to protocol interaction timeouts. In this solution, however, protocol interactions have ample time to complete, effectively resisting network fluctuations and significantly reducing the risk of boot failures or delays caused by network issues, resulting in more stable and reliable system startup performance.

[0062] Finally, the system resource management and user experience were optimized by avoiding resource idleness and conflicts.

[0063] To avoid resource idleness and conflicts: This solution does not simply replace Android's original network management architecture, but rather adopts a collaborative mechanism. The Native module is responsible for "seizing the initiative" to complete time-consuming protocol interactions, while the IpClient component continues to handle its strengths in IP state management and interaction with upper-layer services. This division of labor avoids resource conflicts that might result from two network management architectures at the system level, while also ensuring the consistency and correctness of Android's network state management.

[0064] Enhancing User Experience: For users, the most direct benefit is faster access to network-dependent applications after booting up. Whether it's smart TVs providing immediate access to content upon startup or set-top boxes loading live channels, everything is ready in a shorter time. This "instant connection" experience greatly improves user satisfaction. The collaboration mechanism can be referenced... Figure 4 The interactive flow is shown.

[0065] To better demonstrate the technical advantages of this application, the following comparison uses the DHCPv4 network connection on the wired network eth0 of the device during startup as an example.

[0066] According to the standard Android boot network connection process (i.e., the traditional solution), the Android system SystemServer starts the EthernetService wired network service. After the EthernetService service starts, it starts the IpClient component. IpClient starts the DHCPv4 protocol according to the network connection mode to interact with the server to obtain IP information. Assuming that the DHCPv4 protocol sends the first Discovery packet according to the operator's specifications but does not receive a response from the server, the timeout period is 1 second. The second Discovery packet also does not receive a response from the server, and the timeout period is 2 seconds. The third packet receives a response from the server, completes the protocol interaction and obtains IP information. The IpClient component passes the obtained IP information to the Android system ConnectivityService network connection management service for network parameter configuration, and ends the boot network connection process.

[0067] The proposed solution involves the Android system booting up to the init boot stage, where the Native module process initiates DHCPv4 protocol interaction based on the network connection mode. Following the same DHCPv4 protocol and according to the operator's specifications, the first Discovery packet fails to receive a server response, with a timeout of 1 second. The second Discovery packet also fails to receive a server response, with a timeout of 2 seconds. The third packet receives a server response, completing the protocol interaction and obtaining IP information. After successful interaction, data exchange is prepared via Property and socket methods. Simultaneously, while the Native module performs protocol interaction, the Android system's standard parallel IpClient component begins network connection. IpClient first determines if the Native module has successfully connected to the network. If successful, it obtains IP information through socket data exchange with the Native module and directly passes the IP information to the Android system's ConnectivityService network connection management service for network parameter configuration, thus ending the boot-up network connection process.

[0068] Comparing the two solutions above, it can be seen that the Native module started by the solution in this application performs DHCPv4 protocol interaction earlier than the standard Android solution. By the time the IpClient component starts the network connection process, the Native module has already completed the DHCPv4 protocol interaction and can directly pass the IP information to the Android system's ConnectivityService network connection management service to complete the network configuration. Furthermore, under the same network fluctuation, the timeout of the first Discovery and the second Discovery in the standard Android process will directly increase the overall boot network connection time. However, the solution in this application can have a certain fault tolerance time for server unresponsiveness before the IpClient component starts, and the timeout of server unresponsiveness will not increase the overall boot network connection time.

[0069] like Figure 5 As shown, one embodiment of this application also provides an apparatus for optimizing boot-up network connection speed, the apparatus comprising: The module startup unit is used to start an independent native network connection module during the Init phase of the Android system startup. The protocol interaction unit is used to initialize a specified network interface and perform network protocol interaction through the Native network connection module before the Java network service of the Android system starts, so as to obtain network configuration information. The data synchronization unit is used to send the network configuration information to the IpClient component through the Native network connection module after the IpClient component in the Java network service of the Android system starts, so that the IpClient component can directly set the network status to connected after obtaining the valid network configuration information.

[0070] Regarding the system in the above embodiments, the specific manner in which each unit module performs operations has been described in detail in the embodiments related to the method, and will not be elaborated here.

[0071] Based on the same inventive concept, this application also provides a computer-readable storage medium storing one or more programs, which, when executed, can realize the method for optimizing boot-up network connection speed as described above.

[0072] Based on the same inventive concept, such as Figure 6As shown, this application also provides an electronic device, including a processor, a communication interface, a computer-readable storage medium as described above, and a communication bus; wherein the processor, the communication interface, and the computer-readable storage medium communicate with each other through the communication bus; the processor is used to execute a program stored in the computer-readable storage medium.

[0073] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.

[0074] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0075] If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0076] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0077] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0078] The parts not mentioned in the above embodiments are the same as or can be implemented using existing technologies, and will not be further described here.

[0079] Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for optimizing network connection speed at startup, characterized in that, The method includes: During the Init phase of the Android system startup, a separate Native network connectivity module is started. Before the Java network service of the Android system starts, the specified network interface is initialized and network protocol interaction is performed through the Native network connection module to obtain network configuration information; After the IpClient component in the Java network service of the Android system starts, the network configuration information is sent to the IpClient component through the Native network connection module, so that the IpClient component can directly set the network status to connected after obtaining the valid network configuration information.

2. The method for optimizing boot-up network connection speed according to claim 1, characterized in that, The Native network connection module is started as a child process of the Init process and runs in parallel with the subsequent startup process of the Android system.

3. The method for optimizing boot-up network connection speed according to claim 1, characterized in that, The Native network connection module and the IpClient component interact with each other through cross-process communication.

4. The method for optimizing boot-up network connection speed according to claim 1, characterized in that, After the network configuration information is sent to the IpClient component via the Native network connection module, the following is also included: If the IpClient component fails to obtain valid network configuration information from the Native network connection module after startup, the IpClient component continues to execute the network connection protocol interaction process.

5. The method for optimizing boot-up network connection speed according to claim 1, characterized in that, The network protocol interaction uses DHCPv4, DHCPv6, or PPPoE protocols.

6. A method for optimizing boot-up network connection speed according to any one of claims 1-5, characterized in that, The Native network connection module includes: The network interface control submodule is used to initialize and configure the parameters of the specified network interface; The protocol group submodule is used to perform the network protocol interaction on the initialized network interface; The data interaction submodule is used to manage data communication with the IpClient component.

7. The method for optimizing boot-up network connection speed according to claim 6, characterized in that, The network interface parameters configured in the network port control submodule include the interface enable status and maximum transmission unit.

8. A device for optimizing network connection speed at startup, characterized in that, The device includes: The module startup unit is used to start an independent native network connection module during the Init phase of the Android system startup. The protocol interaction unit is used to initialize a specified network interface and perform network protocol interaction through the Native network connection module before the Java network service of the Android system starts, so as to obtain network configuration information. The data synchronization unit is used to send the network configuration information to the IpClient component through the Native network connection module after the IpClient component in the Java network service of the Android system starts, so that the IpClient component can directly set the network status to connected after obtaining the valid network configuration information.

9. A computer-readable storage medium storing one or more programs, characterized in that, When one or more programs are executed, the method for optimizing boot-up network connection speed as described in any one of claims 1-7 is implemented.

10. An electronic device, comprising a processor, a communication interface, a computer-readable storage medium as described in claim 9, and a communication bus; wherein, The processor, communication interface, and computer-readable storage medium communicate with each other via a communication bus; Its features are, The processor is used to execute programs stored in a computer-readable storage medium.