A MIFI upgrade method, system, device and storage medium
By entering deep sleep state without user connection, MIFI equipment is upgraded in low-energy mode, solving the problem of difficult to take into account both the power consumption and the user's usage period during upgrade in the existing technology, and realizing the power saving and upgrade success rate Improvement.
Patent Information
- Application Number
- CN202311689749.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-11
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2043-12-11
AI Technical Summary
During upgrade, existing MIFI systems cannot simultaneously reduce system power consumption and avoid user usage periods, resulting in the risk of upgrade failure or missing upgrade requests.
By real-time detection of user connection, when there is no user connection, release the kernel lock, close the protocol stack, start the timer and enter deep sleep state to save the power; after the timer wakes up, re-add the kernel lock, open the protocol stack for upgrading and reporting and system Upgrade to ensure that the upgrade is completed in low-energy mode.
Effectively reduce the energy consumption of MIFI equipment, avoid upgrade failures caused by low power, stagger user usage time periods, reduce the risk of missing upgrade requests, and improve upgrade efficiency.
Smart Images

Figure CN117693003B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic technology, and in particular to a MIFI upgrade method, system, device and storage medium. Background Art
[0002] MIFI (Mobile WIFI) is called "personal hotspot" or mobile hotspot terminal. When upgrading MIFI, the existing technology fails to integrate system low power consumption and system update and upgrade. This is because in order to maintain data exchange with the base station, it cannot enter the sleep state to the maximum extent in the idle state. In addition, after receiving the MIFI upgrade request, a forced upgrade is performed. During the upgrade process, it does not detect whether the device power is too low, nor does it detect whether there is a user using it. However, this will result in the risk of upgrade failure or impact on usage.
[0003] In short, when upgrading the existing MIFI system, it is impossible to reduce system power consumption and avoid user usage time periods. If the low power consumption mode is adopted, data service exchange cannot be performed, and there is a risk of missing the upgrade request. Summary of the invention
[0004] The purpose of the present invention is to address the deficiencies of the above-mentioned prior art and to propose a MIFI upgrade method, system, device and storage medium, which can reduce system power consumption while avoiding user usage segments, thereby reducing the risk of missing upgrade requests.
[0005] In a first aspect, the present invention provides a MIFI upgrade method, which is applied to a MIFI device, comprising:
[0006] When no user connection is detected in real time, the kernel lock is released, the protocol stack is closed, and after starting a preset timer, the MIFI device enters a deep sleep state from a normal working state, so that the MIFI device retains power for upgrading;
[0007] When the timer reaches a preset wake-up time, the kernel lock is re-engaged, the deep sleep state is awakened to the normal working state, and the protocol stack is opened for upgrade reporting;
[0008] When a system upgrade is required after the upgrade is reported, the MIFI device is upgraded.
[0009] The present invention detects the user's connection status in real time. When there is no user connection, the idle MIFI device turns off the protocol stack, which can reduce the energy consumption overhead of responding to the base station signal. In the case of no user connection, the timer is started to enter the deep sleep state. The MIFI device in the deep sleep state can save power to the greatest extent, thereby effectively avoiding the situation that the upgrade failure occurs due to low power. When the timer reaches the wake-up time, the MIFI device in the deep sleep state is awakened. At this time, there is still no user connection. The protocol stack for communicating with the base station is opened to perform upgrade reporting and system upgrade. That is, the present invention enters the deep sleep state when there is no user connection, and the MIFI device enters the low-energy consumption mode to reduce energy consumption loss. At the same time, the system is upgraded, which staggers the time period when the user uses the MIFI device, thereby reducing the risk of missing the upgrade request.
[0010] Further, the releasing the kernel lock includes:
[0011] The first file corresponding to the kernel lock is deleted. When it is detected that the first file does not exist, all system processes are frozen, and the context is saved to the disk, and the peripherals are powered off.
[0012] The present invention uses the first file corresponding to the kernel lock as an identifier of whether to freeze all system processes to determine whether the system process is frozen or not. It can quickly trigger the freezing of the system process, and at the same time control the context preservation and whether the peripherals are powered off. Therefore, the MIFI device can quickly enter a deep sleep state through a file identifier, thereby effectively reducing the energy consumption of the MIFI device, retaining enough power for system upgrades, and effectively reducing the risk of missing upgrade requests.
[0013] Further, the shutting down of the protocol stack and starting a preset timer to enter a deep sleep state from a normal working state include:
[0014] After terminating the communication of multiple protocols on the network side by sending the first serial port command, the response to the base station signal is stopped;
[0015] After starting a preset Linux kernel timer, enter a deep sleep state from a normal working state; wherein, the wake-up time of the Linux kernel timer is set according to the reporting time of the received TR069 after sending the first serial port instruction.
[0016] The present invention automatically sets the duration of the wake-up time through the reporting time of the TR069 protocol instead of manually setting the duration, and can accurately control the wake-up time, avoiding the human error of manually setting the time, thereby effectively improving the efficiency of MIFI device upgrades and effectively reducing the risk of missing upgrade requests.
[0017] Further, when the timer reaches a preset wake-up time, re-locking the kernel to wake up from the deep sleep state to the normal working state includes:
[0018] When the timer reaches a predetermined wake-up time, the CPU process wakes up from the deep sleep state to the normal working state according to the ring lock identifier created by the interrupt service function responded by the CPU;
[0019] A second file corresponding to the kernel lock is recreated, and when the second file is detected, the MIFI device performs normal operation.
[0020] Further, the opening of the protocol stack for upgrade reporting includes:
[0021] After calling the kernel interface to delete the timer, the protocol stack is opened by sending a second serial port instruction, and the upgrade report is performed with TR069, so that the TR069 performs the upgrade report with the cloud.
[0022] Further, when a system upgrade is required after the upgrade is reported, the MIFI device is upgraded with the support of the retained power, including:
[0023] When the upgrade is reported to the cloud and the corresponding upgrade package exists in the cloud, if the MIFI device meets the upgrade conditions, the system of the MIFI device is upgraded with the support of the retained power;
[0024] Otherwise, the kernel lock is released and the system re-enters the deep sleep state to continue to conserve power.
[0025] The real-time detection of no user connection includes:
[0026] When the hardware GPIO pin state detected in real time is the same as the initial state, no user has made a USB connection through the USB interface;
[0027] Or, the instruction does not find out whether the user is connected through the wireless network.
[0028] In a second aspect, the present invention further provides a MIFI upgrade system, which is applied to a MIFI device, comprising:
[0029] The detection unit is used to release the kernel lock and close the protocol stack when it is detected in real time that there is no user connection, and after starting a preset timer, enter a deep sleep state from a normal working state, so that the MIFI device retains power for upgrading;
[0030] A wake-up unit, configured to re-lock the kernel when the timer reaches a preset wake-up time, wake up from the deep sleep state to the normal working state, and open the protocol stack for upgrade reporting;
[0031] The upgrade unit is used to upgrade the MIFI device with the support of the retained power when a system upgrade is required after the upgrade is reported.
[0032] In a third aspect, the present invention further provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect when executing the computer program.
[0033] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a flowchart of a MIFI upgrade method provided by an embodiment of the present invention;
[0035] Figure 2 It is a flowchart of a complete MIFI upgrade method provided by an embodiment of the present invention;
[0036] Figure 3 It is a structural schematic diagram of a MIFI upgrade system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] It is worth noting that this solution combines low power consumption with no missed system upgrade requests. It enters deep sleep when there is no user connection. The power consumption current during deep sleep is 2mA, which is almost close to the shutdown current, and can save power to the greatest extent. When the device is in deep sleep, a qualitative wake-up RTC (Real time communication) is set, and the device normally interacts with the TR069 (Technical report 069) platform to report system upgrades.
[0039] Example 1
[0040] See also Figure 1 , is a flow chart of a MIFI upgrade method provided by an embodiment of the present invention, including steps S11 to S13, specifically:
[0041] Step S11, when no user connection is detected in real time, the kernel lock is released, the protocol stack is closed, and after starting a preset timer, the deep sleep state is entered from the normal working state, so that the MIFI device retains power for upgrading.
[0042] Real-time detection of no user connection includes: when the hardware GPIO pin state detected in real time is the same as the initial state, no user has made a USB connection through the USB interface; or, no user connection is found through the instruction through the wireless network.
[0043] It is worth noting that the user can connect to the MIFI device through a communication interface (such as a USB interface) or through a wireless network to obtain the network connection function. In this implementation, whether the above MIFI device also includes other components or devices to enable the user to obtain the network connection function can be configured according to actual needs and is not limited to this.
[0044] As an optional embodiment, the user includes: a mobile phone, a computer, a smart watch or a tablet, etc.
[0045] As an optional embodiment, whether there is USB access is determined by identifying the hardware GPIO pin status.
[0046] As another optional embodiment, the WIFI status is queried through an instruction to determine whether there is a user connection; wherein the instruction can be expressed as: "hostapd_cli -i wlan0 status | grep num_sta | grep -E[][] | awk -F'="{print$2}'".
[0047] Releasing the kernel lock includes: deleting a first file corresponding to the kernel lock, and when detecting that the first file does not exist, freezing all system processes, saving the context to a disk, and simultaneously powering off peripherals.
[0048] The present invention uses the first file corresponding to the kernel lock as an identifier of whether to freeze all system processes to determine whether the system process is frozen or not. It can quickly trigger the freezing of the system process, and at the same time control the context preservation and whether the peripherals are powered off. Therefore, the MIFI device can quickly enter a deep sleep state through a file identifier, thereby effectively reducing the energy consumption of the MIFI device, retaining enough power for system upgrades, and effectively reducing the risk of missing upgrade requests.
[0049] It is worth mentioning that the processor (CPU) of the MIFI device is equipped with the Linux system. As an alternative, the MIFI device can also be equipped with the Android system.
[0050] As an optional embodiment, the kernel lock can be regarded as a flag bit, which can exist in the form of a file in the Linux system. The kernel lock can be released in the form of deleting the file. When it is determined that the flag bit does not exist, all system processes in the MIFI device will be frozen, and the corresponding context will be saved to the disk. The peripherals will be powered off and enter a low-power mode to achieve the deepest sleep mode.
[0051] After closing the protocol stack and starting a preset timer, entering a deep sleep state from a normal working state includes: stopping responding to base station signals after terminating communications of multiple protocols on the network side by sending a first serial port instruction; and entering a deep sleep state from a normal working state after starting a preset Linux kernel timer; wherein the wake-up time of the Linux kernel timer is set according to the reporting time of the received TR069 after sending the first serial port instruction.
[0052] As an optional embodiment, the communication of various protocols on the network side is terminated by sending at (AT CFUN=0), and after executing this instruction, the base station will no longer respond to the signal, thereby further reducing power consumption.
[0053] As an optional embodiment, after the defined Linux kernel timer counts to a set time, the CPU will generate an interrupt and respond to a related interrupt service function, in which a ring lock flag is created to restore the frozen process to normal operation.
[0054] As an optional embodiment, the reporting time of TR069 is obtained, and the time is set as the sleep duration. After the time is reached, the device wakes up and opens the protocol stack to connect to the network and interact with TR069.
[0055] The present invention automatically sets the duration of the wake-up time through the reporting time of the TR069 protocol instead of manually setting the duration, and can accurately control the wake-up time, avoiding the human error of manually setting the time, thereby effectively improving the efficiency of MIFI device upgrades and effectively reducing the risk of missing upgrade requests.
[0056] Step S12: When the timer reaches a preset wake-up time, the kernel lock is re-engaged, the deep sleep state is awakened to the normal working state, and the protocol stack is opened for upgrade reporting.
[0057] When the timer reaches a preset wake-up time, the kernel lock is re-added, and the device is awakened from the deep sleep state to the normal working state, including: when the timer reaches a predetermined wake-up time, according to a ring lock identifier created by an interrupt service function responded to by the CPU, the CPU process is awakened from the deep sleep state to the normal working state; and a second file corresponding to the kernel lock is recreated, and when the second file is detected, the MIFI device performs normal work.
[0058] Opening the protocol stack for upgrade reporting includes: after calling the kernel interface to delete the timer, opening the protocol stack by sending a second serial port instruction, and performing upgrade reporting with TR069, so that the TR069 performs upgrade reporting with the cloud.
[0059] Step S13: When a system upgrade is required after the upgrade is reported, the MIFI device is upgraded with the support of the retained power.
[0060] Specifically, when the upgrade is reported to the cloud and there is a corresponding upgrade package in the cloud, if the MIFI device meets the upgrade conditions, the system of the MIFI device is upgraded with the support of the retained power; otherwise, the kernel lock is released and the device re-enters the deep sleep state to continue to retain power.
[0061] It is worth mentioning that the current of MIFI in normal use is between 200 and 300mA, and the current of MIFI device after sleep is 2mA, so that MIFI enters deep sleep state immediately when idle, which can greatly save energy consumption and effectively reduce the risk of missing upgrade requests due to low power.
[0062] As an optional embodiment, the MIFI device interacts with the upgrade platform (cloud) in a many-to-one relationship, and the upgrade platform manages the upgrade of all MIFI devices.
[0063] It is worth mentioning that since MIFI devices are passive devices with limited internal batteries, battery power is used every time a user connects. Compared with the amount of data requested by the user, the amount of data in the upgrade package of the MIFI device is much smaller. Therefore, power can be obtained through energy harvesting (Energy Harvesting) and stored in the battery. Since the energy collected is much less than the power when the user requests data, the collected energy is only used when the power of the MIFI device is lower than the power threshold and the power of the MIFI device is insufficient to support the upgrade of the MIFI device.
[0064] As a preferred embodiment, when a system upgrade is required after the upgrade is reported, and the power retained in the MIFI device is insufficient to support the upgrade of the MIFI device, in each transmission time slot of wireless information transmission, the energy carried in the data sent by the base station to the user is collected and stored in the battery. After several transmission time slots, the upgrade is performed when the sum of the power collected by the MIFI device and the remaining power reaches the power required for the upgrade and the power to maintain its own operation.
[0065] The present invention detects the user's connection status in real time. When there is no user connection, the idle MIFI device turns off the protocol stack, which can reduce the energy consumption overhead of responding to the base station signal. In the case of no user connection, the timer is started to enter the deep sleep state. The MIFI device in the deep sleep state can save power to the greatest extent, thereby effectively avoiding the situation that the upgrade failure occurs due to low power. When the timer reaches the wake-up time, the MIFI device in the deep sleep state is awakened. At this time, there is still no user connection. The protocol stack for communicating with the base station is opened to perform upgrade reporting and system upgrade. That is, the present invention enters the deep sleep state when there is no user connection, and the MIFI device enters the low-energy consumption mode to reduce energy consumption loss. At the same time, the system is upgraded, which staggers the time period when the user uses the MIFI device, thereby reducing the risk of missing the upgrade request.
[0066] Example 2
[0067] See also Figure 2 , is a flow chart of a complete MIFI upgrade method provided by an embodiment of the present invention. In step S200 of the figure, after the device is started, in step S211, it detects in real time whether there is a user connection, and immediately enters the sleep process if there is no user access, otherwise it continues to detect in step S211.
[0068] The specific sleep process includes: steps S200 to S209, specifically:
[0069] Step S201, releasing the kernel lock; wherein, the file flag of the kernel lock in the kernel is deleted, all processes are frozen, the CPU context is saved, and some peripherals are powered off.
[0070] It is worth noting that the power-off of peripherals should correspond to actual needs. According to actual needs, all peripherals can be powered off, or some peripherals can be powered off.
[0071] As a preferred embodiment, when the power level of the MIFI device is lower than a power threshold, all peripherals are powered off.
[0072] Step S202, closing the protocol stack; wherein, sending an at command to close the interaction of all protocols on the network side to reduce the power consumption of related modules.
[0073] Step S203: Acquire the reporting time of the TR069 platform; wherein the acquired reporting time is used to set the duration of the wake-up time of the timer.
[0074] As an optional embodiment, the instruction for obtaining the reporting time of the TR069 platform may be expressed as: "cfg_get_item(TR069BF_Period_Time, tr069_time, sizeof(tr069_time));".
[0075] Step S204, setting and starting the kernel RTC timer; wherein, the timer is a timer of the CPU peripheral resources, and the interrupt time is set at the same time as the timer is set. After the interrupt time is reached, the CPU will respond to the relevant interrupt service function, and a ring lock flag is created in the interrupt service to enable the frozen system process to work normally.
[0076] Exemplarily, the instruction to set and start the kernel RTC timer can be expressed as:
[0077] void rtc_time_init(void)
[0078] {
[0079] struct sigevent evp;
[0080] memset(&evp,0,sizeof(struct sigevent));
[0081] evp.sigev_value.sival_int=111; / /
[0082] evp.sigev_notify=SIGEV_THREAD; / /
[0083] evp.sigev_notify_function=timer_thread; / /
[0084] timer_create(CLOCKID,&evp,&timer_id);
[0085] }
[0086] void set_rtc_time(void)
[0087] {
[0088] it.it_interval.tv_sec=sleep_time; / /
[0089] it.it_interval.tv_nsec = 0;
[0090] it.it_value.tv_sec=sleep_time;
[0091] it.it_value.tv_nsec = 0;
[0092] timer_settime(timer_id,0,&it,NULL);
[0093] }".
[0094] As an optional embodiment, the duration of the interruption time is the same as the duration of the timer.
[0095] Step S215, determine whether the wake-up time has arrived. If the wake-up time has not arrived, continue waiting in step S215; otherwise, go to step S205.
[0096] Step S205, when the wake-up time is reached, add a wake-up lock; specifically, recreate the file corresponding to the kernel lock, and when the file is detected, the MIFI device works normally to prevent the system from being unable to perform normal data transmission under low power consumption.
[0097] For example, the instruction to add a wake-up lock can be expressed as:
[0098] "Ql_SLP_WakeLock_Lock(g_ql_lpm_wakelock_fd);".
[0099] Step S206, deleting the timer; specifically, calling the kernel interface to delete the CPU peripheral timer to prevent the timer interrupt from occurring again.
[0100] Exemplarily, the instruction to delete a timer may be represented as: “timer_delete(timer_id)”.
[0101] Step S207, turn off the flight mode and re-station the network; specifically, open the protocol stack, exchange data with the TR069 platform through the network module of the MIFI device to achieve normal network communication.
[0102] It is worth noting that the flight mode means that the MIFI device is in a deep sleep state, that is, it is unable to send and respond to data requests.
[0103] Exemplarily, the instruction to open the protocol stack may be represented as: “at(AT+CFUN=1)”.
[0104] Step S208, TR069 reporting.
[0105] Step S219: If there is an upgrade package in the cloud and the device meets the upgrade conditions, the MIFI device needs to be upgraded and the process goes to step S209; if there is no system upgrade package, the process goes back to step S201 and goes back to sleep.
[0106] Step S209: Upgrade the MIFI device.
[0107] The present invention detects the user's connection status in real time. When there is no user connection, the idle MIFI device turns off the protocol stack, which can reduce the energy consumption overhead of responding to the base station signal. In the case of no user connection, the timer is started to enter the deep sleep state. The MIFI device in the deep sleep state can save power to the greatest extent, thereby effectively avoiding the situation that the upgrade failure occurs due to low power. When the timer reaches the wake-up time, the MIFI device in the deep sleep state is awakened. At this time, there is still no user connection. The protocol stack for communicating with the base station is opened to perform upgrade reporting and system upgrade. That is, the present invention enters the deep sleep state when there is no user connection, and the MIFI device enters the low-energy consumption mode to reduce energy consumption loss. At the same time, the system is upgraded, which staggers the time period when the user uses the MIFI device, thereby reducing the risk of missing the upgrade request.
[0108] Example 3
[0109] See also Figure 3 , is a structural diagram of a MIFI upgrade system provided by an embodiment of the present invention, including: a detection unit 31, a wake-up unit 32 and an upgrade unit 33.
[0110] Among them, the detection unit 31 is used to detect in real time whether there is user access. Once there is no user access, the timer is started and enters a deep sleep state, and the state of the timer is transmitted to the wake-up unit 32; after the wake-up unit 32 receives the state of the timer, when the timer reaches the preset wake-up time, it wakes up the device so that the upgrade unit 33 can upgrade the awakened device.
[0111] The detection unit 31 is used to release the kernel lock and close the protocol stack when it is detected in real time that there is no user connection, and after starting a preset timer, enter a deep sleep state from a normal working state to allow the MIFI device to retain power for upgrading.
[0112] Real-time detection of no user connection includes: when the hardware GPIO pin state detected in real time is the same as the initial state, no user has made a USB connection through the USB interface; or, no user connection is found through the instruction through the wireless network.
[0113] Releasing the kernel lock includes: deleting a first file corresponding to the kernel lock, and when detecting that the first file does not exist, freezing all system processes, saving the context to a disk, and simultaneously powering off peripherals.
[0114] After closing the protocol stack and starting a preset timer, entering a deep sleep state from a normal working state includes: stopping responding to base station signals after terminating communications of multiple protocols on the network side by sending a first serial port instruction; and entering a deep sleep state from a normal working state after starting a preset Linux kernel timer; wherein the wake-up time of the Linux kernel timer is set according to the reporting time of the received TR069 after sending the first serial port instruction.
[0115] The wake-up unit 32 is used to re-lock the kernel when the timer reaches a preset wake-up time, wake up from the deep sleep state to the normal working state, and open the protocol stack for upgrade reporting.
[0116] When the timer reaches a preset wake-up time, the kernel lock is re-added, and the device is awakened from the deep sleep state to the normal working state, including: when the timer reaches a predetermined wake-up time, according to a ring lock identifier created by an interrupt service function responded to by the CPU, the CPU process is awakened from the deep sleep state to the normal working state; and a second file corresponding to the kernel lock is recreated, and when the second file is detected, the MIFI device performs normal work.
[0117] Opening the protocol stack for upgrade reporting includes: after calling the kernel interface to delete the timer, opening the protocol stack by sending a second serial port instruction, and performing upgrade reporting with TR069, so that the TR069 performs upgrade reporting with the cloud.
[0118] The upgrading unit 33 is used to upgrade the MIFI device with the support of the retained power when a system upgrade is required after the upgrade is reported.
[0119] Specifically, when the upgrade is reported to the cloud and there is a corresponding upgrade package in the cloud, if the MIFI device meets the upgrade conditions, the system of the MIFI device is upgraded with the support of the retained power; otherwise, the kernel lock is released and the device re-enters the deep sleep state to continue to retain power.
[0120] The present invention detects the user's connection status in real time. When there is no user connection, the idle MIFI device turns off the protocol stack, which can reduce the energy consumption overhead of responding to the base station signal. In the case of no user connection, the timer is started to enter the deep sleep state. The MIFI device in the deep sleep state can save power to the greatest extent, thereby effectively avoiding the situation that the upgrade failure occurs due to low power. When the timer reaches the wake-up time, the MIFI device in the deep sleep state is awakened. At this time, there is still no user connection. The protocol stack for communicating with the base station is opened to perform upgrade reporting and system upgrade. That is, the present invention enters the deep sleep state when there is no user connection, and the MIFI device enters the low-energy consumption mode to reduce energy consumption loss. At the same time, the system is upgraded, which staggers the time period when the user uses the MIFI device, thereby reducing the risk of missing the upgrade request.
[0121] Example 4
[0122] The present invention also provides a computer device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the MIFI upgrade method when executing the computer program.
[0123] Example 5
[0124] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for MIFI upgrading are implemented.
[0125] The present invention detects the user's connection status in real time. When there is no user connection, the idle MIFI device turns off the protocol stack, which can reduce the energy consumption overhead of responding to the base station signal. In the case of no user connection, the timer is started to enter the deep sleep state. The MIFI device in the deep sleep state can save power to the greatest extent, thereby effectively avoiding the situation that the upgrade failure occurs due to low power. When the timer reaches the wake-up time, the MIFI device in the deep sleep state is awakened. At this time, there is still no user connection. The protocol stack for communicating with the base station is opened to perform upgrade reporting and system upgrade. That is, the present invention enters the deep sleep state when there is no user connection, and the MIFI device enters the low-energy consumption mode to reduce energy consumption loss. At the same time, the system is upgraded, which staggers the time period when the user uses the MIFI device, thereby reducing the risk of missing the upgrade request.
[0126] Those skilled in the art will appreciate that the embodiments of the present application may also provide computer program products. Therefore, the present application may adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program codes.
[0127] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0128] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0129] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0130] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A MIFI upgrade method, It is characterized in that Applicable to MIFI devices, including: When no user connection is detected in real time, the kernel lock is released, the protocol stack is closed, and after starting a preset timer, the MIFI device enters a deep sleep state from a normal working state, so that the MIFI device retains power for upgrading; When the timer reaches the preset wake-up time, the kernel lock is re-added, the system is awakened from the deep sleep state to the normal working state, and the protocol stack is opened for upgrade reporting; wherein the timer is a Linux kernel timer, and the wake-up time of the Linux kernel timer is set according to the reporting time of the received TR069 after sending the first serial port instruction; When a system upgrade is required after the upgrade is reported, the MIFI device is upgraded with the support of the retained power; Wherein, releasing the kernel lock includes: The first file corresponding to the kernel lock is deleted. When it is detected that the first file does not exist, all system processes are frozen, and the context is saved to the disk, and the peripherals are powered off.
2. The MIFI upgrade method according to claim 1, It is characterized in that The shutting down of the protocol stack and starting a preset timer to enter a deep sleep state from a normal working state include: After terminating the communication of multiple protocols on the network side by sending the first serial port command, the response to the base station signal is stopped; After starting a preset Linux kernel timer, enter a deep sleep state from a normal working state; wherein, the wake-up time of the Linux kernel timer is set according to the reporting time sent by the TR069 platform after sending the first serial port instruction.
3. The MIFI upgrade method according to claim 1, It is characterized in that When the timer reaches a preset wake-up time, re-locking the kernel and waking up from the deep sleep state to the normal working state includes: When the timer reaches a predetermined wake-up time, the CPU process wakes up from the deep sleep state to the normal working state according to the ring lock identifier created by the interrupt service function responded by the CPU; A second file corresponding to the kernel lock is recreated, and when the second file is detected, the MIFI device performs normal operation.
4. The MIFI upgrade method according to claim 1, It is characterized in that The step of opening the protocol stack for upgrade reporting includes: After calling the kernel interface to delete the timer, the protocol stack is opened by sending a second serial port instruction, and the upgrade is reported to the TR069 platform, so that the TR069 platform and the cloud perform upgrade reporting.
5. The MIFI upgrade method according to claim 1, It is characterized in that When a system upgrade is required after the upgrade is reported, upgrading the MIFI device with the support of the retained power includes: When the upgrade is reported to the cloud and the corresponding upgrade package exists in the cloud, if the MIFI device meets the upgrade conditions, the system of the MIFI device is upgraded with the support of the retained power; Otherwise, the kernel lock is released and the system re-enters the deep sleep state to continue to conserve power.
6. The MIFI upgrade method according to claim 1, It is characterized in that The real-time detection of no user connection includes: When the hardware GPIO pin state detected in real time is the same as the initial state, no user has made a USB connection through the USB interface; Or, the instruction does not find out whether the user is connected through the wireless network.
7. A MIFI upgrade system, It is characterized in that Applicable to MIFI devices, including: The detection unit is used to release the kernel lock and close the protocol stack when it is detected in real time that there is no user connection, and after starting a preset timer, enter a deep sleep state from a normal working state, so that the MIFI device retains power for upgrading; A wake-up unit, used for re-adding the kernel lock when the timer reaches a preset wake-up time, waking up from the deep sleep state to the normal working state, and opening the protocol stack for upgrade reporting; wherein the timer is a Linux kernel timer, and the wake-up time of the Linux kernel timer is set according to the reporting time of the received TR069 after sending the first serial port instruction; An upgrade unit, used to upgrade the MIFI device with the support of the retained power when a system upgrade is required after the upgrade is reported; Wherein, releasing the kernel lock includes: The first file corresponding to the kernel lock is deleted. When it is detected that the first file does not exist, all system processes are frozen, and the context is saved to the disk, and the peripherals are powered off.
8. A computer device, wherein the computer device include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
