System upgrade method, terminal and storage medium
By registering the network monitoring service on the terminal to monitor the network status, it only initiates system upgrade requests when connected to the network, and closes related processes when not connected to the network. This solves the problem of frequent terminal system upgrade requests and reduces resource waste and background Residency ensures the smooth progress of system upgrades and performance maintenance.
Patent Information
- Application Number
- CN202310794545.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-29
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2043-06-29
AI Technical Summary
When the terminal is not connected to the network, system upgrade requests are frequent and random, resulting in a waste of resources, and the application background resident ratio is high, affecting performance.
When an application running on the terminal triggers a system upgrade, register a network monitoring service to monitor network status changes, initiate a system upgrade request only when connected to the network, and close related processes when not connected to the network to reduce background persistence.
It effectively avoids resource waste, reduces the application background resident ratio, and ensures the smooth progress of system upgrades and maintenance of terminal performance.
Smart Images

Figure CN117729561B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a system upgrade method, terminal and storage medium. Background Art
[0002] With the continuous development of computer technology, terminals have increasingly diversified functions and are also accompanied by more frequent system upgrades. In this way, it is possible to ensure that the terminal system is kept up to date, so that the terminal maintains optimal performance and maintains a good user experience.
[0003] At present, the system upgrade method is generally as follows: the terminal sends a system upgrade request to the server to request an installation package required for the system upgrade, so as to use the installation package to perform the system upgrade.
[0004] However, when the terminal is not connected to the network, the terminal will randomly and frequently initiate system upgrade requests within a certain period of time, resulting in a waste of terminal request resources. Summary of the invention
[0005] The present application provides a system upgrade method, a terminal and a storage medium, which are used to avoid waste of terminal request resources.
[0006] In order to achieve the above objectives, this application adopts the following technical solutions:
[0007] In a first aspect, a system upgrade method is provided, the method comprising:
[0008] In response to the application running on the terminal triggering a system upgrade and the terminal not being connected to the network, registering a network monitoring service; the network monitoring service is used to monitor changes in the state of the network;
[0009] In the case where the network monitoring service monitors that the terminal is connected to the network, a system upgrade request is sent to the server; the system upgrade request is used to request the application to perform an installation package required for the system upgrade.
[0010] In the above technical solution, when the application running on the terminal triggers a system upgrade and the terminal is not connected to the network, a network monitoring service is registered. The network status changes are monitored in a timely manner through the network monitoring service to determine whether the terminal is connected to the network, so that when the terminal is connected to the network, a system upgrade request is quickly initiated to complete the system upgrade of the terminal. In this way, there is no need to randomly and frequently initiate system upgrade requests within a close period of time, which can effectively avoid the waste of terminal request resources.
[0011] In a possible implementation manner of the first aspect, after registering the network monitoring service, the method further includes:
[0012] Close the application and end the process in the application for system upgrade.
[0013] In this possible implementation, when the terminal is not connected to the network, by closing the application and ending the system upgrade related process in the application, the number of applications running in the application background can be reduced, that is, the application background resident ratio is effectively reduced. The application background resident ratio refers to the ratio between the number of applications running in the application background and the total number of applications.
[0014] In another possible implementation manner of the first aspect, when, based on the network monitoring service, it is monitored that the terminal accesses the network, the method further includes:
[0015] The application is launched, and the process for system upgrade in the application is started.
[0016] In this possible implementation, when the terminal is not connected to the network, the number of applications running in the application background is reduced by closing the application and ending the system upgrade related process in the application. Then, when the terminal is monitored to be connected to the network, the application is started and the system upgrade related process in the application is started, so that the system upgrade for the terminal can be performed using the application later, thereby ensuring the smooth progress of the system upgrade.
[0017] In another possible implementation of the first aspect, closing the application and ending a process for system upgrade in the application includes:
[0018] Close the application;
[0019] The process termination command is called, and according to the identifier of the process used for system upgrade in the application program, the process corresponding to the identifier is terminated.
[0020] In this possible implementation, by calling a process termination command, the system upgrade related process in the application can be quickly terminated.
[0021] In another possible implementation of the first aspect, in response to an application running on a terminal triggering a system upgrade and the terminal not being connected to a network, registering a network monitoring service includes:
[0022] In response to the application reaching a preset upgrade period and the terminal not being connected to the network, registering the network monitoring service; or,
[0023] In response to the application reaching a preset upgrade time and the terminal not being connected to a network, registering the network monitoring service.
[0024] In this possible implementation, two methods of application triggering system upgrade are provided. Among them, by setting a preset upgrade cycle or a preset upgrade time, the automatic triggering of the system upgrade can be realized, thereby improving the flexibility of the system upgrade.
[0025] In another possible implementation manner of the first aspect, when the network monitoring service monitors that the terminal accesses the network, sending a system upgrade request to the server includes:
[0026] In the case where the terminal accesses the network based on the network monitoring service, the preset upgrade cycle is reset; in response to the application reaching the reset preset upgrade cycle, the system upgrade request is sent to the server; or,
[0027] In the case where the terminal accesses the network based on the monitoring service of the network, the preset upgrade time is reset; in response to the application reaching the reset preset upgrade time, the system upgrade request is sent to the server.
[0028] In this possible implementation, two methods are provided for triggering the terminal to send a system upgrade request to the server. Among them, by resetting the preset upgrade cycle or resetting the preset upgrade time, the system upgrade request can be automatically triggered, thereby improving the flexibility of the system upgrade.
[0029] In another possible implementation manner of the first aspect, the terminal not accessing the network means that the terminal is not accessing the mobile data network and is not accessing the wireless communication network; the terminal accessing the network means that the terminal is accessing the mobile data network or the wireless communication network.
[0030] In this possible implementation, two types of networks are provided, thereby enriching the types of networks to which the terminal accesses.
[0031] In another possible implementation manner of the first aspect, the network monitoring service is a Job Service.
[0032] In this possible implementation, by registering the Job Service, since the Job Service provides the function of monitoring network status changes, it is possible to timely monitor whether the terminal is connected to the network, and thus respond in time when the terminal is connected to the network, thereby ensuring the smooth progress of the system upgrade.
[0033] In a second aspect, the present application provides a terminal, including: a processor and a memory. The memory is used to store program codes, and the processor is used to call the program codes stored in the memory, so as to implement any one of the methods provided in the first aspect.
[0034] According to a third aspect, a computer-readable storage medium is provided, comprising a program code. When the program code is executed on a terminal, the terminal executes any one of the methods provided in the first aspect.
[0035] According to a fourth aspect, a computer program product is provided, comprising a program code. When the program code is executed on a terminal, the terminal executes any one of the methods provided in the first aspect.
[0036] It should be noted that the technical effects brought about by any implementation method in the second to fourth aspects can refer to the technical effects brought about by the corresponding implementation method in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of an implementation environment of a system upgrade method provided in an embodiment of the present application;
[0038] Figure 2 A schematic diagram of the hardware structure of a terminal provided in an embodiment of the present application;
[0039] Figure 3 A schematic diagram of the software structure of a terminal provided in an embodiment of the present application;
[0040] Figure 4 A flowchart of a system upgrade method provided in an embodiment of the present application;
[0041] Figure 5 is an interactive flow chart of a system upgrade shown in an embodiment of the present application;
[0042] Figure 6 is a comparison diagram of a system upgrade packet search process shown in an embodiment of the present application;
[0043] Figure 7 is a packet search comparison diagram of a system upgrade shown in an embodiment of the present application;
[0044] Figure 8 It is a structural block diagram of a system upgrading device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0045] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" means one or more, and "plurality" means two or more. The words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not limit them to be different.
[0046] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0047] The system upgrade method provided in the embodiment of the present application can be applied in the field of terminal technology, and specifically can be applied in a system upgrade scenario of a terminal.
[0048] In the embodiment of the present application, the system upgrade can be to upgrade the existing functions in the terminal, or to add new functions to the terminal through software update. Generally, in the system upgrade scenario of the terminal, a package search technology is used to obtain the installation package required for the system upgrade.
[0049] In the related art, the system upgrade method is usually: the terminal sends a system upgrade request to the server to request the installation package required for the system upgrade, so as to use the installation package to perform the system upgrade. It should be understood that the process of the terminal sending the system upgrade request to the server to request the installation package required for the system upgrade is also a package search process.
[0050] However, when the terminal is not connected to the network, the terminal may randomly and frequently initiate a system upgrade request within a period of time. For example, the terminal may randomly and frequently initiate a system upgrade request within an hour, that is, randomly and frequently search for packets, thus causing a waste of terminal request resources.
[0051] In view of this, an embodiment of the present application provides a system upgrade method, in which a network monitoring service is registered when an application running on a terminal triggers a system upgrade and the terminal is not connected to the network. The network monitoring service is used to timely monitor the state changes of the network to determine whether the terminal is connected to the network, so that when the terminal is connected to the network, a system upgrade request is quickly initiated to complete the system upgrade of the terminal. In this way, there is no need to randomly and frequently initiate system upgrade requests within a close period of time, which can effectively avoid the waste of terminal request resources.
[0052] For example, Figure 1 A schematic diagram of an implementation environment of a system upgrade method provided in an embodiment of the present application. Figure 1 , the implementation environment of the system upgrade method includes a terminal 100 and a server 101.
[0053] The terminal 100 may be at least one of a smart phone, a smart watch, a desktop computer, a laptop computer, a virtual reality terminal, an augmented reality terminal, a wireless terminal, a laptop computer, and the like.
[0054] In the embodiment of the present application, the terminal 100 provides a system upgrade function. In some embodiments, an application (application, APP) providing the system upgrade function may be installed in the terminal 100, and the system upgrade of the terminal can be realized through the application.
[0055] In some embodiments, the terminal 100 has a communication function and can communicate with the server 101 through a wired network or a wireless network. In the embodiment of the present application, the terminal 100 is used to register a network monitoring service in response to the application running on the terminal 100 triggering a system upgrade and the terminal 100 is not connected to the network; when the network monitoring service monitors that the terminal 100 is connected to the network, a system upgrade request is sent to the server 101.
[0056] The server 101 is used to provide background services for the terminal 100. The server 101 may be an independent physical server, or a server cluster or distributed file system composed of multiple physical servers, or at least one of cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks, and big data or artificial intelligence platforms, etc., which is not limited in the embodiments of the present application.
[0057] In the embodiment of the present application, the server 101 is used to receive a system upgrade request from the terminal 100; obtain an installation package required for the application to perform a system upgrade, and return the obtained installation package to the terminal 100.
[0058] For example, see Figure 1 After sending a system upgrade request to the server 101, the terminal 100 receives the installation package returned by the server 101 based on the system upgrade request. Then, the download inquiry interface of the installation package is displayed on the screen of the terminal 100, and the download inquiry interface includes relevant information of the installation package (such as version number, size or details, etc.), a download later control, and a download control. The terminal 100 receives a trigger operation of the user on the download control, and in response to the trigger operation of the download control, the installation package is downloaded. After the installation package is downloaded, the installation inquiry interface of the installation package can be displayed on the screen of the terminal 100, and the installation inquiry interface includes relevant information of the installation package and an immediate installation control. The terminal 100 receives a trigger operation of the user on the immediate installation control, and in response to the trigger operation of the immediate installation control, the installation package is installed, thereby completing the system upgrade of the terminal.
[0059] For example, Figure 1 The structural diagram of the terminal 100 in FIG. Figure 2 shown. Figure 2 A schematic diagram of the hardware structure of a terminal provided in an embodiment of the present application.
[0060] See also Figure 2 The terminal 100 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a subscriber identification module (SIM) card interface 295. The sensor module 280 may include a pressure sensor 280A, a gyroscope sensor 280B, an air pressure sensor 280C, a touch sensor 280D, and the like.
[0061] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal 100. In other embodiments of the present application, the terminal 100 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0062] The processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0063] The controller may be the nerve center and command center of the terminal 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0064] The processor 210 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may store instructions or data that the processor 210 has just used or cyclically used. If the processor 210 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.
[0065] In some embodiments, the processor 210 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0066] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 210 may include multiple I2C buses.
[0067] The I2S interface may be used for audio communication. In some embodiments, the processor 210 may include multiple sets of I2S buses.
[0068] The PCM interface can also be used for audio communication to sample, quantize and encode analog signals.
[0069] The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
[0070] The MIPI interface can be used to connect the processor 210 with peripheral devices such as the display screen 294 and the camera 293. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 210 and the display screen 294 communicate via the DSI interface to implement the display function of the terminal 100.
[0071] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or a data signal. The GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
[0072] The USB interface 230 is an interface that complies with USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
[0073] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the terminal 100. In other embodiments of the present application, the terminal 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0074] The charging management module 240 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 240 may receive charging input from a wired charger through the USB interface 230. In some wireless charging embodiments, the charging management module 240 may receive wireless charging input through a wireless charging coil of the terminal 100.
[0075] The wireless communication function of the terminal 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modem processor and the baseband processor.
[0076] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0077] The mobile communication module 250 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the terminal 100. The mobile communication module 250 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 250 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 250 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 250 can be set in the processor 210. In some embodiments, at least some of the functional modules of the mobile communication module 250 can be set in the same device as at least some of the modules of the processor 210.
[0078] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 270A, a receiver 270B, etc.), or displays an image or video through a display screen 294. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 210 and be set in the same device as the mobile communication module 250 or other functional modules.
[0079] The wireless communication module 260 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (bluetoo2, BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR), etc. applied to the terminal 100. The wireless communication module 260 can be one or more devices integrating at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and filters it, and sends the processed signal to the processor 210. The wireless communication module 260 can also receive the signal to be sent from the processor 210, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0080] In some embodiments, the antenna 1 of the terminal 100 is coupled to the mobile communication module 250, and the antenna 2 is coupled to the wireless communication module 260, so that the terminal 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zeni2 satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0081] The terminal 100 implements the display function through a GPU, a display screen 294, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 may include one or more GPUs that execute program instructions to generate or change display information.
[0082] The display screen 294 is used to display images, videos, etc. The display screen 294 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal 100 may include 1 or N display screens 294, where N is a positive integer greater than 1.
[0083] The terminal 100 can realize the shooting function through the ISP, the camera 293, the video codec, the GPU, the display screen 294 and the application processor.
[0084] The ISP is used to process the data fed back by the camera 293. The ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 293.
[0085] The camera 293 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the terminal 100 may include 1 or N cameras 293, where N is a positive integer greater than 1.
[0086] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the terminal 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0087] The video codec is used to compress or decompress digital video. The terminal 100 may support one or more video codecs.
[0088] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of the terminal 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0089] The external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal 100. The external memory card communicates with the processor 210 through the external memory interface 220 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0090] The internal memory 221 can be used to store computer executable program codes, which include instructions. The processor 210 executes various functional applications and data processing of the terminal 100 by running the instructions stored in the internal memory 221. The internal memory 221 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the terminal 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0091] The terminal 100 can implement audio functions such as music playing and recording through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the earphone interface 270D, and the application processor.
[0092] The audio module 270 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. The audio module 270 can also be used to encode and decode audio signals. In some embodiments, the audio module 270 can be arranged in the processor 210, or some functional modules of the audio module 270 can be arranged in the processor 210.
[0093] The speaker 270A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The terminal 100 can listen to music or listen to a hands-free call through the speaker 270A.
[0094] The receiver 270B, also called a "handset", is used to convert audio electrical signals into sound signals. When the terminal 100 receives a call or voice message, the voice can be received by placing the receiver 270B close to the ear.
[0095] Microphone 270C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.
[0096] The earphone interface 270D is used to connect a wired earphone and can be a USB interface 230, or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of 2e USA (CTIA) standard interface.
[0097] The pressure sensor 280A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 280A can be set on the display screen 294. There are many types of pressure sensors 280A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 280A, the capacitance between the electrodes changes. The terminal 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 294, the terminal 100 detects the touch operation intensity according to the pressure sensor 280A. The terminal 100 can also calculate the touch position according to the detection signal of the pressure sensor 280A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0098] The gyroscope sensor 280B can be used to determine the motion posture of the terminal 100. In some embodiments, the angular velocity of the terminal 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 280B. The gyroscope sensor 280B can be used for anti-shake shooting. Exemplarily, when the shutter is pressed, the gyroscope sensor 280B detects the angle of the terminal 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the terminal 100 through reverse movement to achieve anti-shake. The gyroscope sensor 280B can also be used for navigation and somatosensory game scenes.
[0099] The air pressure sensor 280C is used to measure air pressure. In some embodiments, the terminal 100 calculates the altitude through the air pressure value measured by the air pressure sensor 280C to assist positioning and navigation.
[0100] The touch sensor 280D is also called a "touch panel". The touch sensor 280D can be arranged on the display screen 294, and the touch sensor 280D and the display screen 294 form a touch screen, also called a "touch screen". The touch sensor 280D is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 294. In other embodiments, the touch sensor 280D can also be arranged on the surface of the terminal 100, which is different from the position of the display screen 294.
[0101] The key 290 includes a power key, a volume key, etc. The key 290 may be a mechanical key or a touch key. The terminal 100 may receive key input and generate key signal input related to user settings and function control of the terminal 100.
[0102] Motor 291 can generate vibration prompts. Motor 291 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 294, motor 291 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0103] Indicator 292 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0104] The SIM card interface 295 is used to connect a SIM card. The SIM card can be connected to or disconnected from the terminal 100 by inserting into or removing from the SIM card interface 295. The terminal 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
[0105] It should be pointed out that Figure 2 The structure shown in the figure does not constitute a limitation on the terminal, except Figure 2 In addition to the components shown, the terminal may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0106] The software system of the terminal can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to illustrate the software structure of the terminal. Figure 3 A schematic diagram of the software structure of a terminal provided in an embodiment of the present application.
[0107] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
[0108] The application layer can include a series of application packages.
[0109] like Figure 3 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
[0110] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0111] like Figure 3 As shown, the application framework layer may include a system service module, a network module, a system upgrade module, a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0112] The system service module is used to provide a network monitoring service. In the embodiment of the present application, the network monitoring service can be registered through the system service module.
[0113] The network module is used to feedback the network status. In the embodiment of the present application, through the interaction between the network monitoring service provided by the system service module and the network module, real-time monitoring of the status change of the terminal network can be achieved.
[0114] The system upgrade module is used to trigger the package search logic for executing the system upgrade. In the embodiment of the present application, the system upgrade module sends a system upgrade request to the server to request to obtain the installation package required for the application to perform the system upgrade.
[0115] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0116] Content providers are used to store and retrieve data and make it accessible to applications. This data can include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0117] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0118] The phone manager is used to provide the communication functions of the terminal, such as the management of call status (including answering, hanging up, etc.).
[0119] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0120] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, the terminal vibrates, the indicator light flashes, etc.
[0121] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0122] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0123] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0124] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0125] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0126] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0127] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0128] A 2D graphics engine is a drawing engine for 2D drawings.
[0129] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0130] Figure 4 A flowchart of a system upgrade method provided in an embodiment of the present application. Figure 4 , the method includes the following S401-S408:
[0131] S401 . In response to a system upgrade being triggered by an application program running on the terminal and the terminal not being connected to a network, the terminal registers for a network monitoring service.
[0132] The terminal may be installed with an application program that provides a system upgrade function, and the terminal system can be upgraded through the application program.
[0133] The network monitoring service is used to monitor the state changes of the network. In some embodiments, the network monitoring service is a JobService. Thus, by registering the Job Service, since the Job Service provides the function of monitoring the state changes of the network, it is possible to monitor whether the terminal is connected to the network in a timely manner, so as to respond in time when the terminal is connected to the network, thereby ensuring the smooth progress of the system upgrade.
[0134] In some embodiments, the terminal is provided with a system service module, which is used to provide a network monitoring service. Accordingly, the process of registering the network monitoring service can be: the application (i.e., the application client) running on the terminal sends a monitoring service request to the system service module, and the monitoring service request is used to request registration of the network monitoring service. The system service module responds to the monitoring service request and registers the network monitoring service, so as to subsequently use the registered network monitoring service to perform the network monitoring process.
[0135] Exemplarily, the system service module can be provided with a Job Scheduler task scheduler. Accordingly, the system service module can create a network monitoring service (such as a Job Service) through the Job Scheduler task scheduler, and bind the created network monitoring service to the currently running application, so as to trigger the system upgrade process in time when the terminal access to the network is monitored.
[0136] The above embodiment takes the network monitoring service as a service provided by the system service module of the terminal as an example to illustrate the solution. In other embodiments, the network monitoring service can also be a background service provided by the server.
[0137] In this way, by registering the network monitoring service, the network status changes can be monitored in time when the terminal is not connected to the network to determine whether the terminal is connected to the network, so as to quickly execute the system upgrade process when the terminal is connected to the network.
[0138] In the embodiment of the present application, the manner in which the application triggers the system upgrade may be at least one of the following: the application reaches a preset upgrade cycle or the application reaches a preset upgrade time.
[0139] Among them, the preset upgrade cycle is a pre-set polling cycle, such as a polling cycle in seconds, minutes, hours or years, months, weeks, and days. In some embodiments, the preset upgrade cycle can be a uniform polling cycle. Exemplarily, taking a uniform polling cycle in hours as an example, the preset upgrade cycle can be a cycle of one hour, that is, a system upgrade is triggered every hour. In other embodiments, the preset upgrade cycle can also be a non-uniform polling cycle. Exemplarily, taking a non-uniform polling cycle in minutes as an example, the preset upgrade cycle can be a polling cycle of 10 minutes, 20 minutes, and 30 minutes, that is, a system upgrade is triggered at an interval of 10 minutes, a system upgrade is triggered at the next interval of 20 minutes, and a system upgrade is triggered at the next interval of 30 minutes, and the subsequent triggering process is continued according to the above non-uniform polling cycle. The embodiment of the present application does not limit the setting of the preset upgrade cycle.
[0140] The preset upgrade time is a preset upgrade time point (alarm), such as a certain year, month, day, or hour, minute, and second. For example, taking 12:00:00 as an example, a system upgrade is triggered every time 12:00:00 is reached. It should be understood that the number of preset upgrade times can be one or more. The embodiment of the present application does not limit the setting of the preset upgrade time.
[0141] Accordingly, in some embodiments, taking the application reaching a preset upgrade cycle as an example of a way for the application to trigger a system upgrade, the above S401 can be replaced by: the terminal registers the network monitoring service in response to the application reaching a preset upgrade cycle and the terminal not being connected to the network.
[0142] Alternatively, in other embodiments, taking the application reaching the preset upgrade time as an example of a way for the application to trigger a system upgrade, the above S401 can be replaced by: the terminal registers the network monitoring service in response to the application reaching the preset upgrade time and the terminal is not connected to the network.
[0143] In the above embodiment, two methods of application triggering system upgrade are provided, wherein the automatic triggering of system upgrade can be realized by setting a preset upgrade cycle or a preset upgrade time, thereby improving the flexibility of system upgrade.
[0144] In some embodiments, the terminal not accessing the network means that the terminal is not accessing the mobile data network and is not accessing the wireless communication network. Figure 4 When the terminal is not connected to the network, the terminal screen may display a sign indicating that the terminal is not connected to the network, such as displaying an "×" sign at the mobile signal icon in the upper left corner of the screen and displaying an "!" sign at the wireless icon in the upper left corner of the screen. In this way, two types of networks are provided, enriching the types of networks that the terminal is connected to.
[0145] The mobile data network may be a fourth generation mobile communication technology (4G) network or a fifth generation mobile communication technology (5G) network or other types of mobile data networks.
[0146] In some embodiments, after the application running on the terminal triggers a system upgrade, the terminal can determine whether the terminal is connected to the network. If the terminal is not connected to the mobile data network and the terminal is not connected to the wireless communication network, it is determined that the terminal is not connected to the network and the process of registering for the network monitoring service is executed.
[0147] Accordingly, the terminal accessing the network means that the terminal accesses the mobile data network or the wireless communication network. In other embodiments, if the terminal accesses the mobile data network or the wireless communication network, it is determined that the terminal accesses the network and the system upgrade process is executed. The embodiments of the present application will be described later by taking the case where the terminal is not connected to the network as an example to explain the system upgrade process.
[0148] S402: The terminal closes the application and ends the process for system upgrade in the application.
[0149] Among them, the process used for system upgrade in the application can be a software update process, such as an ouc process.
[0150] In some embodiments, the terminal closes the application, calls a process termination command, and terminates the process corresponding to the identifier of the process used for system upgrade in the application. In this way, by calling the process termination command, the termination of the system upgrade-related process in the application can be quickly achieved.
[0151] The process termination command provides a function of terminating the process of the application. In some embodiments, the process termination command may be a kill ouc command. Generally, the process termination command may also be referred to as a process suicide command. It should be understood that the above process of closing the application and terminating the system upgrade related process in the application is also the process of application suicide.
[0152] The process identifier is used to uniquely identify the process. In some embodiments, the process identifier can be any one of a process name, a process number, or a process identifier (identity document, ID). Exemplarily, after the process termination command, the identifier of the system upgrade related process in the application can be written into the process termination command, and then, running the process termination command can terminate the process corresponding to the identifier, thereby terminating the system upgrade related process in the application.
[0153] In some embodiments, the system service module provided in the terminal may also provide a process termination service. Accordingly, the above S402 may be replaced by: the terminal uses the system service module to close the application and terminate the system upgrade related process in the application.
[0154] In the above embodiment, when the terminal is not connected to the network, by closing the application and ending the system upgrade related processes in the application, the number of applications in the application background can be reduced, that is, the application background residence ratio is effectively reduced. Among them, the application background residence ratio refers to the ratio between the number of applications in the application background and the total number of applications. In the related art, when the terminal is not connected to the network, since it is necessary to randomly and frequently initiate system upgrade requests within a close period of time, it is necessary to ensure that the application is in a running state, which will block the application from committing suicide, resulting in a relatively high application background residence. Compared with the solutions of the related technology, the technical solution provided in the embodiment of the present application can effectively avoid the problem of a relatively high application background residence.
[0155] The above S401 to S402 illustrate the solution by taking the process of closing the application and ending the system upgrade related process after registering the network monitoring service as an example. It should be noted that the above S402 is an optional step. In other embodiments, after registering the network monitoring service, the terminal does not need to perform the above S402 process, and can perform S403.
[0156] S403: The terminal monitors whether the terminal is connected to the network based on the network monitoring service.
[0157] In some embodiments, the terminal is provided with a network module, and the network module is used to feedback the network status. Accordingly, the process of S403 is: based on the network monitoring service, monitoring the network status of the network module provided by the terminal to determine whether the terminal is connected to the network.
[0158] The above S402 to S403 illustrate the scheme by first executing the process of closing the application in S402 and ending the system upgrade related processes in the application, and then executing the process of monitoring whether the terminal is connected to the network based on the network monitoring service in S403. It should be noted that in some other embodiments, the terminal may first execute the process of monitoring whether the terminal is connected to the network based on the network monitoring service in S403, and then execute the process of closing the application in S402 and ending the system upgrade related processes in the application. Alternatively, in other embodiments, the terminal may simultaneously execute the process of closing the application in S402 and ending the system upgrade related processes in the application, and the process of monitoring whether the terminal is connected to the network based on the network monitoring service in S403. The embodiment of the present application does not limit the execution order of the above S402 and S403.
[0159] S404: When the terminal detects that the terminal is connected to the network based on the network monitoring service, the terminal starts the application and starts a process for system upgrade in the application.
[0160] In the embodiment of the present application, the terminal access network may be the terminal accessing a mobile data network or a wireless communication network. Figure 4 When the terminal is connected to the network, a sign indicating that the terminal is connected to the network may be displayed on the screen of the terminal, such as a mobile signal icon or a wireless icon in the upper left corner of the screen.
[0161] In some embodiments, the terminal starts the application, calls a process start command, and starts a process corresponding to the identifier of the system upgrade related process in the application.
[0162] Among them, the process launch command provides a function of starting the process of the application.
[0163] In some embodiments, the terminal is provided with a system upgrade module, which is used to trigger the search logic for executing the system upgrade. Accordingly, the above S404 can be replaced by: the terminal uses the system upgrade module to start the application and start the system upgrade related process in the application.
[0164] In the above embodiment, when the terminal is not connected to the network, the number of applications running in the application background is reduced by closing the application and ending the system upgrade related process in the application. Then, when the terminal is monitored to be connected to the network, the application is started and the system upgrade related process in the application is started, so that the system upgrade for the terminal can be performed using the application later, thereby ensuring the smooth progress of the system upgrade.
[0165] S405: When the terminal starts the application and starts the process for system upgrade in the application, the terminal sends a system upgrade request to the server.
[0166] The system upgrade request is used to request the application to perform the installation package required for the system upgrade. In some embodiments, the system upgrade request may carry an identifier of the function to be upgraded in the terminal system. Exemplarily, the identifier may be any one of a name, a number or an ID.
[0167] In some embodiments, the above process of sending a system upgrade request to the server may be executed by a system upgrade module, and the corresponding process may be: the terminal uses the system upgrade module to send a system upgrade request to the server.
[0168] In the above S404 to S405, when the terminal monitors the access of the terminal to the network based on the network monitoring service, the terminal sends the system upgrade request to the server to request the installation package required for the application to perform the system upgrade. It should be noted that the above S401 to S405 illustrate the scheme by taking the process of closing the application and ending the system upgrade related process after registering the network monitoring service, and then, when monitoring the access of the terminal to the network, executing the process of starting the application and the system upgrade related process as an example. It should be noted that in the case where the terminal does not execute the process of closing the application and ending the system upgrade related process in S402, there is no need to execute the process of starting the application and the system upgrade related process in S404.
[0169] In some embodiments, when the network monitoring service monitors the terminal accessing the network, the terminal can be triggered to send a system upgrade request to the server by triggering the application to reach a preset upgrade cycle, or triggering the application to reach a preset upgrade time.
[0170] Accordingly, in some embodiments, taking triggering an application to reach a preset upgrade cycle as an example, when the terminal monitors access to the network based on the network monitoring service, the terminal resets the preset upgrade cycle, and in response to the application reaching the reset preset upgrade cycle, the terminal sends a system upgrade request to the server.
[0171] Among them, resetting the preset upgrade cycle is to reset the preset upgrade cycle. For example, the preset upgrade cycle is reset to a polling cycle with 1 second (or millisecond) as a cycle, or a polling cycle of 1 second, 5 seconds, or 10 seconds. It should be understood that by resetting the preset upgrade cycle to a polling cycle in seconds (or milliseconds), the effect of quickly triggering a system upgrade can be achieved.
[0172] Exemplarily, when the terminal monitors the access of the terminal to the network based on the network monitoring service, the terminal starts the application and starts the process for system upgrade in the application. When the application is started and the process for system upgrade in the application is started, the preset upgrade period is reset, and in response to the application reaching the reset preset upgrade period, the system upgrade request is sent to the server.
[0173] Alternatively, in other embodiments, taking the example of triggering an application to reach a preset upgrade time, the terminal resets the preset upgrade time when the network monitoring service monitors that the terminal is accessing the network, and in response to the application reaching the reset preset upgrade time, sends the system upgrade request to the server.
[0174] Among them, resetting the preset upgrade time is to reset the preset upgrade time. For example, the preset upgrade time is reset to the time point corresponding to the next second (or millisecond). It should be understood that by resetting the preset upgrade cycle to the time point corresponding to the next second, the effect of quickly triggering the system upgrade can also be achieved.
[0175] Exemplarily, when the terminal monitors the access of the terminal to the network based on the network monitoring service, the terminal starts the application and starts the process for system upgrade in the application. When the application is started and the process for system upgrade in the application is started, the preset upgrade time is reset, and in response to the application reaching the reset preset upgrade time, the system upgrade request is sent to the server.
[0176] The above embodiment takes the example of indirectly triggering the terminal to send a system upgrade request to the server by triggering the application to reach a preset upgrade cycle, or triggering the application to reach a preset upgrade time, to illustrate the solution. Two ways of triggering the terminal to send a system upgrade request to the server are provided. Among them, by triggering the preset upgrade cycle or triggering the preset upgrade time, the automatic triggering of the system upgrade request can be achieved, thereby improving the flexibility of the system upgrade. It should be noted that in other embodiments, when the terminal monitors the terminal accessing the network based on the network monitoring service, it can also directly trigger the terminal to send the system upgrade request to the server.
[0177] S406: The server receives a system upgrade request from the terminal, obtains an installation package required by the application for system upgrade, and returns the obtained installation package to the terminal.
[0178] In some embodiments, after receiving a system upgrade request from a terminal, the server searches the system upgrade library according to the identifier of the function to be upgraded carried in the system upgrade request to determine whether there is an installation package corresponding to the identifier in the system upgrade library. If there is an installation package corresponding to the identifier in the system upgrade library, the installation package corresponding to the identifier is obtained and the obtained installation package is returned to the terminal.
[0179] The system upgrade library is used to store the identifiers of different functions in the terminal system and the corresponding installation packages.
[0180] Furthermore, in some embodiments, the system upgrade library is also used to store the download addresses of the installation packages corresponding to different functions in the terminal system. Accordingly, the process of returning the installation package can be: if the system upgrade library has the download address of the installation package corresponding to the identifier, the server can obtain the download address of the installation package and return the obtained download address to the terminal, so that the terminal can download the installation package based on the download address, thereby completing the system upgrade.
[0181] The above embodiment takes the installation package corresponding to the identifier of the function to be upgraded in the system upgrade library as an example to illustrate the solution. In other embodiments, if the installation package corresponding to the identifier does not exist in the system upgrade library, the server can return a prompt message to the terminal indicating that the installation package does not exist.
[0182] S407: The terminal receives the installation package returned by the server based on the system upgrade request.
[0183] In some embodiments, taking the example of the server returning the download address of the installation package to the terminal, the terminal receives the download address of the installation package returned by the server based on the system upgrade request, and downloads the installation package based on the download address, thereby completing the system upgrade.
[0184] S408: The terminal performs a system upgrade based on the installation package.
[0185] In some embodiments, the above system upgrade process may be executed by a system upgrade module, and the corresponding process may be: the terminal utilizes the system upgrade module to perform a system upgrade on the terminal based on the installation package.
[0186] In some embodiments, after the terminal receives the installation package returned by the server based on the system upgrade request, the terminal displays a download inquiry interface of the installation package on the screen of the terminal. The terminal receives a trigger operation of the download control in the download inquiry interface by the user, and downloads the installation package in response to the trigger operation of the download control. After the installation package is downloaded, the installation inquiry interface of the installation package can be displayed on the screen of the terminal. The terminal receives a trigger operation of the immediate installation control in the installation inquiry interface by the user, and installs the installation package in response to the trigger operation of the immediate installation control, thereby completing the system upgrade of the terminal.
[0187] The technical solution provided by the embodiment of the present application is to register a network monitoring service when the application running on the terminal triggers a system upgrade and the terminal is not connected to the network. The network monitoring service is used to timely monitor the state changes of the network to determine whether the terminal is connected to the network, so that when the terminal is connected to the network, a system upgrade request is quickly initiated to complete the system upgrade of the terminal. In this way, there is no need to randomly and frequently initiate system upgrade requests within a close period of time, which can effectively avoid the waste of terminal request resources.
[0188] For example, Figure 5 is an interactive flow chart of a system upgrade shown in an embodiment of the present application. Figure 5 Taking the interaction between the system upgrade module, system service module, network module and server set in the terminal as an example, the system upgrade method includes the following S501 to S510.
[0189] S501: A system upgrade module calls a system service module in response to an application program running on a terminal triggering a system upgrade and the terminal is not connected to a network.
[0190] S502: The system service module registers a network monitoring service.
[0191] S503: The system service module closes the application and ends the process for system upgrade in the application.
[0192] S504: Monitor the state change of the network module through the network monitoring service provided by the system service module to monitor whether the terminal is connected to the network.
[0193] S505: When the network monitoring service monitors that the terminal accesses the network, notify the system upgrade module.
[0194] S506: The system upgrade module starts the application and starts a process for system upgrade in the application.
[0195] S507: When the application is started and the process for system upgrade in the application is started, a system upgrade request is sent to the server.
[0196] S508: The server receives a system upgrade request from the system upgrade module of the terminal, obtains an installation package required for the application to perform system upgrade, and returns the obtained installation package to the system upgrade module of the terminal.
[0197] S509: The system upgrade module receives the installation package returned by the server based on the system upgrade request.
[0198] S510: The system upgrade module performs system upgrade on the terminal based on the installation package.
[0199] In the above embodiment, the process of system upgrade is described based on the interaction between the system upgrade module, the system service module, the network module and the server as an example. Among them, when the application running on the terminal triggers the system upgrade and the terminal is not connected to the network, the network status change is timely monitored through the network monitoring service to determine whether the terminal is connected to the network, so that when the terminal is connected to the network, a system upgrade request is quickly initiated to complete the system upgrade of the terminal. In this way, there is no need to randomly and frequently initiate system upgrade requests within a certain period of time, which can effectively avoid the waste of terminal request resources. In addition, after registering the network monitoring service, by closing the application and ending the system upgrade-related process in the application, the number of applications in the running state in the application background can be reduced, that is, the application background resident ratio is effectively reduced. Furthermore, when the terminal is monitored to be connected to the network, the application is started and the system upgrade-related process in the application is started so that the system upgrade for the application is subsequently performed, thereby ensuring the smooth progress of the system upgrade.
[0200] For example, Figure 6 is a comparison diagram of a system upgrade packet search process shown in an embodiment of the present application. Figure 6 , Figure 6 (a) in the figure refers to the packet search flowchart of system upgrade in the related art. Figure 6 (b) refers to the packet search flow chart for system upgrade in the embodiment of the present application.
[0201] See also Figure 6(a) in the packet search process of system upgrade in the related technology, when the application triggers the packet search cycle (that is, the preset upgrade cycle), it will determine whether the current network of the terminal is available. If the current network of the terminal is available (that is, the terminal is connected to the network), the packet search logic will be executed. If the current network of the terminal is not available (that is, the terminal is not connected to the network), the packet search will be performed randomly and frequently within the next hour, and the application will be blocked from committing suicide. In this way, the terminal needs to frequently initiate system upgrade requests, resulting in a waste of terminal request resources, and blocking the application from committing suicide, resulting in a relatively high background residence of the application, which increases the power consumption of the terminal.
[0202] See also Figure 6 In (b), in the packet search process of system upgrade in the embodiment of the present application, when the application triggers the packet search cycle, it will be determined whether the current network of the terminal is available. If the current network of the terminal is not available, register the network monitoring service, close the application, and end the process for system upgrade in the application (that is, the application commits suicide). Furthermore, after the network is monitored based on the network monitoring service, start the application and the process for system upgrade in the application, and start executing the packet search logic for system upgrade. It can be seen that the technical solution provided by the embodiment of the present application does not require the terminal to frequently initiate system upgrade requests, thereby avoiding the waste of terminal request resources, and application suicide will not increase the application background resident ratio, thereby reducing the terminal power consumption.
[0203] Above Figure 6 Taking the scenario of the packet search period (i.e., the preset upgrade period) as an example, the packet search process for system upgrade in the related technology and the embodiment of the present application is described. Figure 7 It is a packet search comparison diagram of a system upgrade shown in an embodiment of the present application.
[0204] See also Figure 7 In the no-network packet search scenario based on the packet search cycle, the technical solution of the related technology is: if the terminal is not connected to the network when the packet search cycle is triggered, the packet search cycle within the next hour is randomly registered, and the packet is randomly and frequently searched within the next hour, and the application is blocked from committing suicide. The technical solution of the embodiment of the present application is: if the terminal is not connected to the network when the packet search cycle is triggered, the network monitoring service is registered, and the packet search process is initiated after the network is monitored. After registering the network monitoring service, the application is also closed, and the process used for system upgrade in the application is terminated.
[0205] In a non-network packet search scenario based on a packet search alarm (i.e., a preset upgrade time), the technical solution of the related technology is: if the terminal is not connected to the network when the packet search alarm is triggered, then by registering a packet search alarm within the next hour, frequently search for packets within the next hour, and block the application from committing suicide by setting a flag. Among them, the flag bit can also be called a status bit, which is used to control the process of executing application suicide. The technical solution of the embodiment of the present application is: if the terminal is not connected to the network when the packet search alarm is triggered, then register a network monitoring service, and initiate a packet search process after monitoring the network. After registering the network monitoring service, the application is also closed, and the process used for system upgrade in the application is terminated.
[0206] The technical solution provided by the embodiment of the present application is to register a network monitoring service when the application running on the terminal triggers a system upgrade and the terminal is not connected to the network. The network monitoring service is used to timely monitor the state changes of the network to determine whether the terminal is connected to the network, so that when the terminal is connected to the network, a system upgrade request is quickly initiated to complete the system upgrade of the terminal. In this way, there is no need to randomly and frequently initiate system upgrade requests within a close period of time, which can effectively avoid the waste of terminal request resources.
[0207] Figure 8 is a structural block diagram of a system upgrade device shown in an embodiment of the present application. Figure 8 , the device includes a registration module 801 and a sending module 802. Wherein:
[0208] A registration module 801 is used to register a network monitoring service in response to an application running on a terminal triggering a system upgrade and the terminal is not connected to a network; the network monitoring service is used to monitor changes in the state of the network;
[0209] The sending module 802 is used to send a system upgrade request to the server when the network monitoring service monitors that the terminal accesses the network; the system upgrade request is used to request the application to perform the installation package required for the system upgrade.
[0210] The technical solution provided by the embodiment of the present application is to register a network monitoring service when the application running on the terminal triggers a system upgrade and the terminal is not connected to the network. The network monitoring service is used to timely monitor the state changes of the network to determine whether the terminal is connected to the network, so that when the terminal is connected to the network, a system upgrade request is quickly initiated to complete the system upgrade of the terminal. In this way, there is no need to randomly and frequently initiate system upgrade requests within a close period of time, which can effectively avoid the waste of terminal request resources.
[0211] In some embodiments, the device further comprises a closing module, configured to:
[0212] Close the application and end the process in the application for system upgrade.
[0213] In some embodiments, the device further comprises a starting module, configured to:
[0214] The application is launched, and the process for system upgrade in the application is started.
[0215] In some embodiments, the shutdown module is specifically used to:
[0216] Close the application;
[0217] The process termination command is called, and according to the identifier of the process used for system upgrade in the application program, the process corresponding to the identifier is terminated.
[0218] In some embodiments, the registration module 801 is specifically used to:
[0219] In response to the application reaching a preset upgrade period and the terminal not being connected to the network, registering the network monitoring service; or,
[0220] In response to the application reaching a preset upgrade time and the terminal not being connected to a network, registering the network monitoring service.
[0221] In some embodiments, the sending module 802 is specifically configured to:
[0222] In the case where the terminal accesses the network based on the network monitoring service, the preset upgrade cycle is reset; in response to the application reaching the reset preset upgrade cycle, the system upgrade request is sent to the server; or,
[0223] In the case where the terminal accesses the network based on the monitoring service of the network, the preset upgrade time is reset; in response to the application reaching the reset preset upgrade time, the system upgrade request is sent to the server.
[0224] In some embodiments, the terminal not accessing the network means that the terminal is not accessing the mobile data network and is not accessing the wireless communication network; the terminal accessing the network means that the terminal is accessing the mobile data network or the wireless communication network.
[0225] In some embodiments, the network monitoring service is a Job Service.
[0226] Through the description of the above implementation methods, technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device (such as a terminal) is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device (such as a terminal) and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0227] It is understandable that the terminal in the embodiment of the present application includes a hardware structure and / or software module corresponding to each function in order to realize the above functions. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present application.
[0228] The embodiment of the present application further provides a terminal, including: a processor and a memory. The processor is connected to the memory, the memory is used to store program codes, and the processor executes the program codes stored in the memory, thereby implementing the system upgrade method provided in the embodiment of the present application.
[0229] The embodiment of the present application further provides a computer-readable storage medium, on which a program code is stored. When the program code is executed on a terminal, the terminal executes each function or step executed by the terminal in the above method embodiment.
[0230] The embodiment of the present application also provides a computer program product, including program code, which, when executed on a terminal, enables the terminal to execute each function or step executed by the terminal in the above method embodiment.
[0231] Among them, the terminal, computer-readable storage medium or computer program product provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0232] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices (such as terminals) and methods can be implemented in other ways. For example, the device (such as a terminal) embodiment described above is only schematic. For example, the division of the module or unit is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0233] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0234] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0235] If the integrated unit is implemented in the form of a software functional unit 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 the present application is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the method of each embodiment of the present application. The aforementioned storage medium includes: flash memory, mobile hard disk, read-only memory, random access memory, disk or optical disk and other media that can store program codes.
[0236] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A system upgrade method, It is characterized in that include: In response to an application program running on a terminal triggering a system upgrade and the terminal not being connected to a network, registering a network monitoring service, and binding the network monitoring service to the currently running application program; The network monitoring service is used to monitor the state changes of the network; close the application and end the process used for system upgrade in the application; In the case where the terminal accesses the network based on monitoring by the network monitoring service, starting the application and starting a process for system upgrade in the application; Send a system upgrade request to the server; The system upgrade request is used to request the application to perform an installation package required for system upgrade.
2. The method according to claim 1, It is characterized in that The step of closing the application and ending the process for system upgrade in the application includes: close said application; A process termination command is called to terminate the process corresponding to the identifier of the process used for system upgrade in the application program.
3. The method according to claim 1, It is characterized in that In response to an application program running on a terminal triggering a system upgrade and the terminal not being connected to a network, registering a network monitoring service includes: In response to the application reaching a preset upgrade period and the terminal not being connected to a network, registering the network monitoring service; or, In response to the application reaching a preset upgrade time and the terminal not being connected to a network, registering the network monitoring service.
4. The method according to claim 3, It is characterized in that The sending a system upgrade request to a server when the terminal accesses a network based on monitoring by the network monitoring service comprises: In the case where the terminal accesses the network based on the network monitoring service, the preset upgrade cycle is reset; in response to the application reaching the reset preset upgrade cycle, the system upgrade request is sent to the server; or, In the case where the terminal accesses the network based on monitoring by the network monitoring service, the preset upgrade time is reset; in response to the application reaching the reset preset upgrade time, the system upgrade request is sent to the server.
5. The method according to any one of claims 1 to 4, It is characterized in that The terminal not accessing the network means that the terminal is not accessing the mobile data network and the wireless communication network; the terminal accessing the network means that the terminal is accessing the mobile data network or the wireless communication network.
6. The method according to any one of claims 1 to 5, It is characterized in that The network monitoring service is JobService.
7. A terminal, It is characterized in that It comprises a memory and a processor; the memory is used to store program code; the processor is used to call the program code to execute the method according to any one of claims 1-6.
8. A computer-readable storage medium, It is characterized in that The method comprises a program code, and when the program code is executed on a terminal, the terminal executes the method according to any one of claims 1 to 6.
