CN108958807B - Terminal system starting method and terminal - Google Patents

Terminal system starting method and terminal Download PDF

Info

Publication number
CN108958807B
CN108958807B CN201710349052.3A CN201710349052A CN108958807B CN 108958807 B CN108958807 B CN 108958807B CN 201710349052 A CN201710349052 A CN 201710349052A CN 108958807 B CN108958807 B CN 108958807B
Authority
CN
China
Prior art keywords
network module
terminal
program
network
state
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.)
Active
Application number
CN201710349052.3A
Other languages
Chinese (zh)
Other versions
CN108958807A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201710349052.3A priority Critical patent/CN108958807B/en
Priority to PCT/CN2018/080730 priority patent/WO2018210063A1/en
Publication of CN108958807A publication Critical patent/CN108958807A/en
Application granted granted Critical
Publication of CN108958807B publication Critical patent/CN108958807B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44578Preparing or optimising for loading

Abstract

A terminal system starting method and a terminal are used for improving the efficiency of connecting a terminal with a network when the system is started. The method comprises the following steps: when the terminal is started in the operating system of the terminal, a network module driving program is operated; the network module driver is used for driving a network module of the terminal; after the terminal finishes operating the network module driving program, synchronously operating a network module enabling program in the process of operating a first program installed in the terminal; the first program is any program, the execution sequence of which is located after the network module driver and before the network module enabling program in the system starting process of the terminal, and the network module enabling program is used for enabling the network module; the terminal is connected with the network through the network module which is driven and enabled.

Description

Terminal system starting method and terminal
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a terminal system starting method and a terminal.
Background
An Android (Android) system is an open source operating system based on Linux, and is widely applied to terminals such as mobile equipment and intelligent household appliances at present. Under the condition that the current Android consumer products are more and more competitive, how to improve the product scheme to improve the user experience is one of the key elements for improving the product competitiveness.
At present, in the starting process of the Android system, a user presses down a power supply of a terminal, and the terminal starts an operating system according to a standard starting process. In the conventional standard boot process, various drivers are usually loaded at the initial boot stage, for example, a network card driver, an audio card driver, and the like are loaded at the kernel boot stage of an operating system, but for a network card, the network card needs to be driven by the network card driver and also needs to be enabled by the network card enabling program to work. Therefore, in the later stage of the startup of the operating system, when the terminal requests a network service, such as an Ethernet (Ethernet) service or a Wireless Fidelity (WiFi) service, the terminal needs to execute a network card enabling program to enable the network card, so that the terminal can connect to the network through the enabled network card to respond to the network service request.
It can be seen that, in the standard starting process of the operating system, the enabling time of the terminal to the network card is later, and the terminal needs to perform network connection after the network card is enabled, so that the terminal with the starting networking requirement needs to wait for a longer time, which results in lower network connection efficiency of the terminal.
Disclosure of Invention
The application provides a terminal system starting method and a terminal, which are used for improving the efficiency of connecting a terminal with a network when the system is started.
In the method, when the operating system of the terminal is started, a network module driver for driving a network module of the terminal is operated, after the network module driver is operated, and in the process of operating a first program in the terminal, the terminal synchronously operates a network module enabling program, wherein the first program is any program which is sequentially positioned after the network module driver and before the network module enabling program in the system starting process of the terminal, so that the network module can be enabled in advance by synchronously operating the network module enabling program in the process of operating the first program, and the terminal can be connected with a network through the network module which is driven and enabled.
In the application, when an operating system of a terminal is started, the terminal runs a network module driving program to drive a network module of the terminal, and after the network module driving program is run, the network module enabling program is synchronously run in the process of running a first program in the terminal.
With reference to the first aspect, in a first possible implementation manner of the first aspect, after the terminal completes running the network module driver and before running the network module enabling program, querying stored state record information of the network module, where the state record information is used to record a state of the network module before the terminal is turned off last time, and when the terminal determines that the state of the network module recorded by the state record information is an on state, synchronously running the network module enabling program in a process of running the first program.
In the application, the terminal can determine the state of the network module before the terminal is closed recently by inquiring the state record information, and based on the state, in the system starting process, the enabling of the network module is controlled, so that the state of the network module is consistent with the state before the terminal is closed, the networking requirement of a user is met, and the user experience is improved.
With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the terminal acquires an IP address through the driven and enabled network module, and connects to the network according to the IP address.
In the application, when the terminal requests for the network service, the IP address can be directly acquired through the driven and enabled network module, and then the network connection is realized according to the acquired IP address, which is beneficial to improving the network connection efficiency of the terminal.
In a second aspect, a terminal system booting method is provided, which may be applied to a terminal having an operating system installed therein, in which when an operating system of the terminal is booted, the terminal runs a network module driver for driving a network module of the terminal, and then the terminal queries stored status record information of the network module, the status record information being used to record a status of the network module before the terminal was last turned off, if the terminal determines that the status of the network module recorded by the status record information is turned on, after the terminal runs the network module driver, the terminal synchronously runs a network module enabling program for enabling the network module in a process of running a first program in the terminal, and the first program is any program whose execution sequence is after the network module driver and whose execution sequence is before the network module enabling program in a system booting process of the terminal, therefore, when the recorded state of the network module is determined to be the open state by inquiring the recorded state information, the network module enabling program is synchronously operated when the first program is operated, and the network module is enabled in advance, so that the terminal can carry out network connection through the driven and enabled network module.
In the method, when an operating system of a terminal is started, the terminal synchronously runs a network module enabling program in the process of running a first program in the terminal by inquiring state record information and determining that the state of a network module before the terminal is closed for the last time is an open state. Meanwhile, the state of the network module is the same as the recorded state after the computer is started, so that the use habit of a user is met, and the user experience is improved.
With reference to the second aspect, in a first possible implementation manner of the second aspect, after querying the stored state record information of the network module, if it is determined that the recorded state of the network module is the closed state, after the terminal runs the network module driver, the terminal runs the programs after the network module driver according to the execution sequence in the system starting process of the terminal, and the programs after the running network module driver do not include a network module enabling program for enabling the network module, so that the starting of the operating system is completed.
In the application, when the terminal determines that the state of the network module before the terminal is closed recently is the closed state through inquiring the state record information, the fact that the user may not have the networking requirement is shown, at the moment, the network module enabling program does not need to be operated in the starting process of the operating system, and therefore resource waste in the starting process is avoided.
With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the on state is a state where the network module is in a network connection state, and the off state is a state where the network module is in a network disconnection state.
In the application, the state of the network module recorded by the state recording information can represent whether the network module is in the state of connecting the network before the terminal is closed for the last time, so that whether the network connection is performed before the terminal is closed can be known according to the state of the network module, and the networking requirements of users can be conveniently known.
With reference to the first possible implementation manner of the second aspect or the second possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, after the terminal completes the start-up of the operating system, if an input instruction for instructing the terminal to perform network connection is received, the terminal enables the network module according to a network module enabling program to be run, so as to connect a network through the driven and enabled network module.
In this application, after operating system starts, if the user has the networking demand, can be through corresponding input instruction, for example modes such as manual, control terminal operation network module enable program realizes the enable to the network module to the terminal passes through network module connection network, and the implementation is comparatively convenient.
With reference to the second aspect, in a fourth possible implementation manner of the second aspect, after the network module enabling program is run synchronously, the terminal connects to the network through the network module which is driven and enabled.
In the application, the terminal can be connected with the network through the network module after the network module is enabled in advance in the starting process of the operating system of the terminal, and the efficiency of the terminal in connecting the network is improved.
With reference to the third possible implementation manner of the second aspect or the fourth possible implementation manner of the second aspect, in a fifth possible implementation manner of the second aspect, the terminal acquires an IP address through the driven and enabled network module, and connects to the network according to the IP address.
In the application, after the network module is driven and enabled, the terminal can acquire the corresponding IP address through the network module, so that network connection is realized, and the accuracy of network connection is improved.
In a third aspect, a terminal is provided, where the terminal includes a memory, a processor, and a network module, and the terminal includes a module for executing the terminal system starting method in the first aspect.
In a fourth aspect, a terminal is provided, the terminal includes a memory, a processor and a network module, and the terminal includes a module for executing the terminal system starting method in the second aspect.
In a fifth aspect, a computer storage medium is provided, in which computer program instructions are stored, and when the instructions are run on a computer, the instructions cause the computer to execute the terminal system starting method in the first aspect and the second aspect.
A sixth aspect provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the end system startup method of the first and second aspects.
Drawings
Fig. 1 is a block diagram of a terminal according to the present application;
FIG. 2 is an architecture diagram of an operating system of the present application;
FIG. 3 is a diagram illustrating a standard start-up process of a prior art system;
fig. 4 is a flowchart of a terminal system startup method of the present application;
FIGS. 5A-5B are schematic diagrams illustrating a first procedure and a network enabled procedure being invoked according to the present application;
fig. 6 is a first schematic diagram illustrating network connection performed by a network module in the present application;
fig. 7 is a second schematic diagram of network connection performed by a network module in the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, the present application will be further described in detail with reference to the accompanying drawings.
First, some terms in the present application are explained so as to be easily understood by those skilled in the art.
1) The terminal may be a device installed with an operating system, for example, a device installed with an Android system. In practical applications, the terminal may communicate with a core Network via a Radio Access Network (RAN), and exchange voice and data with the RAN. The Terminal may include User Equipment (UE), a wireless Terminal, a Mobile Terminal, a Subscriber Unit (Subscriber Unit), a Subscriber Station (Subscriber Station), a Mobile Station (Mobile Station), a Remote Station (Remote Station), an Access Point (AP), a Remote Terminal (Remote Terminal), an Access Terminal (Access Terminal), a User Terminal (User Terminal), a User Agent (User Agent), or User Equipment (User Device), etc. For example, mobile phones (or so-called "cellular" phones), computers with mobile terminals, portable, pocket, hand-held, computer-included or vehicle-mounted mobile devices, smart wearable devices, and the like may be included. For example, Personal Communication Service (PCS) phones, cordless phones, Session Initiation Protocol (SIP) phones, Wireless Local Loop (WLL) stations, Personal Digital Assistants (PDAs), smart watches, smart helmets, smart glasses, smart bracelets, and the like.
2) The network module may be a module, such as a network card, provided in the terminal for performing network connection.
The terminal structure of the present application will be described with reference to the accompanying drawings.
As shown in fig. 1, the present application provides a block diagram of a terminal 100, which terminal 100 may include a memory 120 and a network module 170. Of course, besides these modules, the terminal 100 may also include other modules, referring to fig. 1, such as an input unit 130, a display unit 140, a processor 190, a radio frequency unit 110, a power supply 193, and an external interface 197.
Those skilled in the art will appreciate that fig. 1 is merely exemplary of terminal 100 and does not constitute a limitation of terminal 100, and that terminal 100 may include more or less components than those shown, or some components may be combined, or different components.
Among other things, the input unit 130 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal 100. In practical applications, the input unit 130 may include a touch screen and other input components. Among other things, the touch screen may provide an input interface and an output interface between the terminal 100 and a user. In addition, the touch screen may be implemented using various types, such as resistive, capacitive, infrared, and surface acoustic wave. Other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 140 may be used to display information input by the user or information provided to the user and various menus of the terminal 100. Further, the touch screen may cover the display panel, and when the touch screen detects a touch operation thereon or nearby, the touch screen transmits the touch operation to the processor 190 to determine the type of the touch event, and then the processor 190 provides a corresponding visual output on the display panel according to the type of the touch event. In this embodiment, the touch screen and the display unit may be integrated into one component to implement the input, output, and display functions of the terminal 100; for convenience of description, the present application represents a touch screen as a functional set of the touch screen and the display unit; in some embodiments, the touch screen and the display unit may also be provided as two separate components.
The memory 120 may be configured to store instructions and data, and the memory 120 may mainly include a storage instruction area and a storage data area, where the storage data area may store an association relationship between a boot operation and a program for system booting; the storage instruction area may store an operating system, instructions required for at least one function, and the like.
The Memory 120 may include at least one type of storage medium, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charge Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and so on.
The processor 190 is a control center of the terminal 100, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the terminal 100 and processes data by operating or executing instructions stored in the memory 120 and calling data stored in the memory 120, thereby performing overall monitoring of the mobile phone. Alternatively, processor 190 may include one or more processing units; preferably, the processor 190 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above need not be integrated into processor 190.
In some embodiments, processor 190 and memory 120 may be implemented on a single chip, or in some embodiments, they may be implemented separately on separate chips. In this application, the memory 120 may store data such as a program related to system startup and status information of the network module 170, and the processor 190 may read the data from the memory 120 to start up the operating system of the terminal 100.
The rf unit 110 may be configured to receive and transmit information or receive and transmit signals during a call, and in particular, receive downlink information of a base station and then process the downlink information to the processor 190; in addition, the data for designing uplink is transmitted to the base station. Typically, the RF circuitry includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the radio frequency unit 110 may also communicate with network devices and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc. Although fig. 1 shows the radio frequency unit 110, it is understood that it does not belong to the essential constitution of the terminal 100, and may be omitted entirely as needed within the scope not changing the essence of the present application.
The terminal 100 can make a network connection through the network module 170, thereby facilitating e-mail transmission, web page browsing, streaming media access, and the like for a user using the terminal 100.
The terminal 100 can also include a power source 193 (e.g., a battery) for receiving external power or powering various components within the terminal 100. Preferably, the power source 193 may be logically connected to the processor 190 through a power management system, so that functions of managing charging, discharging, and power consumption management are implemented through the power management system.
The terminal 100 further includes an external interface 197, which may be a standard Micro USB interface, or a multi-pin connector, which may be used to connect the terminal 100 to communicate with other devices, or to connect a charger to charge the terminal 100.
Although not shown, the terminal 100 may further include a camera, a flash, a sensor, an audio circuit, a microphone, and the like, which are not described in detail herein.
Next, the architecture of the operating system installed in the terminal 100 in the present application will be described with reference to the drawings.
In the present application, an example that an operating system installed in the terminal 100 is an Android system is mainly described, and as shown in fig. 2, the operating system is a system architecture diagram of the Android system. The Android system is generally divided into four layers, namely an application program layer, an application program framework layer, a system operation library layer and a Linux kernel layer from a high layer to a low layer.
The application layer includes a plurality of Applications (APPs), such as a client program, a browser program, and a contact management program. All applications can be written in the JAVA language, each consisting of one or more activities, similar to processes on an operating system, that can be switched between multiple states. The application program developed based on the Android framework can run in any platform provided with the Android system without compiling.
The application framework layer structurally manages the application by classifying the application, and generally comprises activity management, resource management, view management, notification management and the like.
The system operation library layer comprises a program library and an Android operation library. The program library can be a C/C + + library, a browser library (WebKit) and the like, different application programs in the Android system can call corresponding function functions in the program library, and services are provided for developers through an application program framework layer. The Android runtime library contains most functions of a JAVA programming language core library and can provide functional functions required to be called when the application program runs.
The Linux kernel layer comprises power management, a display driver, a camera driver and the like and is used for providing core system services for the Android kernel, such as security services, network services, memory management services, detection management services, a driver model and the like. The Android kernel can be implemented by relying on a Linux2.6 kernel, which is essentially a JAVA virtual machine running within the Linux kernel.
In the existing standard starting process, after the Linux kernel is started, an initialization process (Init) is loaded first to enter the Android kernel, and then services and applications related to the Android system are started. As shown in fig. 3, the existing Android system standard boot process generally includes the following processes:
and step 1, turning on a power supply to start the system.
When a user presses a power-on key of the terminal 100, the terminal 100 first executes a Basic Input Output System (BIOS) program, and after the BIOS program is executed, an operating System of the terminal 100 is started to start the terminal 100. The power-on of the terminal 100 may refer to the entire process from the power-on of the terminal 100 until the display screen of the terminal 100 displays the user login screen. In addition, the "system" referred to in the present application refers to an operating system of the terminal 100.
In practical applications, the memory of the terminal 100 is divided into a mass storage (usually a hard disk) and a main storage (i.e. a memory), and an operating system (i.e. an Android system) is installed on the mass storage. The memory can be divided into two parts: a Read-Only Memory (ROM) portion and a volatile Access Memory (RAM) portion. The ROM part stores boot program and BIOS program, the BIOS program includes related information of CPU, device start sequence information, hard disk information, memory information, clock information, Plug-and-Play (PnP) characteristic, etc.
After executing the BIOS program, the terminal 100 will read a Master Boot Record (MBR) of the hard disk, also called Master Boot sector, which includes two parts: the first part is a boot area used for storing a partition of a main boot program; the second part is a partition for storing a partition table, which is used to record partition information of sectors, such as the number of partitions and the size of each partition.
After the terminal 100 finds the MBR of the hard disk specified by the BIOS, the content stored in the MBR is copied to the physical memory, and the copied content to the physical memory is a Boot Loader (Boot Loader).
And 2, executing a Boot Loader (Boot Loader).
When the terminal 100 is powered on, the terminal 100 will automatically execute the boot program after executing the BIOS program. The boot program has two execution phases, the first phase: detecting a RAM outside the operating system and loading a program useful for the second stage; and a second stage: setting network parameters, mapping the memory space and the like.
By executing the second stage, the Central Processing Unit (CPU) in the terminal 100 may be directed to transfer the Android system from the mass storage to the RAM portion of the memory. That is, when the bootstrap program is executed in the second stage, the terminal 100 executes a transfer instruction through the CPU, and the Android system originally stored in the mass storage is transferred to the memory by executing the transfer instruction. At this time, the Android system starts to take over and control the activities of the terminal 100, and makes all preparations for calling the Android kernel.
And 3, starting a Kernel process (such as a Kernel process), and loading a system Kernel (namely an Android Kernel).
The Android kernel is started in a similar manner to the Linux kernel, and a plurality of processes are required to be executed in the Android kernel starting process. And starting the Android kernel, wherein the Android kernel is mainly used for finishing operations such as setting a cache, loading a driver and the like. Generally, in the Android kernel boot phase, the terminal 100 may load various drivers, such as a video card driver, a sound card driver, and a network card driver.
And 4, starting an Init process.
After the Android kernel completes system setup, it will create a first system kernel thread through a kernel thread function kenrel _ thread (), and the system kernel thread will execute an init () function in the Android kernel to guide the start task of the next stage. That is, after the Android kernel is started, the first program to run is the Init process. The main function of the Init process is to mount a directory, such as/sys,/dev, or/proc, etc.
And 5, starting a Zygote process.
The Zygote process is a virtual machine process. During the operation of the operating system, when a request for creating a virtual machine is received, the Zygote process will hatch the Dalvik VM instance, i.e. initialize the virtual machine, so as to start the shared code of the virtual machine and reduce the memory usage.
Procedure 6, initialize server Manager (Service Manager) and start System Service (System Service).
Wherein the service manager is a tool for managing system services. In the Process of initializing the service manager, the system starts system services, the system services are mainly used for starting some Android system management services of a Java layer, including hardware services and system framework core platform services, and the Android system management services are registered as Inter-Process Communication (IPC) service objects, and start codes of the IPC service objects are located in run functions of SystemServer.
After the System service is started, the System service sends a System Ready broadcast message indicating that the System is started, and the System may perform a corresponding System service, such as a management service or a network service. Wherein, when the terminal 100 requests a network service, the system will enable the network card.
Through the above procedure, the operating system boot of the terminal 100 is completed.
Therefore, in the existing standard boot process, the drive of the network card is advanced, and the drive is usually realized by loading a network card driver in the kernel boot stage. After the network card is driven, the network card is mapped into a device node of the system, and the device node cannot perform network connection. In order to enable the network card to have a network connection function, the network card needs to be further enabled. However, the current network card enabling is usually performed when the terminal 100 requests a network service, and the network card enabling requires a certain time, so that the terminal 100 needs to wait for a long time when the terminal 100 requests the network service, which results in low efficiency of the terminal 100 in connecting to the network.
In view of this, in the present application, in the process of starting the operating system of the terminal 100, after the network module driver is executed, the network module enabling program is synchronously executed in the process of running any one first program installed in the terminal 100, and the execution sequence of the first program is located after the network module driver and is located before the network module enabling program, so that the terminal 100 can execute the first program and the network module enabling program in parallel in the starting process of the operating system, the time required by the terminal 100 in the starting process of the operating system is shortened, and since the network module enabling program is synchronously executed in the running of the first program, the network module can be enabled in advance, which is beneficial to quickly performing network connection after the terminal 100 is started, and the efficiency of the terminal 100 in connecting to the network can be improved.
The technical scheme provided by the application is described in the following with reference to the accompanying drawings.
As shown in fig. 4, the present application provides a terminal system booting method, which may be performed by the terminal 100 in fig. 1. The process of the method is described as follows:
s41: the terminal 100 receives an instruction for starting its own operating system and starts its own operating system.
S42: when the terminal 100 starts its own operating system, it runs a network module driver to drive the network module 170.
S43: the terminal 100 runs the first program and runs the network module enabling program to enable the network module 170 in the course of running the first program. The first program is any program with the execution sequence being behind the network module driver and before the network module enabling program.
S44: the terminal 100 is connected to the network through the network module 170, which is driven and enabled.
In the present application, when the user presses the power-on key of the terminal 100, the terminal 100 generates a corresponding power-on instruction, and the terminal 100 can start its own operating system according to the power-on instruction.
In S42, the terminal 100 may run the respective programs in the execution order indicated by the standard start-up flow as previously described. The operation referred to in this application may refer to a process of acquiring a corresponding program by calling or the like to execute the program. For example, the terminal 100 may call a corresponding program through the processor 190 to start the operating system of the terminal 100, for example, the processor 190 calls a network module driver to drive the network module 170 during system start.
In S43, the first program is any program whose execution sequence is after the network module driver and before the network module enabling program in the system startup process of the terminal 100. The first program may be any application program that is run in the terminal 100 during system startup, for example, the first program may be a system program, or the first program may also be an application program. The network module driver is used to drive the network module 170 of the terminal 100, the network module enabling program is used to enable the network module 170, and the terminal 100 can connect to the network through the network module 170 after being driven and enabled. In this application, the network module 170 may be, but is not limited to, a network card.
The network module enabling program may be used to enable the network module 170 so that the enabled network module 170 can make network connections. For example, if the network module 170 of the terminal 100 is a network card, in the system starting process, after the terminal 100 calls a network card driver to drive the network card, the network card is mapped into an equipment node in a down state of the system, and at this time, the equipment node cannot perform network connection. Then, after the network card is enabled, it is equivalent to setting the device node from the down state to the up state, so that when the terminal 100 requests a network service, network connection can be performed through the network card in the up state.
According to the existing standard starting process, the programs executed in sequence according to the execution sequence in the system starting process usually have a certain dependency relationship. For example, when the terminal 100 is started, the processor 190 will call a relevant program for system startup, and when the processor 190 calls an Init process, it needs to create a corresponding system kernel thread through a kernel thread function kenrel _ thread () in a kernel startup phase to boot.
In the present application, on the basis of the existing standard start-up procedure, in order to prepare in advance before the terminal 100 requests the network service, the program related to the network service in the terminal 100 is called in advance, that is, the program related to the network service is called in parallel, so that the continuity of the program having the dependency relationship when being executed is prevented from being interrupted in the system start-up process. In the system starting process of the terminal 100, after the network module driver is executed, the first program and the network module enabling program in the terminal 100 may be called in parallel to enable the network module 170 in advance, so that when the terminal 100 requests a network service, network connection may be performed through the enabled network module 170 without performing an enabling operation on the network module 170 in the network service process, which saves the enabling time and may improve the efficiency of network connection performed by the terminal 100.
In this application, after the network module driver is loaded in the kernel boot phase, any program run by the terminal 100 in each subsequent boot phase of the system until the system service phase is booted may be used as the first program, for example, the first program may be a program in the kernel boot phase, or the first program may also be a program in the virtual machine boot phase, and so on. In the process of running the first program, the terminal 100 may synchronously run a network module enabling program that is originally executed when the terminal 100 requests a network service, so as to enable the network module 170 in advance.
In one embodiment, after the network module driver is executed in the kernel boot phase, the synchronous execution of the first program and the network module enabling program may also occur in the kernel boot phase.
For example, the network module 170 is a network card, and the network module driver is a network card driver. If the processor 190 executes the network card driver at the Kernel start stage in the system start process, the first program may be a program that is executed by the processor 190 sequentially after the network card driver in the system start process, for example, the first program is a Kernel process, the processor 190 also runs the network card enabling program in parallel to enable the network card of the terminal 100 in the process of running the Kernel process to start the system, at this time, the system start process is as shown in fig. 5A, so that the parallel running of the Kernel process and the network card enabling program can be realized, and the network connection efficiency of the terminal is improved.
In another embodiment, after the network module driver is executed in the kernel boot phase, the parallel execution of the first program and the network module enabling program may occur in other boot phases after the kernel boot.
For example, the network module 170 is a network card, the network module driver is a network card driver, and the network module enabling program is a network card enabling program. If the terminal 100 executes the network card driver at the kernel start stage in the system start process through the processor 190, after the kernel start stage finishes executing the network card driver, when the terminal 100 runs any one of the Init process, the zygate process, the initialization virtual machine (i.e., hatching the Dalvik VM instance), or the system service at any one of the several start stages, the network card enabling program may be run in parallel to enable the network card, as shown in fig. 5B, when the first program is the Init process, the first program and the network card enabling program are run in parallel.
Therefore, during the system startup process, the terminal 100 enables the network module 170 through the network module enabling program called simultaneously with the first program, and since the first program is any program whose execution sequence is after the network module driver and before the network module enabling program, the timing for calling the network module enabling program to enable the network module 170 is flexible.
After the network module 170 is driven and enabled, the terminal 100 may acquire an IP address through the driven and enabled network module 170 to perform network connection. As shown in fig. 6, a schematic diagram of implementing network connection through the network module 170 during system startup is provided for the present application. In fig. 6, taking the first program as an example of a program whose execution sequence is in the kernel boot phase, the steps marked by solid lines are the main solution of the present application, and the steps marked by dashed lines are optional, wherein the processor 190, the memory 120 and the network module 170 may be the components from fig. 1.
In fig. 6, at the start-up terminal 100, the processor 190 reads the relevant programs for starting up the system, and these programs may be stored in the memory 120 of the terminal 100, and the processor 190 may call the relevant programs in turn according to the execution sequence during the system start-up process. After the terminal 100 runs the network module driver through the processor 190, the network module 170 will be driven, and the arc arrow in the figure represents the execution of the corresponding program, and as the arc arrow labeled "drive network module 170" can be understood as the process of the network module driver acting on the network module 170, i.e., the process of driving the network module 170. While the curved arrow labeled "system resume boot" may be understood as processor 190 continuing to call other programs in the order of execution in the system boot.
Considering that the frequency of changing the networking requirements of the terminal 100 is low when the user uses the terminal 100, the networking requirements of the terminal 100 after being powered on are generally consistent with the networking requirements when recently used. Thus, in one embodiment, the terminal 100 may also store status record information that records the status of the network module 170 before the terminal 100 was last closed. For example, if the network module 170 is a network card, the status record information may record the status of the network card before the terminal 100 is turned off last time, and the status of the network card may be in an on (up) state or an off (down) state, and the status record information may be stored in the memory 120 of the terminal 100. So that the state of the terminal 100 after being powered on again can refer to the state recorded by the stored state recording information.
Generally, the recorded status of the network module 170 may indicate whether the terminal 100 has a networking need. For example, if the recorded state of the network module 170 is an open state, that is, the network module is in a state of connecting to a network, it indicates that the terminal 100 has a networking requirement in the process of being used by a user, and at this time, the network module 170 needs to be enabled, so that the terminal 100 connects to the network through the driven and enabled network module 170. On the contrary, if the recorded state of the network module 170 is a closed state, that is, the network module 170 is in a state of not being connected to the network, it indicates that the terminal 100 may not have a networking requirement in the using process, and at this time, the terminal 100 does not need to enable the network module 170.
Therefore, in the present application, before the network module enabling program in the terminal 100 is called, the terminal 100 may query the stored status record information, for example, as shown in fig. 6, the terminal 100 may query the status record information in the memory 120 through the processor 190, and then the processor 190 may determine whether the terminal 100 has a networking requirement after being powered on according to the recorded status of the network module 170, so as to determine whether the network module enabling program is also called in the process of calling the first program.
After the terminal 100 queries the state record information, if the state of the network module 170 recorded in the state record information is an open state, that is, the query result shown in fig. 6, the terminal 100 is required to enable the network module 170 at this time, and then the terminal 100 may synchronously run the network module enabling program when the first program is run after the network module driver is executed. In fig. 6, the first program is taken as an example of the Kernel process Kernel, so as to enable the network module 170 in advance in the system starting process, which saves the time for enabling the network module 170 when the terminal 100 requests the network service.
In practical applications, after the network module 170 is enabled after the network module enabling program is called, the network module 170 may record and store its current state after being enabled, for example, in the memory 120, which is indicated by a dotted line in fig. 6.
Of course, if the state of the network module 170 recorded by the state recording information is the off state, the terminal 100 does not need to call the network module enabling program during the operation of the first program. That is, after the terminal 100 runs the network module driver, the programs after the network module driver are run according to the execution sequence in the system starting process of the terminal 100, and the programs after the running network module driver do not include the network module enabling program, so that the starting of the operating system is completed. That is, since the terminal 100 has no networking requirement, the network module enabling program does not need to be run in the subsequent system starting process in the present application, and the enabling operation of the network module 170 is saved.
Later, if the user using the terminal 100 has a networking requirement, the user may manually or otherwise input a corresponding instruction to control the terminal 100 to enable the network module 170 to perform network connection. For example, in one embodiment, after the system is started, if the terminal 100 receives an input instruction for instructing the terminal 100 to perform network connection, the terminal 100 executes a network module enabling program according to the input instruction to enable the network module 170, so that the terminal 100 can perform network connection through the network module 170 which is driven and enabled.
Referring to fig. 6, in the present application, after the network module 170 is driven, before the first program and the network module enabling program are invoked, the state of the network module 170 before the terminal 100 is closed in the near future may be determined by querying the state record information, and based on this, in the system starting process, the enabling of the network module 170 is controlled, so that the state of the network module 170 is consistent with the state before the closing, so as to meet the networking requirement of the user, thereby improving the user experience.
As the system is continuously started, when the terminal 100 requests a network service, the terminal 100 may detect the current state of the network module 170 to determine whether the network module enabling procedure has been successfully performed, i.e., whether the network module 170 is successfully enabled.
On the other hand, after the terminal 100 detects the current state of the network module 170, if it is determined that the current state of the network module 170 is the on state, as shown in fig. 6, if the terminal 100 needs to perform networking at this time, the terminal 100 may obtain an Internet Protocol (IP) address through the driven and enabled network module 170, and connect to a network according to the obtained IP address.
For example, if the terminal 100 detects that the network module 170 is currently in an on state through the processor 190, the terminal 100 may start a Dynamic Host Configuration Protocol (DHCP), a Point-to-Point Protocol over Ethernet (PPPOE), and the like to obtain an IP address, and may perform networking through the obtained IP address. Alternatively, the terminal 100 may access the internet through a proxy server in the browser. The present application is not particularly limited as to the type of network connected, as long as the network connection of the terminal 100 can be achieved.
It should be noted that, if the network to which the terminal 100 needs to connect is a WiFi network, the terminal 100 needs to connect to a wireless access Point (Accss Point, AP) before acquiring the IP address, and then perform network connection through the AP. The connection process is consistent with the existing method, and is not described herein again.
After detecting the current state of the network module 170, if it is determined that the current state of the network module 170 is the off state, the terminal 100 queries the state of the network module 170 recorded in the stored state record information. For example, as shown in fig. 7, if the processor 190 determines that the state of the network block recorded by the state recording information stored in the memory 120 is in an on state, indicating that the network module enabling program may not be successfully called in S12, the terminal 100 may call the network module enabling program again to enable the network module 170. In this way, it is helpful to avoid the situation that the network module 170 fails to successfully enable the system to respond to the network service request of the terminal 100, so that the terminal 100 requiring network connection can perform network connection normally after being powered on.
Of course, if the state of the network module 170 recorded by the state recording information is an off state, which indicates that there may be no requirement for network connection after the terminal 100 is powered on, the network module enabling program does not need to be called to enable the network module 170 when the terminal is continuously executed according to the execution sequence in the standard starting procedure, so that the enabling operation of the network module 170 is saved. Similarly, if the subsequent user has a network connection requirement, the network connection is realized in the manual mode and the like, which is not described herein again.
Therefore, in the present application, at the stage that the terminal 100 requests the network service, by querying and comparing the current state of the network module 170 and the recorded state of the network module 170, before the terminal 100 requests the network service, it can be ensured that the current state of the network module 170 is the same as the state of the network module 170 before the terminal 100 was last closed, and the network state after the terminal 100 is powered on is automatically adjusted to be consistent with the network state when the terminal was powered off last time, so as to improve the user experience.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions described in accordance with the present application are generated, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.

Claims (7)

1. A terminal system starting method is characterized by comprising the following steps:
when the terminal is started in the operating system of the terminal, a network module driving program is operated; the network module driver is used for driving a network module of the terminal;
the terminal inquires the stored state record information of the network module, wherein the state record information is used for recording the state of the network module before the terminal is closed for the last time;
if the terminal determines that the state of the network module recorded by the state recording information is an open state, the terminal synchronously runs a network module enabling program in the process of running a first program in the terminal after the terminal runs the network module driving program; the first program is any program, the execution sequence of which is located after the network module driver and before the network module enabling program in the system starting process of the terminal, and the network module enabling program is used for enabling the network module;
wherein after synchronously running the network module enabling program, the method further comprises:
the terminal obtains an internet protocol IP address through the network module which is driven and enabled, and is connected with the network according to the IP address.
2. The method of claim 1, wherein after the terminal queries the stored status record information of the network module, the method further comprises:
if the terminal determines that the state of the network module recorded by the state recording information is a closed state, after the terminal finishes operating the network module driving program, operating programs behind the network module driving program according to an execution sequence in a system starting process of the terminal to finish starting of the operating system; wherein the program subsequent to the running of the network module driver does not include a network module enabling program for enabling the network module.
3. The method of claim 2, wherein after completing the booting of the operating system, the method further comprises:
the terminal receives an input instruction, wherein the input instruction is used for indicating the terminal to carry out network connection;
and the terminal operates the network module enabling program according to the input instruction and is connected with the network through the network module which is driven and enabled.
4. A terminal comprising a processor, a memory, and a network module, wherein:
the memory stores a network module driving program, a network module enabling program and state recording information of the network module; the network module driver is used for driving a network module of the terminal, the network module enabling program is used for enabling the network module, and the state recording information is used for recording the state of the network module before the terminal is closed last time;
the processor is used for running a network module driving program when an operating system of the terminal is started, inquiring the stored state record information of the network module, and if the state of the network module recorded by the state record information is determined to be an open state, synchronously running the network module enabling program in the process of running a first program in the terminal after the network module driving program is run; the first program is any program, wherein the execution sequence of the first program is positioned behind the network module driving program and before the network module enabling program in the system starting process of the terminal;
the network module is used for performing network connection after being driven and enabled;
the network module acquires an Internet Protocol (IP) address after being driven and enabled, and is connected with a network according to the IP address.
5. The terminal of claim 4, wherein the processor is further configured to:
after querying the stored state record information of the network module, if the state of the network module recorded by the state record information is determined to be a closed state, after the processor finishes operating the network module driver, operating the programs behind the network module driver according to the execution sequence in the system starting process of the terminal to finish starting the operating system; wherein the program subsequent to the running of the network module driver does not include a network module enabling program for enabling the network module.
6. The terminal of claim 5, wherein the terminal further comprises:
the receiving module is used for receiving an input instruction, and the input instruction is used for indicating the terminal to carry out network connection;
the processor runs the network module enabling program according to the input instruction, and connects to the network through the network module after being driven and enabled.
7. A computer storage medium having computer program instructions stored therein, which when run on a computer, cause the computer to perform the method of any one of claims 1-3.
CN201710349052.3A 2017-05-17 2017-05-17 Terminal system starting method and terminal Active CN108958807B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710349052.3A CN108958807B (en) 2017-05-17 2017-05-17 Terminal system starting method and terminal
PCT/CN2018/080730 WO2018210063A1 (en) 2017-05-17 2018-03-27 Terminal system startup method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710349052.3A CN108958807B (en) 2017-05-17 2017-05-17 Terminal system starting method and terminal

Publications (2)

Publication Number Publication Date
CN108958807A CN108958807A (en) 2018-12-07
CN108958807B true CN108958807B (en) 2021-01-12

Family

ID=64273282

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710349052.3A Active CN108958807B (en) 2017-05-17 2017-05-17 Terminal system starting method and terminal

Country Status (2)

Country Link
CN (1) CN108958807B (en)
WO (1) WO2018210063A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110716762B (en) * 2019-09-03 2023-05-26 晶晨半导体(深圳)有限公司 Method for operating system to enter homepage quickly
CN111132097B (en) * 2019-12-31 2023-09-26 深圳移航通信技术有限公司 Wireless module driving method and device, wireless module, terminal and storage medium
CN112000375B (en) * 2020-07-13 2023-12-26 深圳市智微智能软件开发有限公司 Method, device, equipment and storage medium for judging startup stage of android system
CN114047961A (en) * 2021-11-15 2022-02-15 合众新能源汽车有限公司 Android system starting optimization method, intelligent terminal and computer readable medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001026325A2 (en) * 1999-10-05 2001-04-12 Gateway, Inc. A system and method for initiating a network connection
CN1684039A (en) * 2005-02-01 2005-10-19 苏州超锐微电子有限公司 Method for realizing network function by magnetic disc main boot record
CN102629210A (en) * 2012-03-16 2012-08-08 苏州优康通信设备有限公司 Novel method for realizing network function ahead of loading
CN106302250A (en) * 2016-08-23 2017-01-04 乐视控股(北京)有限公司 The method for controlling network flow of mobile terminal and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5316432B2 (en) * 2010-01-19 2013-10-16 富士通株式会社 Network controller control method, program, and information processing apparatus
CN103761088A (en) * 2014-01-13 2014-04-30 中南大学 Multiple operation system switching method applicable to ARM (advanced risc machine) framework mobile equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001026325A2 (en) * 1999-10-05 2001-04-12 Gateway, Inc. A system and method for initiating a network connection
CN1684039A (en) * 2005-02-01 2005-10-19 苏州超锐微电子有限公司 Method for realizing network function by magnetic disc main boot record
CN102629210A (en) * 2012-03-16 2012-08-08 苏州优康通信设备有限公司 Novel method for realizing network function ahead of loading
CN106302250A (en) * 2016-08-23 2017-01-04 乐视控股(北京)有限公司 The method for controlling network flow of mobile terminal and device

Also Published As

Publication number Publication date
WO2018210063A1 (en) 2018-11-22
CN108958807A (en) 2018-12-07

Similar Documents

Publication Publication Date Title
CN110495136B (en) Hardware attribute discovery method and system of bare metal server
CN107276789B (en) Log uploading method and device and computer readable storage medium
JP4738534B2 (en) Boot negotiation between multiple bootable devices
CN108958807B (en) Terminal system starting method and terminal
US8327174B2 (en) Loading operating systems using memory segmentation and ACPI based context switch
US9081703B2 (en) Method and apparatuses for facilitating sharing device connections between a host and client based on the power mode of the host
US8452952B2 (en) Methods and apparatus for building system images and split booting
CN111314799A (en) Terminal system architecture, communication system, communication method, and storage medium
US9167373B2 (en) Multiple SIM support with single modem software architecture
EP3637251B1 (en) Method, device and terminal for executing hotpatch
CN105335178B (en) Starting control method and device
WO2019057155A1 (en) Method and device for dynamically managing kernel node
US9003174B2 (en) Method for boosting an electronic device with multiple processing units, and electronic device for implementing the same
US11671379B1 (en) System and method for subscription management using dynamically composed management entities
US11789718B2 (en) System and method for subscription based solution modification implementation
US20230221784A1 (en) System and method for power state enforced subscription management
CN111399874A (en) System upgrading method and device, storage medium and intelligent wearable device
US10616944B2 (en) Computer system and method thereof for sharing of wireless connection information between UEFI firmware and OS
WO2020134899A1 (en) Method for generating network search list, network search method and corresponding apparatus
US10209978B1 (en) Mobile application installation service on a mobile phone
WO2019100704A1 (en) Starting method for multi-mode iot device, multi-mode iot device, and storage medium
EP3654176B1 (en) User equipment, server, control method of the user equipment and control method of the server
WO2008054134A1 (en) Terminal having boot lazy loading function for wireless internet platform module and method of controlling the same
JP2012150797A (en) Data card, method for data card to report port, and method for booting data card
CN109275124B (en) Mobile terminal Bluetooth protocol stack loading processing method, mobile terminal and storage medium

Legal Events

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