CN117729561A - System upgrading method, terminal and storage medium - Google Patents

System upgrading method, terminal and storage medium Download PDF

Info

Publication number
CN117729561A
CN117729561A CN202310794545.3A CN202310794545A CN117729561A CN 117729561 A CN117729561 A CN 117729561A CN 202310794545 A CN202310794545 A CN 202310794545A CN 117729561 A CN117729561 A CN 117729561A
Authority
CN
China
Prior art keywords
terminal
network
application program
application
upgrade
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310794545.3A
Other languages
Chinese (zh)
Other versions
CN117729561B (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.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310794545.3A priority Critical patent/CN117729561B/en
Publication of CN117729561A publication Critical patent/CN117729561A/en
Application granted granted Critical
Publication of CN117729561B publication Critical patent/CN117729561B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a system upgrading method, a terminal and a storage medium, which relate to the technical field of computers and are used for avoiding waste of terminal request resources. The method comprises the following steps: responding to the triggering system upgrade of the application program running on the terminal, registering network monitoring service when the terminal is not connected to the network; and under the condition that the terminal is monitored to access the network based on the network monitoring service, a system upgrading request is sent to a server to request an installation package required by the application program for system upgrading.

Description

System upgrading method, terminal and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a system upgrade method, a terminal, and a storage medium.
Background
With the continuous development of computer technology, terminals are accompanied by more frequent system upgrades while the functions are increasingly diversified. In this way, it can be ensured that the terminal system remains in the latest version, so that the terminal maintains the best performance, thereby maintaining a good user experience.
Currently, the system upgrade method is generally: the terminal requests an installation package required for system upgrade by transmitting a system upgrade request to the server, so as to upgrade the system using the installation package.
However, in the case that the terminal is not connected to the network, the terminal may randomly and frequently initiate a system upgrade request in a period of time, resulting in waste of resources requested by the terminal.
Disclosure of Invention
The application provides a system upgrading method, a terminal and a storage medium, which are used for avoiding waste of terminal request resources.
In order to achieve the above purpose, the present application adopts the following technical scheme:
in a first aspect, a system upgrade method is provided, the method comprising:
responding to the triggering system upgrade of the application program running on the terminal, registering network monitoring service when the terminal is not connected to the network; the network monitoring service is used for monitoring the state change of the network;
under the condition that the terminal is monitored to access the network based on the network monitoring service, a system upgrading request is sent to a server; the system upgrade request is used to request an installation package required by the application program for system upgrade.
In the above technical solution, when an application running on a terminal triggers a system upgrade and the terminal is not connected to a network, a network monitoring service is registered. The state change of the network is timely monitored through the network monitoring service to judge whether the terminal is accessed to the network, so that a system upgrading request is quickly initiated under the condition that the terminal is accessed to the network, and the system upgrading of the terminal is completed. Therefore, the system upgrading request does not need to be randomly and frequently initiated in a period of time, and the waste of the terminal request resource can be effectively avoided.
In a possible implementation manner of the first aspect, after registering for the network listening service, the method further includes:
closing the application program and ending the process for upgrading the system in the application program.
In the possible implementation manner, under the condition that the terminal is not connected to the network, by closing the application program and ending the related process of system upgrade in the application program, the number of applications in an operation state in the application background can be reduced, namely the residence ratio of the application background is effectively reduced. The application background residence ratio refers to the ratio between the number of applications in the running state and the total number of applications in the application background.
In another possible implementation manner of the first aspect, in a case that the terminal accesses the network based on the network listening service, the method further includes:
and starting the application program and starting a process for system upgrading in the application program.
In this possible implementation manner, in the case that the terminal is not connected to the network, the number of applications in the application background in a running state is reduced by closing the application program and ending the relevant process of system upgrade in the application program. And further, under the condition that the terminal is monitored to be connected to the network, starting an application program and starting a related process of system upgrade in the application program so as to execute the system upgrade aiming at the terminal by using the application program later, thereby ensuring the smooth progress of the system upgrade.
In another possible implementation manner of the first aspect, closing the application program and ending a process for system upgrade in the application program includes:
closing the application program;
and calling a process termination command, and ending the process corresponding to the identifier according to the identifier of the process for system upgrade in the application program.
In this possible implementation manner, the process termination command is invoked, so that the process related to the system upgrade in the application program can be quickly terminated.
In another possible implementation manner of the first aspect, registering for a network listening service in response to an application running on the terminal triggering a system upgrade and the terminal not accessing the network includes:
registering the network monitoring service in response to the application reaching a preset upgrade period and the terminal not accessing the network; or alternatively, the first and second heat exchangers may be,
and registering the network monitoring service in response to the application reaching a preset upgrading time and the terminal not accessing the network.
In this possible implementation, two ways of triggering a system upgrade by an application program are provided. The automatic triggering of the system upgrade can be realized by setting a preset upgrade period or preset upgrade time, so that the flexibility of the system upgrade is improved.
In another possible implementation manner of the first aspect, in a case that the terminal accesses the network based on the network monitoring service, sending a system upgrade request to the server includes:
resetting the preset upgrading period under the condition that the terminal is monitored to access the network based on the network monitoring service; responding to the preset upgrading period after the application program reaches the reset, and sending the system upgrading request to a server; or alternatively, the first and second heat exchangers may be,
resetting the preset upgrading time under the condition that the terminal is monitored to access the network based on the network monitoring service; and sending the system upgrade request to a server in response to the preset upgrade time after the application reaches the reset.
In this possible implementation, two ways of triggering the terminal to send a system upgrade request to the server are provided. The automatic triggering of the system upgrading request can be realized by resetting the preset upgrading period or resetting the preset upgrading time, so that the flexibility of system upgrading is improved.
In another possible implementation manner of the first aspect, the terminal non-access network indicates that the terminal is not accessing the mobile data network and is not accessing the wireless communication network; the terminal access network means that the terminal accesses the mobile data network or the wireless communication network.
In this possible implementation, two types of networks are provided, enriching the types of networks that the terminal accesses.
In another possible implementation manner of the first aspect, the network listening Service is Job Service.
In this possible implementation manner, by registering the Job Service, since the Job Service provides a function of monitoring a state change of the network, it is able to monitor whether the terminal accesses the network in time, so as to respond in time when the terminal accesses the network, thereby ensuring smooth progress of system upgrade.
In a second aspect, the present application provides a terminal, including: a processor and a memory. The memory is configured to store program code and the processor is configured to invoke the program code stored in the memory to implement any of the methods provided in the first aspect.
In a third aspect, there is provided a computer readable storage medium comprising program code which, when run on a terminal, causes the terminal to perform any one of the methods provided in the first aspect.
In a fourth aspect, there is provided a computer program product comprising program code which, when run on a terminal, causes the terminal to perform any one of the methods provided in the first aspect.
It should be noted that, the technical effects caused by any implementation manner of the second aspect to the fourth aspect may refer to the technical effects caused by the corresponding implementation manner in the first aspect, which are not described herein.
Drawings
FIG. 1 is a schematic diagram of an implementation environment of a system upgrade method according to an embodiment of the present application;
fig. 2 is a schematic hardware structure of a terminal according to an embodiment of the present application;
fig. 3 is a schematic software structure of a terminal according to an embodiment of the present application;
fig. 4 is a flow chart of a system upgrade method according to an embodiment of the present application;
FIG. 5 is an interactive flow diagram of a system upgrade shown in an embodiment of the present application;
FIG. 6 is a packet searching flow chart for a system upgrade shown in an embodiment of the present application;
FIG. 7 is a comparative diagram of a search package for a system upgrade shown in an embodiment of the present application;
fig. 8 is a block diagram illustrating a system upgrade apparatus according to an embodiment of the present application.
Detailed Description
In the description of the present application, "/" means "or" unless otherwise indicated, for example, a/B may mean a or B. "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. Furthermore, "at least one" means one or more, and "a plurality" means two or more. The terms "first," "second," and the like do not limit the number and order of execution, and the terms "first," "second," and the like do not necessarily differ.
It should be noted that, in the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
The system upgrading method provided by the embodiment of the application can be applied to the technical field of terminals, and particularly can be applied to a system upgrading scene of the terminal.
In the embodiment of the application, the system upgrade may be to upgrade an existing function in the terminal, or may be to add a new function to the terminal through software update. Generally, in a system upgrade scenario of a terminal, a package searching technology is adopted to obtain an installation package required for system upgrade.
In the related art, the system upgrade method is generally as follows: the terminal requests an installation package required for system upgrade by transmitting a system upgrade request to the server, so as to upgrade the system using the installation package. It should be understood that the above-mentioned terminal sends a system upgrade request to the server to request an installation package required for system upgrade, that is, a package searching process.
However, in the case where the terminal does not access the network, the terminal may initiate a system upgrade request randomly and frequently in an adjacent period of time. For example, the terminal may initiate system upgrade requests randomly and frequently within an hour of the approach, i.e., randomly and frequently search for packets. Thus, the waste of the terminal request resource is caused.
In view of this, the embodiment of the present application provides a system upgrade method, where a network monitoring service is registered in a case where an application running on a terminal triggers a system upgrade and the terminal is not connected to a network. The state change of the network is timely monitored through the network monitoring service to judge whether the terminal is accessed to the network, so that a system upgrading request is quickly initiated under the condition that the terminal is accessed to the network, and the system upgrading of the terminal is completed. Therefore, the system upgrading request does not need to be randomly and frequently initiated in a period of time, and the waste of the terminal request resource can be effectively avoided.
Fig. 1 is a schematic diagram of an implementation environment of a system upgrade method according to an embodiment of the present application. Referring to fig. 1, an implementation environment of a system upgrade method includes a terminal 100 and a server 101.
The terminal 100 may be at least one of a smart phone, a smart watch, a desktop computer, a portable computer, a virtual reality terminal, an augmented reality terminal, a wireless terminal, and a laptop portable computer.
In the embodiment of the present application, the terminal 100 is provided with a system upgrade function. In some embodiments, an Application (APP) providing a system upgrade function may be installed in the terminal 100, through which a system upgrade of the terminal can be implemented.
In some embodiments, the terminal 100 has a communication function, and can be communicatively connected to the server 101 through a wired network or a wireless network. In the embodiment of the present application, the terminal 100 is configured to register a network monitoring service in response to an application running on the terminal 100 triggering a system upgrade and the terminal 100 not accessing a network; in the case where the terminal 100 is monitored to access the network based on the network monitoring service, a system upgrade request is transmitted to the server 101.
The server 101 is configured to provide a background service for the terminal 100. The server 101 may be an independent physical server, or a server cluster or a distributed file system formed by a plurality of physical servers, or at least one of cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content distribution networks, and big data or artificial intelligence platforms, which are not limited in this embodiment of the present application.
In the embodiment of the present application, the server 101 is configured to receive a system upgrade request from the terminal 100; the installation package required for the application program to perform the system upgrade is acquired, and the acquired installation package is returned to the terminal 100.
For example, referring to fig. 1, after transmitting a system upgrade request to the server 101, the terminal 100 receives an installation package returned by the server 101 based on the system upgrade request. Further, a download inquiry interface of the installation package is displayed in the screen of the terminal 100, and includes related information (such as version number, size or details, etc.) of the installation package, a download control later, and a download control. The terminal 100 receives a trigger operation of the download control by a user, and downloads the installation package in response to the trigger operation of the download control. After the installation package download is completed, an installation inquiry interface of the installation package including relevant information of the installation package and an immediate installation control may be displayed in a screen of the terminal 100. The terminal 100 receives a trigger operation of the immediate installation control by a user, and installs the installation package in response to the trigger operation of the immediate installation control, thereby completing system upgrade of the terminal.
Exemplary, a schematic structure of the terminal 100 in fig. 1 is shown in fig. 2. Fig. 2 is a schematic hardware structure of a terminal according to an embodiment of the present application.
Referring to fig. 2, the terminal 100 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (universal serial bus, USB) interface 230, a charge 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, keys 290, a motor 291, an indicator 292, a camera 293, a display 294, a subscriber identity module (subscriber identification module, SIM) card interface 295, and the like. The sensor module 280 may include a pressure sensor 280A, a gyro sensor 280B, a barometric sensor 280C, a touch sensor 280D, and the like.
It should be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the terminal 100. In other embodiments of the present application, terminal 100 may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 210 may include one or more processing units such as, for example: the processor 210 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and a command center of the terminal 100, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 210 for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may hold instructions or data that the processor 210 has just used or recycled. If the processor 210 needs to reuse the instruction or data, it may be called directly from the memory. Repeated accesses are avoided and the latency of the processor 210 is reduced, thereby improving the efficiency of the system.
In some embodiments, processor 210 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, the processor 210 may contain multiple sets of I2C buses.
The I2S interface may be used for audio communication. In some embodiments, the processor 210 may contain multiple sets of I2S buses.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
The MIPI interface may be used to connect the processor 210 to peripheral devices such as the display 294, the camera 293, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like. In some embodiments, processor 210 and display 294 communicate via a DSI interface to implement display functionality of terminal 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
The USB interface 230 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and does not limit the structure of the terminal 100. In other embodiments of the present application, the terminal 100 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The charge management module 240 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 240 may receive a charging input of a wired charger through the USB interface 230. In some wireless charging embodiments, the charge management module 240 may receive wireless charging input through a wireless charging coil of the terminal 100.
The wireless communication function of the terminal 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in terminal 100 may be configured to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 250 may provide a solution including 2G/3G/4G/5G wireless communication applied to the terminal 100. The mobile communication module 250 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 250 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 250 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 250 may be disposed in the processor 210. In some embodiments, at least some of the functional modules of the mobile communication module 250 may be provided in the same device as at least some of the modules of the processor 210.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating 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. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 270A, receiver 270B, etc.), or displays images or video through display screen 294. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 250 or other functional module, independent of the processor 210.
The wireless communication module 260 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (blue 2, BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., applied on the terminal 100. The wireless communication module 260 may be one or more devices that integrate at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 210. The wireless communication module 260 may also receive a signal to be transmitted from the processor 210, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 250 of terminal 100 are coupled, and antenna 2 and wireless communication module 260 are coupled, so that terminal 100 may communicate with a network and other devices through wireless communication techniques. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a Quasi Zenith Satellite System (QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
Terminal 100 implements display functions via a GPU, display screen 294, and application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 210 may include one or more GPUs that execute program instructions to generate or change display information.
The display 294 is used to display images, videos, and the like. The display 294 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, terminal 100 may include 1 or N displays 294, N being a positive integer greater than 1.
The terminal 100 may implement a photographing function through an ISP, a camera 293, a video codec, a GPU, a display 294, an application processor, and the like.
The ISP is used to process the data fed back by the camera 293. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 293.
The camera 293 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred 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 the like format. In some embodiments, terminal 100 may include 1 or N cameras 293, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the terminal 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, etc.
Video codecs are used to compress or decompress digital video. The terminal 100 may support one or more video codecs.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent cognition of the terminal 100 can be implemented by the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The external memory interface 220 may be used to connect an external memory card, such as a Micro SD card, to realize the memory capability of the extension terminal 100. The external memory card communicates with the processor 210 through an external memory interface 220 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 221 may be used to store computer executable program code that includes instructions. The processor 210 executes various functional applications of the terminal 100 and data processing by executing instructions stored in the internal memory 221. The internal memory 221 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data (e.g., audio data, phonebook, etc.) created during use of the terminal 100, and the like. In addition, the internal memory 221 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The terminal 100 may implement audio functions through an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 270 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 270 may also be used to encode and decode audio signals. In some embodiments, the audio module 270 may be disposed in the processor 210, or some functional modules of the audio module 270 may be disposed in the processor 210.
Speaker 270A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The terminal 100 can listen to music through the speaker 270A or listen to hands-free calls.
A receiver 270B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When terminal 100 is answering a telephone call or voice message, voice can be received by placing receiver 270B close to the human ear.
Microphone 270C, also referred to as a "microphone" or "microphone," is used to convert sound signals into electrical signals.
The earphone interface 270D is for connecting a wired earphone. Earphone interface 270D may be USB interface 230 or a 3.5mm open mobile terminal platform (open mobile terminal platform, OMTP) standard interface, american cellular telecommunications industry association (cellular telecommunications industry association of e usa, ctia) standard interface.
The pressure sensor 280A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, pressure sensor 280A may be disposed on display 294. The pressure sensor 280A is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. When a force is applied to the pressure sensor 280A, the capacitance between the electrodes changes. The terminal 100 determines the strength of the pressure according to the change of the capacitance. When a touch operation is applied to the display 294, the terminal 100 detects the intensity of the touch operation according to the pressure sensor 280A. The terminal 100 may also calculate the location of the touch based on the detection signal of the pressure sensor 280A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example: and executing an instruction for checking the short message when the touch operation with the touch operation intensity smaller than the first pressure threshold acts on the short message application icon. And executing an instruction for newly creating the short message when the touch operation with the touch operation intensity being greater than or equal to the first pressure threshold acts on the short message application icon.
The gyro sensor 280B may be used to determine a motion gesture of the terminal 100. In some embodiments, the angular velocity of terminal 100 about three axes (i.e., x, y, and z axes) may be determined by gyro sensor 280B. The gyro sensor 280B may be used for photographing anti-shake. Illustratively, when the shutter is pressed, the gyro sensor 280B detects the shake angle of the terminal 100, calculates the distance to be compensated by the lens module according to the angle, and allows the lens to counteract the shake of the terminal 100 by the reverse motion, thereby realizing anti-shake. The gyro sensor 280B may also be used for navigating, somatosensory game scenes.
The air pressure sensor 280C is used to measure air pressure. In some embodiments, the terminal 100 calculates altitude from barometric pressure values measured by the barometric pressure sensor 280C, aiding in positioning and navigation.
The touch sensor 280D is also referred to as a "touch panel". The touch sensor 280D may be disposed on the display screen 294, and the touch sensor 280D and the display screen 294 form a touch screen, which is also referred to as a "touch screen". The touch sensor 280D is used to detect a touch operation acting on or near it. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 294. In other embodiments, the touch sensor 280D may also be disposed on a surface of the terminal 100 at a different location than the display 294.
Keys 290 include a power on key, a volume key, etc. The keys 290 may be mechanical keys. Or may be a touch key. The terminal 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the terminal 100.
The motor 291 may generate a vibration alert. The motor 291 may be used for incoming call vibration alerting or for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 291 may also correspond to different vibration feedback effects by touch operations applied to different areas of the display 294. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 292 may be an indicator light, which may be used to indicate a state of charge, a change in power, a message indicating a missed call, a notification, etc.
The SIM card interface 295 is for interfacing with a SIM card. The SIM card may be contacted and separated from the terminal 100 by being inserted into the SIM card interface 295 or by being withdrawn from the SIM card interface 295. The terminal 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1.
It should be noted that the structure shown in fig. 2 does not constitute a limitation of the terminal, and the terminal may include more or less components than those shown in fig. 2, or may combine some components, or may have a different arrangement of components.
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. In the embodiment of the application, an Android system with a layered architecture is taken as an example, and a software structure of a terminal is illustrated. Fig. 3 is a schematic software structure of a terminal according to an embodiment of the present application.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run) and system libraries, and a kernel layer, respectively.
The application layer may include a series of application packages.
As shown in fig. 3, the application package may include applications for cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, etc.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in fig. 3, 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.
The system service module is used for providing network monitoring service. In the embodiment of the application, the network monitoring service can be registered through the system service module.
The network module is used for feeding back the network state. In the embodiment of the application, the real-time monitoring of the state change of the terminal network can be realized through the interaction between the network monitoring service provided by the system service module and the network module.
The system upgrading module is used for triggering and executing the package searching logic of the system upgrading. In the embodiment of the application, a system upgrading request is sent to a server through a system upgrading module to request to acquire an installation package required by an application program for system upgrading.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is used to provide the communication functions of the terminal. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the terminal vibrates, and an indicator light blinks.
Android run time includes a core library and virtual machines. Android run time is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
Fig. 4 is a flow chart of a system upgrade method according to an embodiment of the present application. Referring to fig. 4, the method includes the following S401 to S408:
s401, the terminal responds to an application program running on the terminal to trigger system upgrade, the terminal is not accessed to a network, and network monitoring service is registered.
The terminal can be provided with an application program for providing a system upgrading function, and the system upgrading of the terminal can be realized through the application program.
The network monitoring service is used for monitoring the state change of the network. In some embodiments, the network listening Service is Job Service. Therefore, by registering Job Service, the Job Service is provided with the function of monitoring the state change of the network, so that whether the terminal is accessed to the network or not can be monitored in time, and a response can be timely made when the terminal is accessed to the network, thereby ensuring the smooth progress of system upgrading.
In some embodiments, the terminal is provided with a system service module for providing a network listening service. Accordingly, the process of registering the network listening service may be: an application running on the terminal (i.e., an application client) sends a listening service request to the system service module, the listening service request being for requesting registration of a network listening service. The system service module registers the network listening service in response to the listening service request so as to subsequently perform a process of network listening using the registered network listening service.
For example, the system Service module may be provided with a Job Scheduler task Scheduler, and accordingly, the system Service module may create a network listening Service (such as Job Service) through the Job Scheduler task Scheduler, and bind the created network listening Service with a currently running application program, so as to trigger a process of system upgrade in time in a case that a terminal accesses the network is monitored.
The above embodiment describes a scheme taking a service provided by a system service module in which a network monitoring service is a terminal as an example. In other embodiments, the network listening service may also be a background service provided by the server.
Therefore, by registering the network monitoring service, the state change of the network can be monitored in time under the condition that the terminal is not connected to the network so as to judge whether the terminal is connected to the network or not, and the process of system upgrading can be rapidly executed under the condition that the terminal is connected to the network.
In this embodiment, the manner in which the application program triggers the system upgrade may be at least one of the application program reaching a preset upgrade period or the application program reaching a preset upgrade time.
The preset upgrade period is a preset polling period, such as a polling period in seconds, minutes, hours or years, months, weeks, and days. In some embodiments, the preset upgrade period may be a uniform polling period. For example, taking an even polling period in hours as an example, the preset upgrade period may be one hour as a period, that is, the system upgrade is triggered once every one hour. In other embodiments, the preset upgrade period may also be a non-uniform polling period. For example, taking a non-uniform polling period in units of minutes as an example, the preset upgrade period may be a polling period of 10 minutes, 20 minutes, or 30 minutes, that is, a system upgrade is triggered at intervals of 10 minutes, a system upgrade is triggered at intervals of 20 minutes next, a system upgrade is triggered at intervals of 30 minutes next, and the subsequent triggering process is continuously performed according to the non-uniform polling period. The setting of the preset upgrade period is not limited in the embodiment of the present application.
The preset upgrade time is a preset upgrade time point (alarm), such as a month, a day, or a minute, a second, of a year, a month, or a minute. Illustratively, a system upgrade is triggered every time 12:00:00 is reached, for example 12:00:00. It should be appreciated that the number of preset upgrade times may be one or more. The setting of the preset upgrading time is not limited in the embodiment of the present application.
Accordingly, in some embodiments, taking the manner that the application program reaches the preset upgrade period as the triggering of the system upgrade by the application program as an example, S401 may be replaced by: and the terminal registers the network monitoring service in response to the application program reaching a preset upgrading period and the terminal is not accessed to the network.
Alternatively, in other embodiments, taking the manner that the application program reaches the preset upgrade time as the application program triggering the system upgrade as an example, S401 may be replaced by: and the terminal registers the network monitoring service in response to the application program reaching the preset upgrading time and the terminal is not accessed to the network.
In the above embodiments, two ways of triggering system upgrades by an application are provided. The automatic triggering of the system upgrade can be realized by setting a preset upgrade period or preset upgrade time, so that the flexibility of the system upgrade is improved.
In some embodiments, a terminal not accessing a network means that the terminal is not accessing a mobile data network and is not accessing a wireless communication network. Referring to fig. 4, in case that the terminal is not connected to the network, a sign of the terminal not connected to the network may be displayed in the screen of the terminal at this time, such as displaying an "x" sign at a moving signal icon in the upper left corner of the screen, and displaying a "l" at a wireless icon in the upper left corner of the screen! "flag". Thus, two types of networks are provided, and the types of networks accessed by the terminal are enriched.
The mobile data network may be a fourth generation mobile communications (the 4th generation mobile communication technology,4G) network or a fifth generation mobile communications (the 5th generation mobile communication technology,5G) network or other type of mobile data network.
In some embodiments, after the application running on the terminal triggers the system upgrade, the terminal may determine whether the terminal accesses the network, if the terminal does not access the mobile data network and the terminal does not access the wireless communication network, then determine that the terminal does not access the network, and perform a process of registering for the network listening service.
Accordingly, a terminal access network means that the terminal accesses a mobile data network or a 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 a system upgrade process is performed. In the embodiment of the present application, a case that the terminal is not connected to the network is taken as an example later, and a process of upgrading the system is described.
S402, the terminal closes the application program and ends the process for system upgrading in the application program.
The process for system upgrade in the application program may be a software update process, such as ouc process.
In some embodiments, the terminal closes the application program, invokes a process termination command, and according to the identifier of the process for system upgrade in the application program, ends the process corresponding to the identifier. Thus, by calling the process termination command, the termination of the process related to the system upgrade in the application program can be realized quickly.
Wherein the process termination command is provided with a function of terminating the process of the application program. In some embodiments, the process termination command may be a kill ouc command. In general, a process termination command may also be referred to as a process suicide command. It should be understood that the above-mentioned process of closing the application program and ending the process related to the system upgrade in the application program is the process of application suicide.
The identification of the process is used to uniquely identify the process. In some embodiments, the identity of the process may be any of a process name, a process number, or a process identification symbol (identity document, ID). For example, after the process termination command, the identifier of the process related to the system upgrade in the application program may be written in the process termination command, and then, the process termination command is run, so that the process corresponding to the identifier can be terminated, thereby implementing termination of the process related to the system upgrade in the application program.
In some embodiments, the system service module provided by the terminal may also provide a process termination service. Accordingly, S402 may be replaced by: and the terminal closes the application program by utilizing the system service module and ends the relevant process of system upgrading in the application program.
In the above embodiment, when the terminal is not connected to the network, the number of applications in the running state in the application background can be reduced, that is, the application background residence ratio is effectively reduced, by closing the application program and ending the relevant process of system upgrade in the application program. The application background residence ratio refers to the ratio between the number of applications in the running state and the total number of applications in the application background. In the related art, when the terminal is not connected to the network, since the system upgrade request needs to be initiated randomly and frequently in a period of time, the application program needs to be ensured to be in an operating state, so that application suicide is blocked, and the application background residence is high. Compared with the scheme of the related technology, the technical scheme provided by the embodiment of the application can effectively avoid the problem that the application background resides higher.
The above-described steps S401 to S402 are described with respect to the procedure of executing the shutdown application and ending the system upgrade-related process after registering the network listening service. Note that S402 is an optional step. In other embodiments, after registering with the network listening service, the terminal does not need to perform the procedure of S402, and may perform S403.
S403, the terminal monitors whether the terminal accesses the network or not based on the network monitoring service.
In some embodiments, the terminal is provided with a network module for feeding back the network status. Accordingly, the process of S403 is: based on the network monitoring service, monitoring the network state of the network module set by the terminal to judge whether the terminal accesses the network.
The steps S402 to S403 are described with respect to the procedure of executing the closing of the application in S402 and ending the process related to the system upgrade in the application, and then executing the procedure of executing the monitoring whether the terminal accesses the network based on the network monitoring service in S403. It should be noted that, in still other embodiments, the terminal may first execute the process of monitoring whether the terminal accesses the network based on the network monitoring service in S403, then execute the process of closing the application in S402, and end the process of upgrading the relevant process of the system in the application. Alternatively, in other embodiments, the terminal may simultaneously perform the process of closing the application in S402 and ending the process related to the system upgrade in the application, and the process of monitoring whether the terminal accesses the network based on the network monitoring service in S403. The execution sequence of S402 and S403 is not limited in this embodiment.
S404, under the condition that the terminal is monitored to access the network based on the network monitoring service, the terminal starts the application program, and starts a process for system upgrading in the application program.
In the embodiment of the application, the terminal access network may be a terminal access mobile data network or a wireless communication network. Referring to fig. 4, in the case where the terminal accesses the network, a logo of the terminal accessing the network may be displayed in the screen of the terminal at this time, such as a moving signal icon displayed in the upper left corner of the screen or a wireless icon displayed in the upper left corner of the screen.
In some embodiments, the terminal starts the application program, calls a process pull-up command, and starts a process corresponding to an identifier of a process related to system upgrade in the application program according to the identifier.
Wherein the process pull-up command is provided with a function of starting a process of the application.
In some embodiments, the terminal is provided with a system upgrade module for triggering the package searching logic for performing the system upgrade. Accordingly, S404 may be replaced with: and the terminal starts the application program by using the system upgrading module and starts a relevant process of system upgrading in the application program.
In the above embodiment, when the terminal is not connected to the network, the number of applications in the running state in the application background is reduced by closing the application program and ending the process related to the system upgrade in the application program. And further, under the condition that the terminal is monitored to be connected to the network, starting an application program and starting a related process of system upgrade in the application program so as to execute the system upgrade aiming at the terminal by using the application program later, thereby ensuring the smooth progress of the system upgrade.
S405, the terminal sends a system upgrading request to the server under the condition that the application program is started and a process for system upgrading in the application program is started.
The system upgrade request is used for requesting an installation package required by the application program for system upgrade. In some embodiments, the system upgrade request may carry an identification of the function to be upgraded in the terminal system. Illustratively, the identification may be any of a name, number, or ID.
In some embodiments, the above process of sending a system upgrade request to a server may be performed by a system upgrade module, and the corresponding process may be: and the terminal sends a system upgrading request to the server by utilizing the system upgrading module.
And S404 to S405, the terminal sends the system upgrading request to the server to request the application program to carry out the installation package required by the system upgrading under the condition that the terminal accesses the network based on the network monitoring service. In S401 to S405, after registering the network monitoring service, the processes of closing the application and ending the process related to the system upgrade are performed, and in the case that the terminal is monitored to access the network, the processes of starting the application and the process related to the system upgrade are performed as an example, and the description is given to the scheme. Note 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, the process of starting the application and the system upgrade-related process in S404 does not need to be executed either.
In some embodiments, in the case that the terminal accesses the network based on the network monitoring service, the terminal may be triggered to send a system upgrade request to the server by triggering the application to reach a preset upgrade period or triggering the application to reach a preset upgrade time.
Accordingly, in some embodiments, taking an example of triggering the application program to reach a preset upgrade period, the terminal resets the preset upgrade period when the terminal accesses the network based on the network monitoring service, and sends the system upgrade request to the server in response to the application program reaching the preset upgrade period after being reset.
Wherein resetting the preset upgrade period is resetting the preset upgrade period. For example, the preset upgrade period is reset to a polling period of 1 second (or millisecond) to a period, or a polling period of 1 second, 5 seconds, 10 seconds. It should be appreciated that by resetting the preset upgrade period to a polling period in seconds (or milliseconds), the effect of quickly triggering a system upgrade can be achieved.
The terminal, in the case of monitoring that the terminal accesses the network based on the network monitoring service, starts the application program, and starts a process for system upgrade in the application program. And under the condition that the application program is started and a process for system upgrading in the application program is started, resetting the preset upgrading period, and sending the system upgrading request to a server in response to the preset upgrading period after the application program reaches the reset.
Or in other embodiments, taking triggering the application program to reach the preset upgrading time as an example, if the terminal monitors that the terminal accesses the network based on the network monitoring service, resetting the preset upgrading time, and sending the system upgrading request to the server in response to the preset upgrading time after the application program reaches the reset.
Wherein resetting the preset upgrade time is resetting the preset upgrade time. For example, the preset upgrade time is reset to a point of time corresponding to the next second (or millisecond). It should be understood that by resetting the preset upgrade period to the time point corresponding to the next second, the effect of quickly triggering the system upgrade can be achieved as well.
The terminal, in the case of monitoring that the terminal accesses the network based on the network monitoring service, starts the application program, and starts a process for system upgrade in the application program. And under the condition that the application program is started and a process for system upgrading in the application program is started, resetting the preset upgrading time, and sending the system upgrading request to a server in response to the preset upgrading time after the application program reaches the reset.
The embodiment described above describes a scenario in which the terminal is indirectly triggered to send a system upgrade request to the server by triggering the application to reach a preset upgrade period or triggering the application to reach a preset upgrade time. Two ways of triggering the terminal to send the system upgrade request to the server are provided. The automatic triggering of the system upgrading request can be realized by triggering a preset upgrading period or triggering a preset upgrading time, so that the flexibility of system upgrading is improved. It should be noted that, in other embodiments, the terminal may also directly trigger the terminal to send the system upgrade request to the server when the terminal monitors that the terminal accesses the network based on the network monitoring service.
S406, the server receives a system upgrade request from the terminal, acquires an installation package required by the application program for system upgrade, and returns the acquired installation package to the terminal.
In some embodiments, after receiving a system upgrade request from a terminal, the server queries a system upgrade library according to an identifier of a function to be upgraded carried by the system upgrade request, and determines whether an installation package corresponding to the identifier exists in the system upgrade library. If the installation package corresponding to the identifier exists in the system upgrading library, the installation package corresponding to the identifier is obtained, and the obtained installation package is returned to the terminal.
The system upgrade library is used for storing identifiers of different functions in the terminal system and corresponding installation packages.
Further, in some embodiments, the system upgrade library is further configured to store download addresses of the installation packages corresponding to different functions in the terminal system. Accordingly, the process of returning the installation package may be: if the download address of the installation package corresponding to the identifier exists in the system upgrade library, the server can acquire the download address of the installation package, and return the acquired download address to the terminal so that the terminal can download the installation package based on the download address, thereby completing the system upgrade.
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, and describes the scheme. In other embodiments, if the installation package corresponding to the identifier does not exist in the system upgrade library, the server may return a prompt message that the installation package does not exist to the terminal.
S407, the terminal receives an installation package returned by the server based on the system upgrading request.
In some embodiments, taking the example of the download address of the installation package returned by the server 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.
S408, the terminal performs system upgrade on the terminal based on the installation package.
In some embodiments, the above-mentioned process of system upgrade may be performed by a system upgrade module, and the corresponding process may be: and the terminal utilizes a system upgrading module to upgrade the system of the terminal based on the installation package.
In some embodiments, after the terminal receives the installation package returned by the server based on the system upgrade request, a download inquiry interface of the installation package is displayed in a screen of the terminal. And the terminal receives the triggering operation of the user on the downloading control in the downloading inquiry interface, and downloads the installation package in response to the triggering operation on the downloading control. After the installation package download is completed, an installation inquiry interface of the installation package may be displayed in a screen of the terminal. And the terminal receives the triggering operation of the user on the immediate installation control in the installation inquiry interface, and the installation package is installed in response to the triggering operation of the immediate installation control, so that the system upgrading of the terminal is completed.
According to the technical scheme provided by the embodiment of the application, the network monitoring service is registered under the condition that the application program running on the terminal triggers the system upgrade and the terminal is not accessed to the network. The state change of the network is timely monitored through the network monitoring service to judge whether the terminal is accessed to the network, so that a system upgrading request is quickly initiated under the condition that the terminal is accessed to the network, and the system upgrading of the terminal is completed. Therefore, the system upgrading request does not need to be randomly and frequently initiated in a period of time, and the waste of the terminal request resource can be effectively avoided.
By way of example, FIG. 5 is an interactive flow diagram illustrating a system upgrade in accordance with an embodiment of the present application. Referring to fig. 5, taking an example of interactions among a system upgrade module, a system service module, a network module, and a server, which are provided by a terminal, the system upgrade method includes the following S501 to S510.
S501, the system upgrading module responds to an application program running on the terminal to trigger system upgrading, and the terminal is not connected to a network, and invokes the system service module.
S502, the system service module registers the network monitoring service.
S503, the system service module closes the application program and ends the process for system upgrading in the application program.
S504, monitoring the state change of the network module through the network monitoring service provided by the system service module so as to monitor whether the terminal accesses the network.
S505, notifying the system upgrade module under the condition that the terminal is monitored to access the network based on the network monitoring service.
S506, the system upgrading module starts the application program and starts a process for system upgrading in the application program.
S507, under the condition that the application program is started and a process for system upgrading in the application program is started, a system upgrading request is sent to a server.
S508, the server receives the system upgrade request from the system upgrade module of the terminal, acquires the installation package required by the application program for system upgrade, and returns the acquired installation package to the system upgrade module of the terminal.
S509, the system upgrading module receives an installation package returned by the server based on the system upgrading request.
S510, the system upgrading module upgrades the system of the terminal based on the installation package.
In the above embodiment, the process of system upgrade is described based on the interaction among the system upgrade module, the system service module, the network module, and the server as an example. Under the condition that an application program running on the terminal triggers system upgrading and the terminal is not connected to the network, the state change of the network is timely monitored through the network monitoring service to judge whether the terminal is connected to the network, so that a system upgrading request is quickly initiated under the condition that the terminal is connected to the network, and the system upgrading of the terminal is completed. Therefore, the system upgrading request does not need to be randomly and frequently initiated in a period of time, and the waste of the terminal request resource can be effectively avoided. After registering the network monitoring service, the number of the applications in the running state in the application background can be reduced, namely the residence ratio of the application background is effectively reduced by closing the application program and ending the related process of the system upgrade in the application program. And further, under the condition that the terminal is monitored to be accessed to the network, starting the application program and starting a related process of system upgrade in the application program so as to execute the system upgrade for the application program subsequently, thereby ensuring the smooth progress of the system upgrade.
Illustratively, fig. 6 is a packet searching flow chart for a system upgrade according to an embodiment of the present application. Referring to fig. 6, fig. 6 (a) is a packet searching flow chart of a system upgrade in the related art, and fig. 6 (b) is a packet searching flow chart of a system upgrade in the embodiment of the present application.
Referring to fig. 6 (a), in the packet searching process of the system upgrade in the related art, when an application program triggers a packet searching period (i.e., a preset upgrade period), it is determined whether the current network of the terminal is available. If the current network of the terminal is available (i.e., the terminal accesses the network), then the search logic is started. If the current network of the terminal is not available (i.e., the terminal is not connected to the network), the packets are randomly and frequently searched in an adjacent hour, and the application suicide is blocked. Therefore, the terminal needs to frequently initiate the system upgrading request, so that the resource waste of the terminal request is caused, the application suicide is blocked, the application background residence is higher, and the power consumption of the terminal is increased.
Referring to fig. 6 (b), in the packet searching process of the system upgrade in the embodiment of the present application, when the application program triggers a packet searching period, it is determined whether the current network of the terminal is available. If the current network of the terminal is not available, registering the network monitoring service, closing the application program, and ending the process (namely application suicide) for system upgrade in the application program. And further, after the network is monitored based on the network monitoring service, starting the application program and a process for system upgrading in the application program, and starting to execute the packet searching logic of the system upgrading. Therefore, according to the technical scheme provided by the embodiment of the application, the terminal does not need to frequently initiate the system upgrading request, the waste of the terminal for requesting resources is avoided, the application suicide is realized, the application background residence ratio is not increased, and the power consumption of the terminal is reduced.
The above-mentioned scenario of the packet searching period (i.e. the preset upgrade period) is taken as an example in fig. 6, and description is made on the packet searching process related to the system upgrade in the related art and the embodiment of the present application. Illustratively, fig. 7 is a search packet comparison diagram of a system upgrade according to an embodiment of the present application.
Referring to fig. 7, in a network-free packet searching scenario based on a packet searching period, the technical scheme of the related art is as follows: when the packet searching period is triggered, if the terminal is not accessed to the network, the packet searching period in the adjacent one hour is randomly registered, the packets are randomly and frequently searched in the adjacent one hour, and the application suicide is blocked. The technical scheme of the embodiment of the application is as follows: when the packet searching period is triggered, if the terminal is not accessed to the network, registering the network monitoring service, initiating the packet searching process after monitoring the network, closing the application program after registering the network monitoring service, and ending the process for system upgrading in the application program.
In a network-free packet searching scene based on a packet searching alarm clock (namely preset upgrading time), the technical scheme of the related technology is as follows: when the packet searching alarm clock is triggered, if the terminal is not connected to the network, the packet searching alarm clock in the adjacent one hour is registered, the packets are frequently searched in the adjacent one hour, and the application suicide is blocked by setting the flag bit. Wherein the flag bit may also be referred to as a status bit for controlling the process of executing application suicide. The technical scheme of the embodiment of the application is as follows: when triggering the packet searching alarm clock, if the terminal is not connected to the network, registering the network monitoring service, initiating the packet searching process after monitoring the network, closing the application program after registering the network monitoring service, and ending the process for upgrading the system in the application program.
According to the technical scheme provided by the embodiment of the application, the network monitoring service is registered under the condition that the application program running on the terminal triggers the system upgrade and the terminal is not accessed to the network. The state change of the network is timely monitored through the network monitoring service to judge whether the terminal is accessed to the network, so that a system upgrading request is quickly initiated under the condition that the terminal is accessed to the network, and the system upgrading of the terminal is completed. Therefore, the system upgrading request does not need to be randomly and frequently initiated in a period of time, and the waste of the terminal request resource can be effectively avoided.
Fig. 8 is a block diagram illustrating a system upgrade apparatus according to an embodiment of the present application. Referring to fig. 8, the apparatus includes a registration module 801 and a transmission module 802. Wherein:
a registration module 801, configured to register a network monitoring service in response to an application running on the terminal triggering a system upgrade and the terminal not accessing the network; the network monitoring service is used for monitoring the state change of the network;
a sending module 802, configured to send a system upgrade request to a server when the terminal accesses the network based on the network monitoring service; the system upgrade request is used to request an installation package required by the application program for system upgrade.
According to the technical scheme provided by the embodiment of the application, the network monitoring service is registered under the condition that the application program running on the terminal triggers the system upgrade and the terminal is not accessed to the network. The state change of the network is timely monitored through the network monitoring service to judge whether the terminal is accessed to the network, so that a system upgrading request is quickly initiated under the condition that the terminal is accessed to the network, and the system upgrading of the terminal is completed. Therefore, the system upgrading request does not need to be randomly and frequently initiated in a period of time, and the waste of the terminal request resource can be effectively avoided.
In some embodiments, the apparatus further comprises a shutdown module for:
closing the application program and ending the process for upgrading the system in the application program.
In some embodiments, the apparatus further comprises a startup module for:
and starting the application program and starting a process for system upgrading in the application program.
In some embodiments, the shutdown module is specifically configured to:
closing the application program;
and calling a process termination command, and ending the process corresponding to the identifier according to the identifier of the process for system upgrade in the application program.
In some embodiments, the registration module 801 is specifically configured to:
Registering the network monitoring service in response to the application reaching a preset upgrade period and the terminal not accessing the network; or alternatively, the first and second heat exchangers may be,
and registering the network monitoring service in response to the application reaching a preset upgrading time and the terminal not accessing the network.
In some embodiments, the sending module 802 is specifically configured to:
resetting the preset upgrading period under the condition that the terminal is monitored to access the network based on the network monitoring service; responding to the preset upgrading period after the application program reaches the reset, and sending the system upgrading request to a server; or alternatively, the first and second heat exchangers may be,
resetting the preset upgrading time under the condition that the terminal is monitored to access the network based on the network monitoring service; and sending the system upgrade request to a server in response to the preset upgrade time after the application reaches the reset.
In some embodiments, the terminal non-access network means that the terminal is not accessing the mobile data network and is not accessing the wireless communication network; the terminal access network means that the terminal accesses the mobile data network or the wireless communication network.
In some embodiments, the network listening Service is Job Service.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e., the internal structure of the device (such as a terminal) is divided into different functional modules, so as to perform all or part of the functions described above. The specific working processes of the above-described system, device (such as terminal) and unit may refer to the corresponding processes in the foregoing method embodiments, which are not described herein again.
It may be understood that, in order to implement the above-mentioned functions, the terminal in the embodiments of the present application includes corresponding hardware structures and/or software modules that perform each function. Those of skill in the art will readily appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the present application.
The embodiment of the application also provides a terminal, which comprises: a processor and a memory. The processor is connected with the memory, the memory is used for storing program codes, and the processor executes the program codes stored in the memory, so that the system upgrading method provided by the embodiment of the application is realized.
The embodiment of the application also provides a computer readable storage medium, and the computer readable storage medium stores program code thereon, which when executed on a terminal, causes the terminal to execute the functions or steps executed by the terminal in the above-mentioned method embodiment.
The embodiment of the application also provides a computer program product, which comprises program code, when the program code runs on a terminal, the program code enables the terminal to execute the functions or steps executed by the terminal in the embodiment of the method.
The terminal, the computer readable storage medium, or the computer program product provided in the embodiments of the present application are configured to perform the corresponding methods provided above, and therefore, the beneficial effects that can be achieved by the terminal, the computer readable storage medium, or the computer program product can refer to the beneficial effects in the corresponding methods provided above, which are not described herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses (e.g., terminals) and methods may be implemented in other manners. For example, the above-described embodiments of an apparatus (e.g., a terminal) are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of 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.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions to cause a computer device (which may 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 the various embodiments of the present application. And the aforementioned storage medium includes: flash memory, removable hard disk, read-only memory, random access memory, magnetic or optical disk, and the like.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A system upgrade method, comprising:
responding to an application program running on a terminal to trigger system upgrade, wherein the terminal is not accessed to a network, and registering network monitoring service; the network monitoring service is used for monitoring the state change of the network;
sending a system upgrading request to a server under the condition that the terminal is monitored to be accessed to a network based on the network monitoring service; the system upgrade request is used for requesting an installation package required by the application program for system upgrade.
2. The method of claim 1, wherein after the registering for network listening service, the method further comprises:
closing the application program and ending the process for upgrading the system in the application program.
3. The method according to claim 2, wherein in case the terminal is monitored to access the network based on the network listening service, the method further comprises:
And starting the application program and starting a process for system upgrading in the application program.
4. A method according to claim 2 or 3, wherein said closing said application and ending a process for a system upgrade in said application comprises:
closing the application program;
and calling a process termination command, and ending the process corresponding to the identifier according to the identifier of the process for system upgrade in the application program.
5. The method of claim 1, wherein registering for network listening service in response to an application running on a terminal triggering a system upgrade and the terminal not accessing the network comprises:
registering the network monitoring service in response to the application reaching a preset upgrade period and the terminal not accessing the network; or alternatively, the first and second heat exchangers may be,
and registering the network monitoring service in response to the application program reaching a preset upgrading time and the terminal not accessing the network.
6. The method of claim 5, wherein the sending a system upgrade request to a server if the terminal accesses a network based on the network listening service comprises:
Resetting the preset upgrading period under the condition that the network access of the terminal is monitored based on the network monitoring service; responding to the preset upgrading period after the application program reaches the reset, and sending the system upgrading request to the server; or alternatively, the first and second heat exchangers may be,
resetting the preset upgrading time under the condition that the network access of the terminal is monitored based on the network monitoring service; and responding to the preset upgrading time after the application program reaches the reset, and sending the system upgrading request to the server.
7. The method according to any of claims 1-6, wherein the terminal not accessing a network indicates that the terminal is not accessing a mobile data network and is not accessing a wireless communication network; the terminal access network means that the terminal accesses the mobile data network or the wireless communication network.
8. The method of any of claims 1-7, wherein the network listening Service is Job Service.
9. A terminal comprising a memory and a processor; the memory is used for storing program codes; the processor is configured to invoke the program code to perform the method of any of claims 1-8.
10. A computer readable storage medium comprising program code which, when run on a terminal, causes the terminal to perform the method of any of claims 1-8.
CN202310794545.3A 2023-06-29 2023-06-29 System upgrading method, terminal and storage medium Active CN117729561B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310794545.3A CN117729561B (en) 2023-06-29 2023-06-29 System upgrading method, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310794545.3A CN117729561B (en) 2023-06-29 2023-06-29 System upgrading method, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN117729561A true CN117729561A (en) 2024-03-19
CN117729561B CN117729561B (en) 2024-09-27

Family

ID=90205806

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310794545.3A Active CN117729561B (en) 2023-06-29 2023-06-29 System upgrading method, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN117729561B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6009274A (en) * 1996-12-13 1999-12-28 3Com Corporation Method and apparatus for automatically updating software components on end systems over a network
US20030208687A1 (en) * 2002-05-06 2003-11-06 Trend Micro Incorporated Antivirus stand-alone network or internet appliance and methods therefor
CN109885323A (en) * 2019-02-03 2019-06-14 维沃移动通信有限公司 A kind of application program updating method, mobile terminal and readable storage medium storing program for executing
CN111831296A (en) * 2019-04-17 2020-10-27 天津五八到家科技有限公司 Application program updating method, terminal device and computer-readable storage medium
CN113821234A (en) * 2021-06-15 2021-12-21 荣耀终端有限公司 Operating system upgrade method, apparatus, storage medium, and computer program product
CN114050982A (en) * 2021-11-22 2022-02-15 深圳市元征科技股份有限公司 Software upgrading method and device, electronic equipment and storage medium
CN114884815A (en) * 2022-07-11 2022-08-09 广州宇洪科技股份有限公司 Broadband network terminal equipment with wireless upgrading awakening function and upgrading system thereof
WO2022268127A1 (en) * 2021-06-23 2022-12-29 华为技术有限公司 Ota upgrade method and device, and computer-readable storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6009274A (en) * 1996-12-13 1999-12-28 3Com Corporation Method and apparatus for automatically updating software components on end systems over a network
US20030208687A1 (en) * 2002-05-06 2003-11-06 Trend Micro Incorporated Antivirus stand-alone network or internet appliance and methods therefor
CN109885323A (en) * 2019-02-03 2019-06-14 维沃移动通信有限公司 A kind of application program updating method, mobile terminal and readable storage medium storing program for executing
CN111831296A (en) * 2019-04-17 2020-10-27 天津五八到家科技有限公司 Application program updating method, terminal device and computer-readable storage medium
CN113821234A (en) * 2021-06-15 2021-12-21 荣耀终端有限公司 Operating system upgrade method, apparatus, storage medium, and computer program product
WO2022268127A1 (en) * 2021-06-23 2022-12-29 华为技术有限公司 Ota upgrade method and device, and computer-readable storage medium
CN114050982A (en) * 2021-11-22 2022-02-15 深圳市元征科技股份有限公司 Software upgrading method and device, electronic equipment and storage medium
CN114884815A (en) * 2022-07-11 2022-08-09 广州宇洪科技股份有限公司 Broadband network terminal equipment with wireless upgrading awakening function and upgrading system thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
W. ZHOU ET AL., "REVIEWING IOT SECURITY VIA LOGIC BUGS IN IOT PLATFORMS AND SYSTEMS: "Reviewing IoT Security via Logic Bugs in IoT Platforms and Systems", IEEE INTERNET OF THINGS JOURNAL, 16 February 2021 (2021-02-16) *
张海强: "智能网联汽车安全远程升级技术的研究与实现", 信息科技辑, 15 September 2018 (2018-09-15) *

Also Published As

Publication number Publication date
CN117729561B (en) 2024-09-27

Similar Documents

Publication Publication Date Title
EP4002108B1 (en) Application start method and electronic device
CN112291764B (en) Content connection system
WO2022089207A1 (en) Cross-device application interaction method, electronic device, and server
CN114461239B (en) Software upgrading system and software upgrading method
CN116360725B (en) Display interaction system, display method and device
WO2021052204A1 (en) Address book-based device discovery method, audio and video communication method, and electronic device
CN112860445B (en) Method and terminal for sharing data between fast application and native application
CN112817634B (en) COTA package downloading method and device
CN115309431B (en) Parameter updating method, readable medium and electronic equipment
CN115333941B (en) Method for acquiring application running condition and related equipment
CN114816463A (en) Upgrade prompting method, terminal device and computer readable storage medium
CN115017495B (en) Timing verification method, electronic device, and readable storage medium
CN117729561B (en) System upgrading method, terminal and storage medium
CN117348894A (en) Software upgrading method, terminal equipment and system
CN113467821A (en) Application program repairing method, device, equipment and readable storage medium
CN116541188B (en) Notification display method, terminal device and storage medium
CN117009023B (en) Method for displaying notification information and related device
CN117130808B (en) Log acquisition method and electronic equipment
CN117724825B (en) Interface display method and electronic equipment
CN117707562B (en) Parameter updating method and terminal equipment
CN116662150B (en) Application starting time-consuming detection method and related device
CN116048544B (en) Processing method of popup advertisement, electronic equipment and readable storage medium
WO2024131823A1 (en) Installation-free application upgrading method and electronic device
CN117950677A (en) Software distribution method, electronic equipment and system
CN117724640A (en) Split screen display method, electronic equipment 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