Disclosure of Invention
The embodiment of the application provides a method for changing an upgrading state of a terminal, the terminal and an Internet of things platform, and is used for realizing the function of synchronizing the upgrading state of the terminal and the Internet of things platform in an upgrading suspension scene and an upgrading cancellation scene of the terminal.
In view of this, a first aspect of the embodiments of the present application provides a method for changing an upgrade status of a terminal, which may include: when the terminal is in a first state, acquiring a first request, wherein the first request comprises a pause request or a cancel request, and the first state is a state describing that the terminal upgrades firmware; the first state may include a firmware download state, a firmware download complete state, or a firmware upgrade state. The terminal is switched into the second state according to the first request, wherein if the first request comprises the pause request, the second state is the pause state, and if the first request comprises the cancel request, the second state is the cancel state; the terminal sends a state updating notice to the Internet of things platform, wherein the state updating notice comprises indication information of a second state, and the state updating notice is used for the Internet of things platform to set the upgrading state of the terminal to the second state. In the embodiment of the application, the state and the IoT platform real-time synchronization function in the terminal suspension upgrading scene are met by adding the suspension state. By adding the cancellation state, the real-time synchronization function of the state and the IoT platform in the scene of canceling the upgrade of the terminal is met.
Optionally, in some embodiments of the application, when the first request includes the suspension request, after the terminal sends a status update notification to the internet of things platform, the method may further include: the terminal receives an upgrading request sent by the Internet of things platform; and the terminal is switched into the first state from the pause state according to the upgrading request to upgrade. In the embodiment of the application, the terminal receives the upgrading request sent by the IoT platform within the preset duration, and can be switched to the first state from the pause state according to the upgrading request to continue the upgrading. In the embodiment of the application, after the terminal is switched to the suspended state from the first state, when the terminal receives the upgrade request sent by the IoT platform again, the upgrade can be continued, so that the upgrade can be continued after the firmware upgrade is interrupted in case of an emergency, and the terminal and the IoT platform realize the function of synchronizing the upgrade states of the terminal.
Optionally, in some embodiments of the present application, the method may further include: the terminal records the offset of the downloaded firmware; the upgrading can include: and the terminal upgrades according to the offset of the downloaded firmware. In the embodiment of the application, when the first request includes a suspension request, after the terminal is switched from the first state to the suspension state, the terminal may further record the offset of the currently downloaded firmware, and then, when the upgrade request sent by the IoT platform is received again, the terminal may record the offset of the downloaded firmware, and may continue downloading from the recorded offset of the downloaded firmware, so as to perform the upgrade, reduce repeated downloading of the firmware, and save time and resources.
Optionally, in some embodiments of the application, when the first request includes the suspension request, after the terminal sends a status update notification to the internet of things platform, the method may further include: and if the terminal does not receive the upgrading request sent by the Internet of things platform within the preset duration, the terminal is switched into an idle state from the pause state, and a first upgrading result is recorded. In the embodiment of the present application, the first upgrade result indicates that this upgrade is suspend timeout (may also be referred to as suspend timeout), and indicates a reason why the upgrade is not successful. The recorded first upgrading result can be used for feeding back the result of the Internet of things platform for inquiring the upgrading.
Optionally, in some embodiments of the present application, the method may further include: the terminal receives a first query request sent by the Internet of things platform; the terminal sends the first upgrading result to the Internet of things platform according to the first query request, and the first upgrading result is used for indicating that the terminal is in suspension overtime. The embodiment of the application teaches that the internet of things platform queries the upgrade result from the terminal, the first upgrade result is used for indicating that the upgrade of the terminal is suspended overtime, and the internet of things platform can accurately know the reason of the upgrade failure, so that the management is convenient.
Optionally, in some embodiments of the application, when the first request includes the cancel request, after the terminal sends the status update notification to the internet of things platform, the method may include: and if the terminal clears the upgrading resources, the terminal is switched into an idle state from the canceling state, and a second upgrading result is recorded. In the embodiment of the application, the second upgrade result indicates that the upgrade is cancelled, and indicates the reason for unsuccessful upgrade. The recorded second upgrading result can be used for feeding back the result of the Internet of things platform for inquiring the upgrading.
Optionally, in some embodiments of the present application, the method may further include: the terminal receives a second query request sent by the Internet of things platform; and the terminal sends the second upgrading result to the Internet of things platform according to the second query request, wherein the second upgrading result is used for indicating that the terminal is upgraded to cancel upgrading. The embodiment of the application teaches that the internet of things platform queries the upgrade result from the terminal, the second upgrade result is used for indicating that the terminal is upgraded to cancel the upgrade, and the internet of things platform can accurately know the reason of the upgrade failure, so that the management is convenient.
A second aspect of the present application provides a method for changing an upgrade status of a terminal, where the method may include: the Internet of things platform receives a state updating notice sent by the terminal; the status update notification includes indication information of a second status; the Internet of things platform sets the upgrading state of the terminal to be a second state according to the state updating notice, wherein if the state updating notice comprises a pause state notice, the second state is the pause state, and if the state updating notice comprises a cancel state notice, the second state is the cancel state. In the embodiment of the application, the state and the IoT platform real-time synchronization function in the terminal suspension upgrading scene are met by adding the suspension state. By adding the cancellation state, the real-time synchronization function of the state and the IoT platform in the scene of canceling the upgrade of the terminal is met.
Optionally, in some embodiments of the application, when the second state is the suspended state, after the internet of things platform sets the upgrade state of the terminal to the second state according to the state update notification, the method may further include: and the Internet of things platform sends an upgrading request to the terminal, and the upgrading request is used for the terminal to be switched into the first state from the pause state for upgrading. In the embodiment of the application, after the terminal is switched to the suspended state from the first state, when the IoT platform sends the upgrade request to the terminal again, and when the terminal receives the upgrade request sent by the IoT platform, the upgrade can be continued, so that it is ensured that the upgrade can be continued after the firmware upgrade is interrupted in case of an emergency, and the terminal and the IoT platform realize the function of synchronizing the upgrade states of the terminal.
Optionally, in some embodiments of the application, when the second state is the suspended state, after the internet of things platform sets the upgrade state of the terminal to the second state according to the state update notification, the terminal may further include: the Internet of things platform sends a first query request to the terminal; the Internet of things platform receives a first upgrading result sent by the terminal, and the first upgrading result is used for indicating that the terminal is upgraded to be suspended overtime. The embodiment of the application teaches that the internet of things platform queries the upgrade result from the terminal, the first upgrade result is used for indicating that the upgrade of the terminal is suspended overtime, and the internet of things platform can accurately know the reason of the upgrade failure, so that the management is convenient.
Optionally, in some embodiments of the application, when the second state is the cancelled state, after the internet of things platform sets the upgrade state of the terminal to the second state according to the state update notification, the terminal may further include: the Internet of things platform sends a second query request to the terminal; and the Internet of things platform receives a second upgrading result sent by the terminal, and the second upgrading result is used for indicating that the terminal is upgraded at this time to cancel the upgrading. The embodiment of the application teaches that the internet of things platform queries the upgrade result from the terminal, the second upgrade result is used for indicating that the terminal is upgraded to cancel the upgrade, and the internet of things platform can accurately know the reason of the upgrade failure, so that the management is convenient.
In another aspect, an embodiment of the present application provides a terminal, which has a function of synchronizing a terminal upgrade state and an internet of things platform in a suspend upgrade scenario and an upgrade cancellation scenario of the terminal. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above.
The embodiment of the application further provides an internet of things platform, which has the function that the terminal realizes the synchronization of the terminal upgrading state and the internet of things platform in the upgrading suspension scene and the upgrading cancellation scene. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above.
In another aspect, an embodiment of the present application provides a terminal, a transceiver, configured to communicate with a device other than the terminal; a memory for storing computer execution instructions; one or more processors coupled to the memory and the transceiver via a bus, the processors executing computer-executable instructions stored in the memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions which, when executed by the terminal, cause the terminal to perform the method of the first aspect or any of the alternatives of the first aspect.
In another aspect, an embodiment of the present application provides an internet of things platform, where a transceiver is configured to communicate with a device outside the internet of things platform; a memory for storing computer execution instructions; one or more processors coupled to the memory and the transceiver via a bus, the processors executing computer-executable instructions stored in the memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions which, when executed by the internet of things platform, cause the internet of things platform to perform the method of any of the second aspects or alternatives described above.
Yet another aspect of the embodiments of the present application provides a wireless communications apparatus, which may include:
at least one processor, a memory, transceiver circuitry, and a bus system, the processor, the memory, the transceiver circuitry coupled through the bus system, the wireless communication device in communication with an internet of things platform through the transceiver circuitry, the memory configured to store program instructions, the at least one processor configured to execute the program instructions stored in the memory, cause the wireless communication device to perform portions of the operations of the terminal in the method according to the first aspect of embodiments of the present application. The wireless communication device can be a terminal, and can also be a chip which is applied in the terminal and executes corresponding functions.
Yet another aspect of the embodiments of the present application provides a wireless communications apparatus, which may include:
at least one processor, a memory, transceiver circuitry, and a bus system, the processor, the memory, the transceiver circuitry coupled through the bus system, the wireless communication device in communication with a terminal through the transceiver circuitry, the memory configured to store program instructions, the at least one processor configured to execute the program instructions stored in the memory, such that the wireless communication device performs portions of the operations of the internet of things platform in the method according to the second aspect of the embodiments of the present application. The wireless communication device can be an Internet of things platform and also can be a chip which is applied to the Internet of things platform and executes corresponding functions.
It should be noted that, in essence, or a part of or all of the technical solution that contributes to the prior art may be embodied in the form of a software product stored in a storage medium, and the computer software product is used for storing computer software instructions for the terminal, which include a program designed for executing the above aspects for the terminal, or storing computer software instructions for the internet of things platform, which include a program designed for executing the above aspects for the internet of things platform.
The storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like.
Yet another aspect of the embodiments of the present application provides a computer program product containing instructions which, when run on a computer, cause the computer to perform the method as described in the above aspects or any alternative implementation of the aspects.
According to the technical scheme, the embodiment of the application has the following advantages:
in the embodiment of the application, when a terminal is in a first state, a first request is acquired, wherein the first request comprises a pause request or a cancel request, and the first state is a state describing that the terminal upgrades firmware; the terminal is switched into the second state according to the first request, wherein if the first request comprises the pause request, the second state is the pause state, and if the first request comprises a cancel request, the second state is the cancel state; and the terminal sends a state updating notice to the Internet of things platform, wherein the state updating notice is used for the Internet of things platform to set the upgrading state of the terminal to be the second state. In other words, the method and the device meet the real-time synchronization function of the state and the IoT platform in the final suspension upgrading scene through the newly added suspension state. By adding the cancellation state, the real-time synchronization function of the state and the IoT platform in the scene of canceling the upgrade of the terminal is met.
Detailed Description
The embodiment of the application provides a method for changing an upgrading state of a terminal, the terminal and an Internet of things platform, and is used for realizing the function of synchronizing the upgrading state of the terminal and the Internet of things platform in an upgrading suspension scene and an upgrading cancellation scene of the terminal.
For a person skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. The embodiments in the present application shall fall within the protection scope of the present application.
In the embodiment of the application, in the terminal upgrading process in the field of internet of things, when the terminal suspends, resumes or cancels upgrading, the states of the terminal and the IoT platform can be synchronized in real time. Fig. 3 is a diagram of a system architecture to which embodiments of the present application are applied. The system architecture diagram shown in fig. 3 includes an IoT platform and a terminal, where the IoT platform is a management platform connected to the terminal of the internet of things in an IoT scenario. The terminals are various internet of things terminals in an IoT scene.
In the field of the Internet of things, in the terminal upgrading process, upgrading is suspended, other services are processed, and after the other services are processed, the upgrading is continued; and in the terminal upgrading process, the upgrading scene is cancelled.
According to the method and the system, the PENDING process is added in the LWM2M upgrading process, so that the terminal and the platform can synchronously process the scenes of terminal pause and upgrading recovery. And adding a CANCEL flow in the LWM2M upgrading flow, so that the terminal and the platform can synchronously process the scene that the terminal CANCELs upgrading.
The following describes the technical solution of the present application by way of example, and as shown in fig. 4, the technical solution is a schematic diagram illustrating an embodiment of a method for changing an upgrade status of a terminal in the embodiment of the present application. The method can comprise the following steps:
401. when the terminal is in the first state, the terminal acquires a pause request.
The first state may include descending or updating. That is, when the terminal is in the firmware downloading state, or the firmware downloading completion state, or the firmware upgrading state, the terminal acquires the suspension request.
The acquiring, by the terminal, the suspend request may include: the terminal responds to the operation of the user and generates a pause request; or, if the terminal detects that the current environment meets the pause alarm condition, a pause request is generated.
402. And the terminal is switched into the pause state from the first state according to the pause request.
And the terminal is switched to the pause state from the firmware downloading state or the firmware downloading completion state or the firmware upgrading state according to the pause request.
403. The terminal sends a state change notification to the IoT platform.
It is understood that the suspended state may also be referred to as a suspended (PENDING) state. The state change notification carries indication information that the terminal is in the suspended state, and the terminal sends the state change notification to the IoT platform, and optionally, the terminal may further record a first state (such as a firmware download state, a firmware download completion state, or a firmware upgrade state) before the terminal transitions to the suspended state.
It should be noted that, if the first state recorded by the terminal before the transition to the second state is the firmware downloading state, the terminal may further record an offset of the currently downloaded firmware.
404. And the IoT platform sets the upgrading state of the terminal to be a suspended state according to the state change notice.
And the IoT platform sets the upgrading state of the terminal to be in a suspended state according to the indication information of the suspended state of the terminal carried by the state change notice.
Namely, the application adds the following steps in the LWM2M upgrading process: pause (PENDING) state, state 4. Illustratively, LWM2M updates result with new result 10.
Value of
|
Description of English
|
Description of Chinese
|
10
|
Pending time out
|
Suspend timeout |
TABLE 2
It should be noted that result 10 is merely exemplary and that other numbers (excluding 1-9 shown in table 1), letters, etc. may be used to indicate timeout of the pause.
405. The IoT platform sends an upgrade request to the terminal.
The IoT platform may initiate the upgrade request to the terminal again within a preset duration.
406. And the terminal is switched to the first state from the pause state according to the upgrading request and continues upgrading.
The terminal receives an upgrading request sent by the IoT platform within a preset time length, and can be switched into the first state from the pause state according to the upgrading request to continue upgrading. If the first state is a firmware downloading state, the terminal records the offset of the downloaded firmware, and can continue downloading from the recorded offset of the downloaded firmware, so that repeated downloading of the firmware is reduced, and time and resources are saved.
Optionally, when the terminal is within the preset duration, the upgrade request sent by the IoT platform is not received. The terminal may transition from the suspended state to the idle state. Meanwhile, for example, the terminal may record the upgrade result as 10. The IoT platform sends a query request to the terminal; and the terminal returns 10 to the IoT platform according to the query request, and after the IoT platform receives 10, the upgrading result of the terminal is determined to be suspended overtime.
Suspend upgrade scenario example: a smoke alarm. Are typically installed indoors to monitor smoke alarms. When the smoke alarm is upgraded, the smoke alarm is suddenly sent, the upgrading is required to be suspended, the platform is informed that the upgrading is suspended, and the alarm reported by the terminal is processed emergently.
In the embodiment of the application, the improvement is different from the prior art in that a PENDING state is added in the LWM2M upgrading process. And suspending the timeout of the newly added upgrading task in the upgrading result. When the terminal suspends the upgrade, the terminal can timely notify the IoT platform, so that the IoT platform can synchronously upgrade the state and process other services together with the terminal. When the terminal is updated, the firmware downloaded from the last offset can be used, so that the terminal does not need to download the updated firmware again in the updating process, and the updated firmware can be downloaded in an incremental manner. According to the technical scheme, the new upgrade task is added in the upgrade result and is suspended overtime, and the method and the device can be used for processing an IoT platform inquiry upgrade task suspension overtime terminal.
Fig. 5 is a schematic diagram illustrating another embodiment of a method for updating a state change of a terminal in an embodiment of the present application. The method can comprise the following steps:
501. when the terminal is in the first state, the terminal acquires a cancel request.
The first state may include descending or updating. That is, when the terminal is in the firmware downloading state, or the firmware downloading completion state, or the firmware upgrading state, the terminal acquires the cancel request.
The acquiring, by the terminal, the cancel request may include: the terminal responds to the operation of the user and generates a cancellation request; or, if the terminal detects that the current environment meets the alarm canceling condition, a canceling request is generated.
502. And the terminal is switched into a cancellation state from the first state according to the cancellation request.
And the terminal is switched to a cancellation state from a firmware downloading state or a firmware downloading completion state or a firmware upgrading state according to the cancellation request.
503. The terminal sends a state change notification to the IoT platform.
The state change notification carries indication information that the terminal is in a cancelled state, and the terminal sends the state change notification to the IoT platform.
504. And the IoT platform sets the upgrading state of the terminal as a canceling state according to the state change notification.
And the IoT platform sets the upgrading state of the terminal to be in a canceling state according to the indication information of the state change notification carried by the terminal. Namely, after receiving the CNACEL state sent by the terminal, the IoT platform cancels the upgrade task.
Namely, the application adds the following steps in the LWM2M upgrading process: CANCEL (CANCEL) state, state 5. Illustratively, LWM2M updates result with new result 11.
Value of
|
Description of English
|
Description of Chinese
|
11
|
Firmware update cancel
|
Firmware upgrade cancellation |
TABLE 3
It should be noted that result 11 is merely an example, and other numbers (excluding 1-9 shown in table 1), letters, etc. may be used to indicate that the firmware upgrade is cancelled.
505. And the terminal clears the upgrading resource and shifts to an idle state.
Namely, after the terminal is switched to the canceling state, the upgrading resource can be cleared, and after the upgrading resource is cleared, the terminal is switched to the idle state. Or the terminal clears up the upgrade resource in the preset time length and shifts to an idle state. Optionally, the IoT platform sends a query request to the terminal; and the terminal returns 11 to the IoT platform according to the query request, and after the IoT platform receives 11, the upgrading result of the terminal is determined to be the upgrading cancellation.
Cancel upgrade scenario example: an environmental sensor. Generally installed outdoors for monitoring environmental parameters such as temperature and humidity, PM2.5, wind speed, carbon dioxide concentration, etc., using batteries to supply power. When the sensor is upgraded, the battery power is found to be insufficient, the upgrade needs to be cancelled, and the low battery power alarm is sent to the platform immediately.
In the embodiment of the application, the improvement is different from the prior art in that a CANCEL state is added in the LWM2M upgrading process. And the upgrading of the new reinforcement piece is cancelled in the upgrading result. And when the terminal cancels the upgrade, the IoT platform is timely notified. Enabling the IoT platform to synchronize upgrade status. And actively canceling the new upgrade task in the upgrade result, wherein the new upgrade task can be used for inquiring the upgrade task result by the IoT platform.
As shown in fig. 6, which is a schematic diagram of an embodiment of a terminal in the embodiment of the present application, the method may include:
the receiving and sending module 601 is configured to obtain a first request when the terminal is in a first state, where the first request includes a suspend request or a cancel request, and the first state is a state in which a firmware of the terminal is described to be upgraded; sending a state updating notice to the Internet of things platform, wherein the state updating notice is used for setting the upgrading state of the terminal to a second state by the Internet of things platform;
the processing module 602 is configured to transition to a second state according to the first request, where the second state is a suspended state if the first request includes a suspension request, and the second state is a cancelled state if the first request includes a cancellation request.
Optionally, in some embodiments of the present application, when the first request comprises a pause request,
the transceiver module 601 is further configured to receive an upgrade request sent by the internet of things platform;
the processing module 602 is further configured to transition from the suspended state to the first state according to the upgrade request, and perform upgrade.
Alternatively, in some embodiments of the present application,
the processing module 602 is further configured to record an offset of the downloaded firmware; in particular for upgrading according to the offset of the downloaded firmware.
Optionally, in some embodiments of the present application, when the first request comprises a pause request,
the processing module 602 is further configured to transition from the suspended state to an idle state and record a first upgrade result if the terminal does not receive the upgrade request sent by the internet of things platform within the preset duration.
Alternatively, in some embodiments of the present application,
the transceiver module 601 is further configured to receive a first query request sent by the internet of things platform; and sending a first upgrading result to the Internet of things platform according to the first query request, wherein the first upgrading result is used for indicating that the terminal is upgraded to be suspended overtime.
Optionally, in some embodiments of the present application, when the first request comprises a cancel request,
the processing module 602 is further configured to transition from the cancel state to the idle state and record a second upgrade result if the terminal has cleared the upgrade resource of this time.
Alternatively, in some embodiments of the present application,
the transceiver module 601 is further configured to receive a second query request sent by the internet of things platform; and sending a second upgrading result to the Internet of things platform according to the second query request, wherein the second upgrading result is used for indicating that the terminal is upgraded to cancel the upgrading.
As shown in fig. 7, a schematic diagram of an embodiment of an internet of things platform in the embodiment of the present application may include:
a transceiver module 701, configured to receive a status update notification sent by a terminal;
the processing module 702 is configured to set the upgrade status of the terminal to a second status according to the status update notification, where the second status is a suspended status if the status update notification includes a suspended status notification, and the second status is a cancelled status if the status update notification includes a cancelled status notification.
Optionally, in some embodiments of the present application, when the second state is a suspended state,
the transceiver module 701 is further configured to send an upgrade request to the terminal, where the upgrade request is used for the terminal to transition from the suspend state to the first state for upgrading.
Optionally, in some embodiments of the present application, when the second state is a suspended state,
the transceiver module 701 is further configured to send a first query request to the terminal; and receiving a first upgrading result sent by the terminal, wherein the first upgrading result is used for indicating that the terminal is subjected to the suspension overtime upgrading.
Optionally, in some embodiments of the present application, when the second state is a canceled state,
the transceiver module 701 is further configured to send a second query request to the terminal; and receiving a second upgrading result sent by the terminal, wherein the second upgrading result is used for indicating that the terminal is upgraded at this time to cancel the upgrading.
As shown in fig. 8, which is a schematic view of an embodiment of a terminal in the embodiment of the present application, the terminal at least includes: a transceiver 801, a memory 820, a processor 880. The transceiver 801 includes at least one of a Radio Frequency (RF) circuit 810 and a wireless fidelity (WiFi) module 870. Optionally, the method may further include: an input unit 830, a display unit 840, a sensor 850, an audio circuit 860, and a power supply 890. Those skilled in the art will appreciate that the terminal structure shown in fig. 8 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. The specific form of the apparatus shown in fig. 8 may be a user equipment such as a mobile phone, or may be a module or a chip having the functions described in the terminal in the embodiment of the present application, which is not limited in this embodiment of the present application.
The following describes each component of the mobile phone in detail with reference to fig. 8:
the RF circuit 810 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, for processing downlink information of a base station after receiving the downlink information to the processor 880; in addition, the data for designing uplink is transmitted to the base station. In general, RF circuit 810 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuit 810 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to global system for mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Message Service (SMS), etc.
The memory 820 may be used to store software programs and modules, and the processor 880 executes various functional applications and data processing of the cellular phone by operating the software programs and modules stored in the memory 820. The memory 820 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 820 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 830 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone. Specifically, the input unit 830 may include a touch panel 831 and other input devices 832. The touch panel 831, also referred to as a touch screen, can collect touch operations performed by a user on or near the touch panel 831 (e.g., operations performed by the user on the touch panel 831 or near the touch panel 831 using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 831 may include two portions, i.e., a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts it to touch point coordinates, and sends the touch point coordinates to the processor 880, and can receive and execute commands from the processor 880. In addition, the touch panel 831 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 830 may include other input devices 832 in addition to the touch panel 831. In particular, other input devices 832 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 840 may be used to display information input by the user or information provided to the user and various menus of the cellular phone. The display unit 840 may include a display panel 841, and the display panel 841 may be optionally configured in the form of a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), or the like. Further, touch panel 831 can overlay display panel 841, and when touch panel 831 detects a touch operation thereon or nearby, communicate to processor 880 to determine the type of touch event, and processor 880 can then provide a corresponding visual output on display panel 841 based on the type of touch event. Although in fig. 8, the touch panel 831 and the display panel 841 are two separate components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 831 and the display panel 841 may be integrated to implement the input and output functions of the mobile phone.
The handset may also include at least one sensor 850, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 841 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 841 and/or the backlight when the mobile phone is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
Audio circuitry 860, speaker 861, microphone 862 may provide an audio interface between the user and the handset. The audio circuit 860 can transmit the electrical signal converted from the received audio data to the speaker 861, and the electrical signal is converted into a sound signal by the speaker 861 and output; on the other hand, the microphone 862 converts collected sound signals into electrical signals, which are received by the audio circuit 860 and converted into audio data, which are then processed by the audio data output processor 880 and transmitted to, for example, another cellular phone via the RF circuit 810, or output to the memory 820 for further processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to send and receive e-mails, browse webpages, access streaming media and the like through the WiFi module 870, and provides wireless broadband Internet access for the user. Although fig. 8 shows WiFi module 870, it is understood that it does not belong to the essential constitution of the handset, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 880 is a control center of the mobile phone, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 820 and calling data stored in the memory 820, thereby integrally monitoring the mobile phone. Optionally, processor 880 may include one or more processing units; preferably, the processor 880 may integrate an application processor, which mainly handles operating systems, user interfaces, applications, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 880.
The handset also includes a power supply 890 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 880 via a power management system to manage charging, discharging, and power consumption.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which are not described herein.
The steps performed by the terminal in the above method embodiment may be based on the terminal structure shown in fig. 8, as follows:
the transceiver 801 is configured to, when a terminal is in a first state, obtain a first request, where the first request includes a suspend request or a cancel request, and the first state is a state in which a firmware of the terminal is upgraded; sending a state updating notice to the Internet of things platform, wherein the state updating notice is used for setting the upgrading state of the terminal to the second state by the Internet of things platform;
a processor 880, configured to transition to the second state according to the first request, where the second state is a suspended state if the first request includes the suspension request, and the second state is a cancelled state if the first request includes a cancellation request.
Alternatively, in some embodiments of the present application,
the transceiver 801 is further configured to receive an upgrade request sent by the internet of things platform;
the processor 880 is further configured to transition to the first state from the suspended state according to the upgrade request, and perform upgrade.
Alternatively, in some embodiments of the present application,
a processor 880, further configured to record an offset of the downloaded firmware; and is specifically configured to perform an upgrade according to the offset of the downloaded firmware.
Optionally, in some embodiments of the present application, when the first request comprises the suspend request,
the processor 880 is further configured to transition from the suspended state to an idle state and record a first upgrade result if the terminal does not receive an upgrade request sent by the internet of things platform within a preset duration.
Alternatively, in some embodiments of the present application,
the transceiver 801 is further configured to receive a first query request sent by the internet of things platform; and sending the first upgrading result to the Internet of things platform according to the first query request, wherein the first upgrading result is used for indicating that the terminal is upgraded to be suspended overtime.
Optionally, in some embodiments of the present application, when the first request comprises the cancel request,
the processor 880 is further configured to switch from the cancel state to an idle state and record a second upgrade result if the terminal has cleared the upgrade resources.
Alternatively, in some embodiments of the present application,
the transceiver 801 is further configured to receive a second query request sent by the internet of things platform; and sending the second upgrading result to the Internet of things platform according to the second query request, wherein the second upgrading result is used for indicating that the terminal is upgraded at this time to cancel upgrading.
As shown in fig. 9, which is a schematic view of an embodiment of an internet of things platform in the embodiment of the present application, the method may include:
a transceiver 901, a memory 902 and a processor 903, wherein the transceiver 901, the memory 902 and the processor 903 are connected to each other by a bus. The steps performed by the internet of things platform in the above embodiment may be based on the common capability component structure shown in fig. 9, as follows:
a transceiver 901, configured to receive a status update notification sent by a terminal;
a processor 903, configured to set the upgrade status of the terminal to a second status according to the status update notification, where the second status is a suspended status if the status update notification includes a suspended status notification, and the second status is a cancelled status if the status update notification includes a cancelled status notification.
Optionally, in some embodiments of the present application, when the second state is the pause state,
the transceiver 901 is further configured to send an upgrade request to the terminal, where the upgrade request is used for the terminal to transition from the suspended state to the first state for upgrading.
Optionally, in some embodiments of the present application, when the second state is the pause state,
a transceiver 901, further configured to send a first query request to the terminal; and receiving a first upgrading result sent by the terminal, wherein the first upgrading result is used for indicating that the terminal is subjected to hang-up overtime in the upgrading process.
Optionally, in some embodiments of the present application, when the second state is the cancelled state,
a transceiver 901, further configured to send a second query request to the terminal; and receiving a second upgrading result sent by the terminal, wherein the second upgrading result is used for indicating that the terminal is upgraded at this time to cancel the upgrading.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed 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 can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.