Firmware upgrading system, method and device, electronic equipment and storage medium
By introducing a collaborative working mechanism of servers, gateways and user equipment in the firmware upgrade system, and controlling them according to the firmware upgrade methods and conditions of user equipment, the problem of poor firmware upgrade flexibility in the existing technology is solved, and more efficient firmware upgrade management is achieved.
Patent Information
- Application Number
- CN202311371307.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-20
- Publication Date
- 2025-04-22
AI Technical Summary
The prior art cannot control and manage whether the user equipment is upgraded in firmware in firmware, resulting in poor flexibility in firmware upgrades.
By establishing a firmware upgrade system between the server, gateway and user equipment, the server decides whether to send an upgrade instruction based on the firmware upgrade method and conditions of the user equipment. The gateway sends the firmware to be upgraded to the user equipment, and the user equipment performs the firmware upgrade operation.
It realizes flexible control over the firmware upgrade of user equipment, selects whether to automatically upgrade according to user's actual needs, and can filter the user equipment for firmware upgrade, improving the flexibility of firmware upgrade.
Smart Images

Figure CN119861942A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a system, method, device, electronic device and storage medium for firmware upgrade. Background Art
[0002] In a firmware upgrade scenario, when a server releases a new firmware to be upgraded, it usually sends an upgrade instruction containing the firmware to be upgraded to all associated user devices. Each user device performs a firmware upgrade based on the firmware to be upgraded in the upgrade instruction.
[0003] However, in this way, all user devices associated with the server will all perform firmware upgrades at the same time, and it is impossible to control and manage whether the user devices perform firmware upgrades, and the flexibility of firmware upgrades is poor. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method, an apparatus, an electronic device, and a storage medium for firmware upgrading, so as to improve the flexibility of firmware upgrading when performing firmware upgrading.
[0005] On the one hand, an embodiment of the present application provides a system for firmware upgrade, including a server, a gateway, and a user device, wherein:
[0006] The server is configured to determine that when a first upgrade request sent by the gateway to the user equipment is received, based on the first upgrade request, obtain a firmware upgrade method of the user equipment; if it is determined that there is firmware to be upgraded and the firmware upgrade method is automatic upgrade, obtain a firmware upgrade condition set corresponding to the firmware to be upgraded; if it is determined that the user equipment meets the firmware upgrade condition, send a first upgrade instruction to the gateway;
[0007] The gateway is configured to obtain the firmware to be upgraded based on the first upgrade instruction when determining that the first upgrade instruction is received, and send the firmware to be upgraded to the user equipment;
[0008] The user equipment is used to perform a firmware upgrade operation based on the firmware to be upgraded.
[0009] In one implementation, the gateway is further used to: obtain a user equipment identifier of the user equipment, and send a first upgrade request including the user equipment identifier to the server;
[0010] The server is used to: obtain the user equipment identifier included in the first upgrade request, and obtain the firmware upgrade mode corresponding to the user equipment identifier.
[0011] In one implementation, the server is used to: obtain a firmware upgrade ratio corresponding to the firmware to be upgraded, determine an upgrade identification range based on the firmware upgrade ratio, and determine that the firmware upgrade condition is met if the user equipment identification is within the upgrade identification range.
[0012] In one implementation, the gateway is further configured to: determine a firmware installation mode of the user device based on the first upgrade instruction, and if the firmware installation mode is determined to be automatic installation, send the first installation instruction to the user device;
[0013] The user equipment is used to: determine that upon receiving the first installation instruction, perform a firmware upgrade based on the firmware to be upgraded.
[0014] In one embodiment, the system includes a control device having a firmware client installed;
[0015] The user equipment is used to: when determining that a second installation instruction sent by the firmware client is received, perform a firmware upgrade based on the firmware to be upgraded.
[0016] In one embodiment, the server is further configured to: if the firmware upgrade mode is non-automatic upgrade, send a firmware upgrade notification to the firmware client when it is determined that there is firmware to be upgraded, and send a second upgrade instruction to the gateway when it is determined that a second upgrade request returned by the firmware client based on the firmware upgrade notification is received;
[0017] The firmware client is used to: in response to a trigger operation of a user on a firmware upgrade notification, send a second upgrade request to the server;
[0018] The gateway is further used to: obtain the firmware to be upgraded based on the second upgrade instruction, and send the firmware to be upgraded and the third installation instruction to the user equipment;
[0019] The user equipment is used to perform firmware upgrade based on the firmware to be upgraded according to the third installation instruction.
[0020] On the one hand, an embodiment of the present application provides a method for firmware upgrade, including:
[0021] When determining that a first upgrade request sent by the gateway to the user equipment is received, acquiring a firmware upgrade method of the user equipment based on the first upgrade request;
[0022] If it is determined that there is firmware to be upgraded, and the firmware upgrade mode is automatic upgrade, then the firmware upgrade conditions corresponding to the firmware to be upgraded are obtained;
[0023] If it is determined that the user equipment meets the firmware upgrade condition, a first upgrade instruction is sent to the gateway, so that the gateway controls the user equipment to perform a firmware upgrade operation based on the firmware to be upgraded based on the first upgrade instruction.
[0024] In one implementation, obtaining a firmware upgrade method of a user device based on the first upgrade request includes:
[0025] Obtaining a user equipment identifier included in the first upgrade request;
[0026] Get the firmware upgrade method corresponding to the user device identifier.
[0027] In one implementation, determining that the user equipment meets the firmware upgrade condition includes:
[0028] Get the firmware upgrade ratio corresponding to the firmware to be upgraded;
[0029] Determine the upgrade identification range based on the firmware upgrade ratio;
[0030] If the user device identification is within the upgrade identification range, it is determined that the firmware upgrade conditions are met.
[0031] In one implementation, if it is determined that the user equipment meets the firmware upgrade condition, sending a first upgrade instruction to the gateway includes:
[0032] If it is determined that the user device meets the firmware upgrade conditions, the firmware installation mode corresponding to the user device identifier is obtained; the firmware installation mode is used to indicate whether to automatically install the firmware to be upgraded;
[0033] A first upgrade instruction including a firmware installation method and firmware to be upgraded is sent to the gateway.
[0034] In one embodiment, it further includes:
[0035] If the firmware upgrade mode is non-automatic upgrade, when it is determined that there is firmware to be upgraded, a firmware upgrade notification is sent to the firmware client;
[0036] When it is determined that a second upgrade request returned by the firmware client based on the firmware upgrade notification is received, a second upgrade instruction is sent to the gateway, so that the gateway controls the user equipment to perform a firmware upgrade operation based on the firmware to be upgraded based on the second upgrade instruction.
[0037] On the one hand, an embodiment of the present application provides a device for firmware upgrade, including:
[0038] A receiving unit, configured to obtain a firmware upgrade method of the user equipment based on the first upgrade request when determining that a first upgrade request sent by the gateway to the user equipment is received;
[0039] An acquisition unit, configured to acquire a firmware upgrade condition corresponding to the firmware to be upgraded if it is determined that there is firmware to be upgraded and the firmware upgrade mode is automatic upgrade;
[0040] The sending unit is used to send a first upgrade instruction to the gateway if it is determined that the user equipment meets the firmware upgrade conditions, so that the gateway controls the user equipment to perform a firmware upgrade operation based on the firmware to be upgraded based on the first upgrade instruction.
[0041] In one implementation, the receiving unit is used to:
[0042] Obtaining a user equipment identifier included in the first upgrade request;
[0043] Get the firmware upgrade method corresponding to the user device identifier.
[0044] In one implementation, the sending unit is used to:
[0045] Get the firmware upgrade ratio corresponding to the firmware to be upgraded;
[0046] Determine the upgrade identification range based on the firmware upgrade ratio;
[0047] If the user device identification is within the upgrade identification range, it is determined that the firmware upgrade conditions are met.
[0048] In one implementation, the sending unit is used to:
[0049] If it is determined that the user device meets the firmware upgrade conditions, the firmware installation mode corresponding to the user device identifier is obtained; the firmware installation mode is used to indicate whether to automatically install the firmware to be upgraded;
[0050] A first upgrade instruction including a firmware installation method and firmware to be upgraded is sent to the gateway.
[0051] In one implementation, the acquisition unit is further configured to:
[0052] If the firmware upgrade mode is non-automatic upgrade, when it is determined that there is firmware to be upgraded, a firmware upgrade notification is sent to the firmware client;
[0053] When it is determined that a second upgrade request returned by the firmware client based on the firmware upgrade notification is received, a second upgrade instruction is sent to the gateway, so that the gateway controls the user equipment to perform a firmware upgrade operation based on the firmware to be upgraded based on the second upgrade instruction.
[0054] On the one hand, an embodiment of the present application provides an electronic device, including:
[0055] Processor; and
[0056] The memory stores computer instructions, wherein the computer instructions are used to cause the processor to execute the steps of the method provided in any of the various optional implementations of the firmware upgrade described above.
[0057] On the one hand, an embodiment of the present application provides a storage medium storing computer instructions, which are used to enable a computer to execute the steps of the method provided in any of the various optional implementations of any of the above-mentioned firmware upgrades.
[0058] The firmware upgrade method in the embodiment of the present application includes determining that when a first upgrade request sent by the gateway to the user device is received, based on the first upgrade request, obtaining the firmware upgrade mode of the user device; if it is determined that there is firmware to be upgraded and the firmware upgrade mode is automatic upgrade, then obtaining the firmware upgrade conditions set corresponding to the firmware to be upgraded; if it is determined that the user device meets the firmware upgrade conditions, then sending a first upgrade instruction to the gateway, so that the gateway controls the user device based on the firmware to be upgraded based on the first upgrade instruction to perform a firmware upgrade operation. In this way, it is possible to choose whether to automatically upgrade according to the actual needs of the user, and it is possible to screen the user devices for firmware upgrade, thereby improving the flexibility of firmware upgrade. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0060] Figure 1 It is a schematic diagram of the architecture of a firmware upgrade system in an embodiment of the present application.
[0061] Figure 2 It is a flowchart of a firmware upgrade method in an embodiment of the present application.
[0062] Figure 3 It is a structural block diagram of a firmware upgrade device in an embodiment of the present application.
[0063] Figure 4 It is a structural schematic diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0064] The technical solution of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described implementation methods are part of the implementation methods of the present application, rather than all of the implementation methods. Based on the implementation methods in the present application, all other implementation methods obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In addition, the technical features involved in the different implementation methods of the present application described below can be combined with each other as long as they do not conflict with each other.
[0065] First, some terms involved in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.
[0066] Terminal device: can be a mobile terminal, a fixed terminal or a portable terminal, such as a mobile phone, a station, a unit, a device, a multimedia computer, a multimedia tablet, an Internet node, a communicator, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a personal communication system device, a personal navigation device, a personal digital assistant, an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an electronic book device, a gaming device or any combination thereof, including accessories and peripherals of these devices or any combination thereof. It is also foreseeable that the terminal device can support any type of interface for the user (such as a wearable device), etc.
[0067] Server: It can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, and big data and artificial intelligence platforms.
[0068] The embodiments of the present application provide a system, method, device, electronic device and storage medium for firmware upgrade, aiming to improve the flexibility of firmware upgrade when performing firmware upgrade.
[0069] See also Figure 1 , which is a schematic diagram of the architecture of a firmware upgrade system in an embodiment of the present application. Figure 1 The system includes a user device 101, a gateway 102 and a server 103. The user device 101 may be a terminal device, such as a lighting lamp, a switch and a socket, etc. The server 103 may be a cloud server.
[0070] As an example, the user device 101 may be a Bluetooth device. The gateway 102 may be a Bluetooth mesh gateway. The user device 101 and the gateway 102 may be applied to a Bluetooth mesh network, and may be applied to fields such as lighting, switches, and sensors. The Bluetooth mesh network is implemented based on the Bluetooth Low Energy (BLE) standard.
[0071] Optionally, the firmware upgrade system may further include a control device 104 and a router 105 installed with a firmware client. The control device 104 may be a terminal device such as a mobile phone. The firmware client is a client for a user to control the firmware upgrade of a user device.
[0072] In one implementation, the server 103 is configured to determine that when receiving a first upgrade request sent by the gateway 102 to the user device 101, based on the first upgrade request, obtain a firmware upgrade method of the user device 101; if it is determined that there is firmware to be upgraded and the firmware upgrade method is automatic upgrade, obtain a firmware upgrade condition corresponding to the firmware to be upgraded; if it is determined that the user device 101 meets the firmware upgrade condition, send a first upgrade instruction to the gateway 102;
[0073] The gateway 102 is configured to send a first upgrade request for the user device 101 to the server 103, and upon receiving a first upgrade instruction, obtain the firmware to be upgraded based on the first upgrade instruction, and send the firmware to be upgraded to the user device 101;
[0074] The user equipment 101 is used to perform a firmware upgrade operation based on the firmware to be upgraded.
[0075] As an example, the server 103 pre-stores the firmware upgrade mode of each user device 101. The firmware upgrade mode includes automatic upgrade and non-automatic upgrade.
[0076] In this way, the firmware upgrade mode and the firmware upgrade conditions can be used to screen whether the user device 101 performs a firmware upgrade. Only when the firmware upgrade mode of the user device 101 is automatic upgrade and the user device 101 meets the firmware upgrade conditions, the firmware to be upgraded will be sent to the user device 101 through the gateway 102. This allows flexible control of whether the user device 101 performs a firmware upgrade, thereby improving the user experience.
[0077] In one implementation, the gateway 102 is further configured to: obtain a user equipment identifier of the user equipment 101, and send a first upgrade request including the user equipment identifier to the server 103;
[0078] The server 103 is used to obtain the user equipment identifier included in the first upgrade request, and obtain the firmware upgrade mode corresponding to the user equipment identifier.
[0079] The user can pre-configure the firmware upgrade mode of the user device 101 by means of a firmware upgrade function switch, and send the user device identification and the firmware upgrade mode to the server 103. The server 103 associates and stores each user device identification and its corresponding firmware upgrade mode.
[0080] In this way, the firmware upgrade mode of each user device 101 can be pre-configured according to the actual needs of the user, and then the firmware upgrade mode of the user device 101 can be obtained through the user device identifier.
[0081] In one implementation, the server 103 is used to: obtain a firmware upgrade ratio corresponding to the firmware to be upgraded, determine an upgrade identification range according to the firmware upgrade ratio, and determine that the firmware upgrade condition is met if the user device identification is within the upgrade identification range.
[0082] As an example, assuming that the firmware upgrade ratio is 10%, the firmware upgrade condition is: the last digit of the user equipment identifier is 1. Therefore, if it is determined that the last digit of a user equipment identifier is 1, it is determined that the firmware upgrade condition is met.
[0083] In actual applications, the upgrade identification range and firmware upgrade conditions can be set according to actual application scenarios, and are not limited here. For example, an upgrade area corresponding to the firmware to be upgraded can also be determined. If it is determined that the user device 101 is located in the upgrade area, it is determined that the firmware upgrade conditions are met.
[0084] In one implementation, the gateway 102 is further configured to: determine the firmware installation mode of the user device 101 based on the first upgrade instruction, and if the firmware installation mode is determined to be automatic installation, send the first installation instruction to the user device 101;
[0085] The user equipment 101 is used to: determine that upon receiving the first installation instruction, perform a firmware upgrade based on the firmware to be upgraded.
[0086] As an example, the gateway 102 obtains the firmware installation mode included in the first upgrade instruction, and if it is determined that the firmware installation mode is automatic installation, the gateway 102 sends the firmware to be upgraded and the first installation instruction to the user device 101. When the user device 101 determines that the first installation instruction is received, the user device 101 performs a firmware upgrade based on the received firmware to be upgraded.
[0087] In one implementation, the gateway 102 obtains the firmware installation method included in the first upgrade instruction, and if it is determined that the firmware installation method is non-automatic installation, the gateway 102 stops the upgrade process after sending the firmware to be upgraded to the user equipment 101.
[0088] The user equipment 101 is used to: after receiving the firmware to be upgraded, when it is determined that a second installation instruction sent by the firmware client is received, perform firmware upgrade based on the firmware to be upgraded.
[0089] In the embodiment of the present application, the firmware installation mode includes automatic installation and non-automatic installation. The user can pre-configure the firmware installation mode to select whether to install automatically. If the firmware installation mode is automatic installation, the gateway 102 automatically controls the user device 101 to upgrade the firmware. Otherwise, based on the trigger operation of the user on the firmware client, the user device 101 is manually controlled to upgrade the firmware.
[0090] In one embodiment, the server 103 is further configured to: if the firmware upgrade mode is non-automatic upgrade, send a firmware upgrade notification to the firmware client when it is determined that there is firmware to be upgraded, and send a second upgrade instruction to the gateway 102 when it is determined that a second upgrade request returned by the firmware client based on the firmware upgrade notification is received;
[0091] The firmware client is used to: in response to a trigger operation of a user on a firmware upgrade notification, send a second upgrade request to the server 103;
[0092] The gateway 102 is further configured to: obtain the firmware to be upgraded based on the second upgrade instruction, and send a message including the firmware to be upgraded and a third installation instruction to the user equipment 101;
[0093] The user device 101 is configured to perform a firmware upgrade based on the firmware to be upgraded according to a third installation instruction.
[0094] Optionally, the server 103 may pre-store the contact information (e.g., firmware client address) of the firmware client corresponding to each user device 101, so as to send the firmware upgrade notification only to the firmware client corresponding to a specific user device 101, or to send the firmware upgrade notification to all firmware clients. After receiving the firmware upgrade notification through the firmware client, the user may perform a trigger operation for the firmware upgrade with respect to the firmware upgrade notification of the firmware client.
[0095] In this way, the user can set whether to automatically upgrade and choose whether the server 103 automatically upgrades the firmware of the user device 101 or upgrades the firmware of the user device 101 based on the upgrade instruction of the user through the firmware client.
[0096] In one implementation, the gateway 102 is a Bluetooth gateway, the user equipment 101 is a Bluetooth device, and data is transmitted between the gateway 102 and the user equipment 101 via the BLE protocol.
[0097] Furthermore, the data transmission progress and installation result of the firmware to be upgraded can also be viewed in real time through the firmware client, where the firmware client can be a mobile phone application (Application, APP).
[0098] In the embodiment of the present application, in the automatic upgrade scenario, the gateway 102 periodically queries the server 103 whether the user device 101 has upgradeable firmware. After the server 103 returns the firmware to be upgraded to the gateway 102, the gateway 102 transmits the firmware to be upgraded to the user device 101 through the 1:1 BLE connection established between the gateway 102 and the user device 101, and decides whether to install automatically or manually according to the firmware installation method returned by the server 103. Further, after the installation is completed, the gateway 102 uploads the firmware upgrade result to the server 103.
[0099] In the manual upgrade (i.e. non-automatic upgrade) scenario, the firmware upgrade is manually triggered through the firmware upgrade notification displayed by the firmware client. After receiving the second upgrade request from the firmware client, the server 103 sends a second upgrade instruction to the gateway 102. After receiving the second upgrade instruction, the gateway 102 transmits the firmware to be upgraded to the user device 101 through the one-to-one BLE connection established with the user device 101. The user device 101 receives the firmware to be upgraded and performs a firmware upgrade based on the firmware to be upgraded.
[0100] See also Figure 2 FIG. 1 is a flowchart of a method for firmware upgrade in an embodiment of the present application, which is applied to Figure 1 In the firmware upgrade system, the following combination Figure 1 and 2 The method is described below. The specific implementation process of the method is as follows:
[0101] Step 200: When the server determines that it has received a first upgrade request sent by a gateway to a user equipment, it obtains a firmware upgrade method of the user equipment based on the first upgrade request.
[0102] In one implementation, the gateway obtains the user equipment identifier of the user equipment, generates a first upgrade request based on the user equipment identifier, and periodically sends the first upgrade request to the server. The server obtains the user equipment identifier included in the first upgrade request, and obtains the firmware upgrade mode corresponding to the user equipment identifier.
[0103] The user equipment identifier may be a Bluetooth device number, which is used to identify the user equipment.
[0104] As an example, the first upgrade request may be: {"id":1234,"method":"_sync.ota_sync_update","params":{"did":"1234567890"}}. "id":1234 indicates that the message identifier of the first upgrade request is 1234. "method":"_sync.ota_sync_update", indicates that the purpose of the first upgrade request is firmware upgrade. "params":{"did":"1234567890"} indicates that the user device identifier is 1234567890.
[0105] In one application scenario, after being powered on, the gateway periodically (eg, at intervals of 4 hours) sends a first upgrade request to the server.
[0106] In this way, the firmware upgrade mode of the user device can be obtained based on the user device identifier to determine whether the automatic upgrade function is turned on in the user device.
[0107] Step 201: If it is determined that there is firmware to be upgraded, and the firmware upgrade mode is automatic upgrade, the server obtains the firmware upgrade conditions set corresponding to the firmware to be upgraded.
[0108] In one implementation, the same fixed firmware upgrade condition is set for all firmware to be upgraded.
[0109] In one implementation, corresponding firmware upgrade conditions are set for each firmware to be upgraded.
[0110] Furthermore, if the firmware upgrade mode is non-automatic upgrade, when the server determines that there is firmware to be upgraded, it sends a firmware upgrade notification to the firmware client, and when it determines that it has received a second upgrade request returned by the firmware client based on the firmware upgrade notification, it sends a second upgrade instruction to the gateway. The gateway controls the user device to perform a firmware upgrade operation based on the firmware to be upgraded based on the second upgrade instruction.
[0111] In this way, if the automatic upgrade function is not enabled on the user equipment, the automatic upgrade process is stopped so that the user can manually upgrade the firmware of the user equipment through the firmware client.
[0112] Step 202: If it is determined that the user equipment meets the firmware upgrade conditions, the server sends a first upgrade instruction to the gateway.
[0113] In one implementation, when determining that the user equipment meets the firmware upgrade conditions, the following steps may be taken:
[0114] S2021: Obtain a firmware upgrade ratio corresponding to the firmware to be upgraded.
[0115] S2022: Determine an upgrade identification range according to the firmware upgrade ratio.
[0116] S2023: If the user device identifier is within the upgrade identifier range, it is determined that the firmware upgrade condition is met.
[0117] As an example, assuming that the firmware upgrade ratio is 10%, if it is determined that the last digit of the user equipment identifier is 1, it is determined that the firmware upgrade condition is met.
[0118] In this way, after determining that there is a new version of firmware (i.e., firmware to be upgraded), it can be determined whether to continue the firmware upgrade by checking whether the user equipment identification is within the upgrade identification range. If the user equipment identification is not within the upgrade range, the upgrade process is stopped.
[0119] In one implementation, when sending the first upgrade instruction to the gateway, the following steps may be used:
[0120] If it is determined that the user device meets the firmware upgrade conditions, the firmware installation method corresponding to the setting of the user device identification is obtained; the firmware installation method is used to indicate whether to automatically install the firmware to be upgraded; and a first upgrade instruction including the firmware installation method and the firmware to be upgraded is sent to the gateway.
[0121] Step 203: The gateway controls the user equipment to perform a firmware upgrade operation based on the firmware to be upgraded based on the first upgrade instruction.
[0122] In one implementation, when executing step 203, any of the following methods may be used:
[0123] Mode 1: The gateway determines the firmware installation mode of the user device based on the first upgrade instruction, and if the firmware installation mode is determined to be automatic installation, sends the firmware to be upgraded and the first installation instruction to the user device. When the user device determines that it has received the first installation instruction and the firmware to be upgraded, it performs a firmware upgrade based on the firmware to be upgraded.
[0124] Mode 2: The gateway determines the firmware installation mode of the user device based on the first upgrade instruction, and if the firmware installation mode is determined to be non-automatic installation, sends the firmware to be upgraded to the user device. When the user device determines that it has received the second installation instruction sent by the firmware client, it performs a firmware upgrade based on the firmware to be upgraded.
[0125] In one implementation, the gateway sends data such as firmware to be upgraded to the user device via the BLE protocol.
[0126] In this way, after the gateway sends the firmware to be upgraded to the user device, if the firmware installation mode is automatic installation, the gateway controls the user device firmware upgrade through the first installation instruction, otherwise, the gateway exits the firmware upgrade process. The user device waits for the user to manually trigger the firmware installation operation, and when it is determined that the second installation instruction sent by the user through the firmware client is received, the firmware upgrade is performed.
[0127] In the embodiment of the present application, whether to automatically upgrade and whether to automatically install can be personalized according to the actual needs of the user, so that the timing of firmware upgrade can be selected, which improves the user experience; furthermore, the firmware upgrade conditions can be used to upgrade the firmware only for some user devices, so that when firmware problems exist in the early stage, they can be handled in time, reducing the impact of firmware problems, improving the maintainability of firmware upgrades, and improving the flexibility of firmware upgrade management.
[0128] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0129] Based on the same inventive concept, a device for firmware upgrade is also provided in the embodiment of the present application. Since the principle of solving the problem by the above device and equipment is similar to that of a method for firmware upgrade, the implementation of the above device can refer to the implementation of the method, and the repeated parts will not be repeated. The device can be applied to electronic devices. The present application does not limit the type of electronic devices. It can be any type of device suitable for implementation, such as terminal devices and servers, etc., and the present application will not repeat them.
[0130] See also Figure 3 , which is a structural block diagram of a device for firmware upgrade in an embodiment of the present application. In some implementations, the device for firmware upgrade in the present application example includes:
[0131] The receiving unit 301 is configured to obtain a firmware upgrade method of the user equipment based on the first upgrade request when determining that a first upgrade request sent by the gateway to the user equipment is received;
[0132] The acquisition unit 302 is used to acquire the firmware upgrade condition corresponding to the firmware to be upgraded if it is determined that there is firmware to be upgraded and the firmware upgrade mode is automatic upgrade;
[0133] The sending unit 303 is configured to send a first upgrade instruction to the gateway if it is determined that the user equipment meets the firmware upgrade condition, so that the gateway controls the user equipment to perform a firmware upgrade operation based on the firmware to be upgraded based on the first upgrade instruction.
[0134] In one implementation, the receiving unit 301 is used to:
[0135] Obtaining a user equipment identifier included in the first upgrade request;
[0136] Get the firmware upgrade method corresponding to the user device identifier.
[0137] In one implementation, the sending unit 303 is configured to:
[0138] Get the firmware upgrade ratio corresponding to the firmware to be upgraded;
[0139] Determine the upgrade identification range based on the firmware upgrade ratio;
[0140] If the user device identification is within the upgrade identification range, it is determined that the firmware upgrade conditions are met.
[0141] In one implementation, the sending unit 303 is configured to:
[0142] If it is determined that the user device meets the firmware upgrade conditions, the firmware installation mode corresponding to the user device identifier is obtained; the firmware installation mode is used to indicate whether to automatically install the firmware to be upgraded;
[0143] A first upgrade instruction including a firmware installation method and firmware to be upgraded is sent to the gateway.
[0144] In one implementation, the acquiring unit 302 is further configured to:
[0145] If the firmware upgrade mode is non-automatic upgrade, when it is determined that there is firmware to be upgraded, a firmware upgrade notification is sent to the firmware client;
[0146] When it is determined that a second upgrade request returned by the firmware client based on the firmware upgrade notification is received, a second upgrade instruction is sent to the gateway, so that the gateway controls the user equipment to perform a firmware upgrade operation based on the firmware to be upgraded based on the second upgrade instruction.
[0147] The firmware upgrade method in the embodiment of the present application includes determining that when a first upgrade request sent by the gateway to the user device is received, based on the first upgrade request, obtaining the firmware upgrade mode of the user device; if it is determined that there is firmware to be upgraded and the firmware upgrade mode is automatic upgrade, then obtaining the firmware upgrade conditions set corresponding to the firmware to be upgraded; if it is determined that the user device meets the firmware upgrade conditions, then sending a first upgrade instruction to the gateway, so that the gateway controls the user device based on the firmware to be upgraded based on the first upgrade instruction to perform a firmware upgrade operation. In this way, it is possible to choose whether to automatically upgrade according to the actual needs of the user, and it is possible to screen the user devices for firmware upgrade, thereby improving the flexibility of firmware upgrade.
[0148] In an embodiment of the present application, an electronic device is provided, including:
[0149] Processor; and
[0150] The memory stores computer instructions, where the computer instructions are used to enable the processor to execute the method of any of the above embodiments.
[0151] In an embodiment of the present application, a storage medium is provided, which stores computer instructions, and the computer instructions are used to enable a computer to execute a method in any of the above-mentioned embodiments. Figure 4 FIG. 4 is a schematic diagram showing the structure of an electronic device 4000. Figure 4As shown, the electronic device 4000 includes: a processor 4010 and a memory 4020 , and optionally, may also include a power supply 4030 , a display unit 4040 , and an input unit 4050 .
[0152] Processor 4010 is the control center of electronic device 4000. It connects various components using various interfaces and lines, and performs various functions of electronic device 4000 by running or executing software programs and / or data stored in memory 4020, thereby monitoring electronic device 4000 as a whole.
[0153] In the embodiment of the present application, the processor 4010 executes the various steps in the above embodiment when calling the computer program stored in the memory 4020.
[0154] Optionally, the processor 4010 may include one or more processing units; preferably, the processor 4010 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and applications, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 4010. In some embodiments, the processor and the memory may be implemented on a single chip, and in some embodiments, they may also be implemented separately on separate chips.
[0155] The memory 4020 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, various applications, etc.; the data storage area may store data created according to the use of the electronic device 4000, etc. In addition, the memory 4020 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices, etc.
[0156] The electronic device 4000 also includes a power source 4030 (such as a battery) for supplying power to various components. The power source can be logically connected to the processor 4010 through a power management system, thereby managing functions such as charging, discharging, and power consumption through the power management system.
[0157] The display unit 4040 may be used to display information input by the user or information provided to the user and various menus of the electronic device 4000, and in the embodiment of the present application, is mainly used to display the display interface of each application in the electronic device 4000 and objects such as text and pictures displayed in the display interface. The display unit 4040 may include a display panel 4041. The display panel 4041 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0158] The input unit 4050 may be used to receive information such as numbers or characters input by the user. The input unit 4050 may include a touch panel 4051 and other input devices 4052. The touch panel 4051, also known as a touch screen, may collect touch operations of the user on or near it (such as operations performed by the user using a finger, a stylus, or any other suitable object or firmware on or near the touch panel 4051).
[0159] Specifically, the touch panel 4051 can detect the user's touch operation, detect the signal brought by the touch operation, convert these signals into touch point coordinates, send them to the processor 4010, and receive and execute the command sent by the processor 4010. In addition, the touch panel 4051 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. Other input devices 4052 can include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, power on / off keys, etc.), a trackball, a mouse, a joystick, etc.
[0160] Of course, the touch panel 4051 can cover the display panel 4041. When the touch panel 4051 detects a touch operation on or near it, it is transmitted to the processor 4010 to determine the type of touch event, and then the processor 4010 provides corresponding visual output on the display panel 4041 according to the type of touch event. Figure 4 In the embodiment, the touch panel 4051 and the display panel 4041 are used as two independent components to realize the input and output functions of the electronic device 4000, but in some embodiments, the touch panel 4051 and the display panel 4041 can be integrated to realize the input and output functions of the electronic device 4000.
[0161] The electronic device 4000 may also include one or more sensors, such as a pressure sensor, a gravity acceleration sensor, a proximity light sensor, etc. Of course, according to the needs of specific applications, the electronic device 4000 may also include other components such as a camera. Since these components are not the key components used in the embodiments of the present application, Figure 4 It is not shown and will not be described in detail.
[0162] Those skilled in the art will understand that Figure 4 The electronic device is merely an example and does not limit the electronic device, and may include more or less components than those shown in the figure, or may combine certain components, or may include different components.
[0163] For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Of course, when implementing this application, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.
[0164] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the embodiments. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. The obvious changes or modifications derived therefrom are still within the scope of protection created by this application.
Claims
1. A system for firmware upgrade, characterized in that: It includes servers, gateways and user equipment, among which: The server is configured to determine that when receiving a first upgrade request sent by the gateway to the user equipment, based on the first upgrade request, obtain a firmware upgrade mode of the user equipment; if it is determined that there is firmware to be upgraded and the firmware upgrade mode is automatic upgrade, obtain a firmware upgrade condition set corresponding to the firmware to be upgraded; if it is determined that the user equipment meets the firmware upgrade condition, send a first upgrade instruction to the gateway; The gateway is configured to obtain the firmware to be upgraded based on the first upgrade instruction when determining that the first upgrade instruction is received, and send the firmware to be upgraded to the user equipment; The user equipment is used to perform a firmware upgrade operation based on the firmware to be upgraded.
2. The system according to claim 1, characterized in that The gateway is further used to: obtain a user equipment identifier of the user equipment, and send the first upgrade request including the user equipment identifier to the server; The server is used to: obtain the user equipment identification included in the first upgrade request, and obtain the firmware upgrade mode corresponding to the user equipment identification.
3. The system according to claim 2, characterized in that The server is used to: obtain a firmware upgrade ratio corresponding to the firmware to be upgraded, and determine an upgrade identification range according to the firmware upgrade ratio, and if the user equipment identifier is within the upgrade identification range, determine that the firmware upgrade condition is met.
4. The system according to any one of claims 1 to 3, characterized in that: The gateway is further configured to: determine a firmware installation mode of the user equipment based on the first upgrade instruction, and if it is determined that the firmware installation mode is automatic installation, send a first installation instruction to the user equipment; The user equipment is used to: determine to perform firmware upgrade based on the firmware to be upgraded when receiving the first installation instruction.
5. The system according to claim 4, characterized in that The system includes a control device having a firmware client installed thereon; The user equipment is used to: when determining that a second installation instruction sent by the firmware client is received, perform firmware upgrade based on the firmware to be upgraded.
6. The system according to claim 5, characterized in that The server is further configured to: if the firmware upgrade mode is non-automatic upgrade, send a firmware upgrade notification to the firmware client when it is determined that the firmware to be upgraded exists, and send a second upgrade instruction to the gateway when it is determined that a second upgrade request returned by the firmware client based on the firmware upgrade notification is received; The firmware client is used to: in response to a trigger operation of the user on the firmware upgrade notification, send the second upgrade request to the server; The gateway is further configured to: obtain the firmware to be upgraded based on the second upgrade instruction, and send the firmware to be upgraded and a third installation instruction to the user equipment; The user equipment is used to perform firmware upgrade based on the firmware to be upgraded according to the third installation instruction.
7. A method for upgrading device firmware, characterized in that: include: When determining that a first upgrade request sent by the gateway to the user equipment is received, acquiring a firmware upgrade method of the user equipment based on the first upgrade request; If it is determined that there is firmware to be upgraded, and the firmware upgrade mode is automatic upgrade, then the firmware upgrade condition corresponding to the firmware to be upgraded is obtained; If it is determined that the user equipment meets the firmware upgrade condition, a first upgrade instruction is sent to the gateway, so that the gateway controls the user equipment to perform a firmware upgrade operation based on the firmware to be upgraded based on the first upgrade instruction.
8. The method according to claim 7, characterized in that The acquiring, based on the first upgrade request, a firmware upgrade method of the user equipment includes: Obtaining a user equipment identifier included in the first upgrade request; Obtain a firmware upgrade method corresponding to the setting of the user equipment identifier.
9. The method according to claim 7 or 8, characterized in that: The determining that the user equipment meets the firmware upgrade condition includes: Obtaining a firmware upgrade ratio corresponding to the firmware to be upgraded; Determine the upgrade identification range according to the firmware upgrade ratio; If the user equipment identifier is within the upgrade identifier range, it is determined that the firmware upgrade condition is met.
10. The method according to claim 7 or 8, characterized in that: If it is determined that the user equipment meets the firmware upgrade condition, sending a first upgrade instruction to the gateway includes: If it is determined that the user equipment meets the firmware upgrade condition, obtaining the firmware installation mode corresponding to the setting of the user equipment identifier; the firmware installation mode is used to indicate whether to automatically install the firmware to be upgraded; A first upgrade instruction including the firmware installation method and the firmware to be upgraded is sent to the gateway.
11. The method according to claim 7 or 8, characterized in that: The method further comprises: If the firmware upgrade mode is non-automatic upgrade, when it is determined that there is the firmware to be upgraded, a firmware upgrade notification is sent to the firmware client; When it is determined that a second upgrade request returned by the firmware client based on the firmware upgrade notification is received, a second upgrade instruction is sent to the gateway, so that the gateway controls the user equipment to perform a firmware upgrade operation based on the firmware to be upgraded based on the second upgrade instruction.
12. A device for firmware upgrade, characterized in that: The device comprises: A receiving unit, configured to obtain a firmware upgrade mode of the user equipment based on the first upgrade request when determining that a first upgrade request sent by the gateway to the user equipment is received; an acquisition unit, configured to acquire a firmware upgrade condition corresponding to the firmware to be upgraded if it is determined that there is firmware to be upgraded and the firmware upgrade mode is automatic upgrade; The sending unit is used to send a first upgrade instruction to the gateway if it is determined that the user equipment meets the firmware upgrade condition, so that the gateway controls the user equipment to perform a firmware upgrade operation based on the firmware to be upgraded based on the first upgrade instruction.
13. An electronic device, characterized in that: include: processor; as well as A memory storing computer instructions, wherein the computer instructions are used to enable the processor to execute the method according to any one of claims 7 to 11.
14. A storage medium, characterized in that: Computer instructions are stored, and the computer instructions are used to make a computer execute the method according to any one of claims 7 to 11.