A method, apparatus, electronic device, and medium for upgrading device software versions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG UNIVIEW TECH CO LTD
- Filing Date
- 2024-12-27
- Publication Date
- 2026-06-30
AI Technical Summary
Upgrading device software within a local area network requires connecting to a desktop computer and using the public network, which is inconvenient and susceptible to environmental influences, making it difficult to achieve convenient and real-time upgrades.
The mobile terminal automated upgrade method utilizes local storage pools and wireless LANs to monitor device software versions in real time and upgrade by obtaining the latest version data through the mobile communication network, without the need for manual network switching.
It enables convenient and real-time upgrades of device software, avoiding dependence on desktop computers and network environment limitations, and improving the real-time nature and convenience of upgrades.
Smart Images

Figure CN122308855A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and medium for upgrading device software versions. Background Technology
[0002] Currently, many projects utilize local area network (LAN) devices. Within a relatively small geographical area, a group of devices are connected via a transmission medium, enabling them to communicate and share resources with each other, supported by network software. LANs offer significantly higher transmission speeds than wide area networks (WANs), and are therefore widely used.
[0003] However, since the device is located within a local area network (LAN), software upgrades require a desktop computer, which in turn needs a public network connection. Desktop devices are bulky and difficult to move and operate. Connecting a desktop to the public network also requires a network cable and other hardware support, making it cumbersome and highly susceptible to environmental factors. Summary of the Invention
[0004] This application provides a method, apparatus, electronic device, and medium for upgrading device software, enabling automatic upgrades via a portable mobile terminal without requiring manual switching of the mobile terminal's network.
[0005] According to one aspect of this application, a method for upgrading device software is provided, the method comprising:
[0006] Select the target device from the registered devices registered in the device management application, and determine the device identifier of the selected target device;
[0007] The latest version of the software data can be obtained from the local storage pool, or the latest version of the software data can be obtained from the cloud server through the mobile communication network based on the mobile terminal network information of the mobile terminal obtained from the local storage pool.
[0008] If it is determined that the target device's software needs to be updated based on the current software version of the target device updated in real time in the local storage pool and the latest version software data, then the latest version software data is sent to the target device via a wireless local area network to perform the software update, based on the mobile terminal network information obtained from the local storage pool and the target device network information of the target device.
[0009] According to one aspect of this application, a device software version upgrade apparatus is provided, the apparatus comprising:
[0010] The target device selection module is used to select a target device from the registered devices registered in the device management application and determine the device identifier of the selected target device;
[0011] The latest version software data acquisition module is used to acquire the latest version software data from a local storage pool, or to acquire the latest version software data from a cloud server via a mobile communication network based on the mobile terminal network information of the mobile terminal acquired from the local storage pool.
[0012] The update module is configured to, if it is determined that the software of the target device needs to be updated based on the current software version of the target device updated in real time in the local storage pool and the latest version software data, send the latest version software data to the target device via a wireless local area network to perform a software update, based on the mobile terminal network information obtained from the local storage pool and the target device network information of the target device.
[0013] According to another aspect of this application, an electronic device is provided, the electronic device comprising:
[0014] At least one processor; and
[0015] A memory that is communicatively connected to at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by at least one processor, which enables the at least one processor to perform the device software version upgrade method of any embodiment of this application.
[0017] According to another aspect of this application, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement the device software version upgrade method of any embodiment of this application.
[0018] The technical solution of this application embodiment is applied to a mobile terminal, which has a device management application installed. The method includes: selecting a target device from registered devices registered in the device management application and determining the device identifier of the selected target device; obtaining the latest version software data from a local storage pool, or obtaining the latest version software data from a cloud server via a mobile communication network based on the mobile terminal network information of the mobile terminal obtained from the local storage pool; if it is determined that the software of the target device needs to be updated based on the current software version of the target device updated in real time in the local storage pool and the latest version software data, then sending the latest version software data to the target device via a wireless local area network to perform a software update based on the mobile terminal network information obtained from the local storage pool and the target device network information of the target device. The above solution can monitor the software version of the target device through the software version information managed in the local storage pool and determine whether an update is needed, improving the real-time performance and convenience of software version monitoring. It achieves device software upgrades based on adaptive network switching of the mobile terminal, eliminating the need for carrying other desktop devices and being unrestricted by the network environment, thus enabling real-time software upgrades.
[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 A flowchart illustrating a device software version upgrade method provided in this application embodiment;
[0022] Figure 2 A flowchart illustrating a device software version upgrade method provided in another embodiment of this application;
[0023] Figure 3 A flowchart illustrating a device software version upgrade method provided in another embodiment of this application;
[0024] Figure 4 A flowchart illustrating a device software version upgrade method provided in another embodiment of this application.
[0025] Figure 5A signaling diagram for one specific implementation of this application;
[0026] Figure 6 A schematic diagram of a device software version upgrade apparatus provided in this application embodiment;
[0027] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0028] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0029] It should be noted that the terms "first," "second," "third," "fourth," "actual," "preset," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0030] Figure 1 This flowchart illustrates a device software version upgrade method provided in an embodiment of this application. This embodiment is applicable to upgrading the software version of devices within a local area network (LAN). The method can be executed by a device software version upgrade device, which can be implemented in hardware and / or software. This device can be configured in an electronic device, such as a mobile terminal, like a mobile phone, smart tablet, or smart wearable device. This mobile terminal can connect to a wireless local area network (WLAN) or a mobile communication network. Figure 1 As shown, the method includes:
[0031] S110. Select a target device from the registered devices registered in the device management application, and obtain the current software version and device identifier of the target device.
[0032] The device management application is installed on the mobile terminal and is used to manage devices located on the same local area network as the mobile terminal. The type of device is not limited; for example, it can be an image capture device, smart home device, smart sensor device, smart wearable device, etc. Devices can be registered in the device management application, thereby allowing management of each device through the application. Registered devices are those registered in the device management application. The registered devices selected in the registration list that require software upgrades are the target devices, and the number of target devices is less than or equal to the number of registered devices. The current software version is the version of the software installed on the current target device. The device identifier is unique information that identifies the device, such as the device's product serial number, serial number, model, etc. The software involved in this embodiment can include conventional software or firmware.
[0033] For example, a device management application can display a visual interface on a mobile terminal, showing information about each registered device in the application. Users can select a target device from the registered devices on the visual interface to perform software version checks and upgrades on that target device. The device management application can also periodically select target devices from the registered devices for software version checks and upgrades. For instance, if the device management application contains registered devices 1-16, it can first select registered devices 1-4 as target devices for checks and upgrades, then select registered devices 5-8, and so on, until all 16 registered devices have been checked. At the start of the next check cycle, the process of selecting target devices for software checks and upgrades begins again.
[0034] For the target device, a communication connection can be established to obtain the current software version of the software currently installed on the target device. The device identifier can be obtained from the target device, or it can be added to the device management application when the target device registers with it, and then the device identifier can be obtained from the device management application. The current software version of the target device can be obtained in real-time after selection, or the current software versions and device identifiers of each registered device can be pre-obtained and stored, and then, after the target device is determined, the current software version and device identifier of the target device can be obtained from the stored current software versions and device identifiers of the registered devices.
[0035] S120. Obtain the latest version software data from the local storage pool, or obtain the latest version software data from the cloud server via the mobile communication network based on the mobile terminal network information of the mobile terminal obtained from the local storage pool.
[0036] For example, during a previous update, the latest version of the software data may have already been obtained and stored in a local storage pool. If the software version is no longer updated, the local storage pool will contain the latest version of the software data, so the latest version of the software data can be retrieved from the local storage pool. Alternatively, the latest version of the software data can be retrieved from a cloud server in real time.
[0037] The process of retrieving the latest version of software data from the cloud server in real time involves sending the latest software version currently stored in the local storage pool, and / or the current software version and device identifier of the target device, to the cloud server. If the cloud server determines that the latest version of software data needs to be returned based on the latest software version currently stored in the local storage pool and / or the current software version and device identifier of the target device sent by the mobile terminal, it returns the latest version of software data to the mobile terminal via the mobile communication network. The mobile terminal receives the latest version of software data returned by the cloud server. Specifically, the mobile terminal's network information is retrieved from the local storage pool. This network information reflects the network information corresponding to the mobile terminal's interaction with other devices using the mobile communication network. Since communication between the mobile terminal and the cloud server requires interaction via the mobile communication network, the mobile terminal's network information can be obtained. Based on this information, communication with the cloud server is achieved via the mobile communication network to retrieve the latest version of software data from the cloud server. The above solution can obtain the mobile terminal network information in advance and store it in the local storage pool. When it is necessary to use the mobile communication network for communication, it can select and switch the network based on the mobile terminal network information. It provides a detailed and practical solution for network selection and switching, which can efficiently and quickly achieve the selection and switching of mobile communication networks.
[0038] For example, if the cloud server determines that the current software version of the target device is consistent with the latest software version, indicating that the software on the target device does not need to be upgraded, it returns a message to the mobile terminal stating that no upgrade is needed. Alternatively, if the cloud server determines that the latest version of the software data stored in the local storage pool is already the latest version, it returns a message stating that the latest version of the software data is the latest version.
[0039] S130. If it is determined that the software of the target device needs to be updated based on the current software version of the target device updated in real time in the local storage pool and the latest version software data, then the latest version software data is sent to the target device via a wireless local area network to perform a software update based on the mobile terminal network information obtained from the local storage pool and the target device network information of the target device.
[0040] The target device's network information refers to the parameters used by the target device when establishing a network connection, such as IP address, subnet mask, and gateway. This network information can be obtained by accessing the target device's network interface card (NIC). Alternatively, the target device's network information can be obtained in real-time after the target device is identified, or a communication connection can be established beforehand with each registered device to obtain and store their registered network information. After identifying the target device, its network information can then be retrieved from the stored registered device network information.
[0041] In this embodiment, the current software version of the target device in the local storage pool is updated in real time. This means that each device can be detected in real time at a preset frequency to obtain the accurate current software version. Since the target device may have already updated its software through other means, and its current software version is already the latest version, if the current software version in the local storage pool is not updated in real time, it will still store the version before the target device's update, which is inaccurate. If the need to update the target device is still determined based on the inaccurate current software version, or if an update is performed directly after obtaining the latest software version data without any further judgment, it will lead to duplicate updates and wasted resources. The solution in this embodiment is to obtain the accurate current software version from the local storage pool in real time. After obtaining the latest software version data, the system determines whether the target device needs to update based on the accurate current software version in the local storage pool and the latest software version data, thereby more accurately determining the current software version of the target device. If an update is actually needed, the target device is then updated.
[0042] Specifically, during the software update process of the target device, since the target device and the mobile terminal are on the same local area network (LAN), the network information of the mobile terminal and the target device can be obtained from the local storage pool. The latest version of the software data is then sent to the target device via the wireless LAN, thereby enabling the switching and selection of the wireless LAN. This embodiment manages the network information of the mobile terminal and the target device through a local storage pool. When switching to a wireless LAN is required, the switching is performed based on the network information of the mobile terminal and the target device. This provides a detailed and practical solution for network switching and selection, enabling efficient and rapid selection and switching of mobile communication networks.
[0043] The technical solution of this application embodiment is applied to a mobile terminal, which has a device management application installed. The method includes: selecting a target device from registered devices registered in the device management application and determining the device identifier of the selected target device; obtaining the latest version software data from a local storage pool, or obtaining the latest version software data from a cloud server via a mobile communication network based on the mobile terminal network information of the mobile terminal obtained from the local storage pool; if it is determined that the software of the target device needs to be updated based on the current software version of the target device updated in real time in the local storage pool and the latest version software data, then sending the latest version software data to the target device via a wireless local area network to perform a software update based on the mobile terminal network information obtained from the local storage pool and the target device network information of the target device. The above solution can monitor the software version of the target device through the software version information managed in the local storage pool and determine whether an update is needed, improving the real-time performance and convenience of software version monitoring. It achieves device software upgrades based on adaptive network switching of the mobile terminal, eliminating the need for carrying other desktop devices and being unrestricted by the network environment, thus enabling real-time software upgrades.
[0044] In this embodiment of the application, if the target device is a newly added target device, after determining the device identifier of the selected target device, the method further includes:
[0045] Query the local storage pool for the latest software versions of other devices that are already stored;
[0046] If the current software version of the newly added target device is the same as the latest software version, then it is determined that the current software version of the newly added target device does not need to be updated;
[0047] If the current software version of the newly added target device is lower than the latest software version, the latest version software data is obtained from the local storage pool, or the latest version software data is obtained from the cloud server through the mobile communication network based on the mobile terminal network information of the mobile terminal obtained from the local storage pool.
[0048] For example, if a new target device is detected during the process of obtaining device identifiers and current software versions of various devices from the local storage pool, the latest software versions of other devices already stored in the local storage pool can be queried. If the current software version of the new target device is the same as the latest software version, it is determined that the new target device and its current software version do not need to be updated. If the current software version of the new target device is lower than the latest software version, the latest version of the software data is obtained from the local storage pool, or the latest version of the software data is obtained from the cloud server via the mobile communication network based on the mobile terminal network information obtained from the local storage pool, and the subsequent software update process is executed. The process of determining the latest software version of other devices can be as follows: if a device has previously undergone a software version update process as a target device, it can be marked in the local storage pool with the updated current software version and update time. For all devices in the local storage pool, the highest version among all current software versions of all devices is taken as the latest software version, or the current software version of the device with the latest update time is taken as the highest software version. The above solution can determine and implement software upgrades for newly added target devices through a local storage pool, reducing interaction with cloud servers and avoiding unnecessary bandwidth consumption.
[0049] Figure 2 This is a flowchart illustrating a device software version upgrade method according to another embodiment of this application. This embodiment is an optimization based on the above embodiment; solutions not described in detail in this embodiment are found in the above embodiment. Figure 2 As shown, the method in this embodiment of the application specifically includes the following steps:
[0050] S210. Select a target device from the registered devices registered in the device management application, and determine the device identifier of the selected target device.
[0051] S220. Based on the mobile terminal network information of the mobile terminal obtained from the local storage pool, send the latest software version of the latest version software data currently stored in the local storage pool, and / or the current software version of the target device and the device identifier to the cloud server through the mobile communication network; wherein, the current software version of the target device is queried from the local storage pool based on the device identifier of the target device.
[0052] S230: When the cloud server determines that it needs to return the latest version of the software data based on the latest version of the software data currently stored in the local storage pool, and / or the current software version of the target device and the device identifier, the latest version of the software data in the cloud server is downloaded to the local storage pool via the mobile communication network.
[0053] The mobile terminal network information refers to the parameters used by the mobile terminal when establishing a network connection, such as IP address, subnet mask, and gateway. This information can be obtained by accessing the mobile terminal's network interface card (NIC). The mobile terminal network information can be obtained in real-time after the target device is identified, or it can be pre-acquired and stored. A mobile communication network is a communication network that transmits data via radio waves, consisting of mobile stations, base stations, and mobile switching centers, such as 4G and 5G networks.
[0054] In a closed network, mobile terminals can only connect to cloud servers via mobile communication networks. In this embodiment, during the interaction phase between the mobile terminal and the cloud server, the mobile terminal automatically sends the latest software version of the latest version of the software data currently stored in its local storage pool, and / or the current software version and device identifier of the target device to the cloud server via the mobile communication network. This allows the cloud server to determine whether the software on the target device needs an upgrade based on the latest software version of the latest version of the software data currently stored in its local storage pool, and / or the current software version and device identifier of the target device. If an upgrade is needed, the cloud server also returns the latest version of the software data to the mobile terminal via the mobile communication network for the target device to upgrade. This solution automatically sends information to the cloud server via the mobile communication network during the interaction phase, enabling information transmission via a portable mobile terminal even in a closed network. This solves the problems of desktop computers being inconvenient to carry and requiring a wired connection to the public network, which is inconvenient and susceptible to environmental influences.
[0055] Specifically, if the latest software version in the cloud server matches the latest software version in the local storage pool, then it's determined that there's no need to continue returning the latest software version data. The mobile terminal determines whether the target device needs an upgrade based on the latest software version in the local storage pool and the target device's current software version. If the latest software version in the cloud server is higher than the latest software version in the local storage pool, then it's determined that the earliest software version data needs to be returned. The cloud server can also query the target device's device identifier to see which version was last sent for an upgrade, and compare it with the latest software version in the current latest software data. If they match, it's determined that there's no need to continue returning the latest software version data; if the latest software version in the current latest software data is higher than the last sent for an upgrade, then it's determined that the latest software version data needs to be returned.
[0056] Mobile terminals can also send the latest software version of the software data stored in the local storage pool to the cloud server at a preset frequency, so that the cloud server can detect in real time whether the latest software version of the current actual software version is stored in the local storage pool. If it is not the latest software version of the current actual software version, it will return the latest software version of the current actual software version, so that the latest software version of the software data in the local storage pool is updated in real time and keeps it the latest software version of the current actual software version.
[0057] Specifically, during communication between the mobile terminal and the cloud server, when the mobile terminal is running iOS and using the Objective-C programming language, classes such as NSStream or CFSocket are used to implement TCP communication, and NSURLSession is used to send HTTP requests, thus enabling communication with the cloud server. When the mobile terminal is running Android and using the Java programming language, the Socket class is used to send TCP requests by specifying an IP address and port, and HttpURLConnection or HttpClient is used to send HTTP requests, thus enabling communication with the cloud server. Subsequent communication between the mobile terminal and the target device follows the same principle.
[0058] S240. If it is determined that the software of the target device needs to be updated based on the current software version of the target device updated in real time in the local storage pool and the latest version software data, then the latest version software data is sent to the target device via a wireless local area network to perform a software update based on the mobile terminal network information obtained from the local storage pool and the target device network information of the target device.
[0059] The technical solution of this application embodiment is applied to a mobile terminal. Based on the mobile terminal network information obtained from the local storage pool, the latest software version of the latest version software data currently stored in the local storage pool, and / or the current software version of the target device and the device identifier, are sent to the cloud server via a mobile communication network. The current software version of the target device is retrieved from the local storage pool based on the device identifier. If the cloud server determines that the latest version software data needs to be returned based on the latest software version of the latest version software data currently stored in the local storage pool, and / or the current software version of the target device and the device identifier, the latest version software data from the cloud server is downloaded to the local storage pool via the mobile communication network. This solution enables timely acquisition and download of the latest version software data to the local storage pool through interaction with the cloud server, achieving successful software updates for the target device.
[0060] Figure 3This is a flowchart illustrating a device software version upgrade method according to another embodiment of this application. This embodiment is an optimization based on the above embodiments; solutions not described in detail in this embodiment are found in the above embodiments. Figure 3 As shown, the method in this embodiment of the application specifically includes the following steps:
[0061] S310. In response to the query command of the device management application, query the baseband module and Ethernet card of the mobile terminal to obtain the network information of the mobile terminal.
[0062] The mobile terminal network information includes network information when the mobile terminal connects to a mobile communication network and network information when the mobile terminal connects to a wireless local area network. For example, the mobile terminal can grant access permissions to a device management application, which can then query the data on the mobile terminal. In response to query commands from the device management application, the mobile terminal can query the baseband module and Ethernet card to obtain the network information corresponding to the mobile communication network connection and the wireless local area network connection.
[0063] S320. Establish a communication connection with the registration device, query the Ethernet card of the registration device to obtain the network information of the registration device, and obtain the device identifier and current software version of the registration device.
[0064] For example, device management applications also need to obtain the network information of registered devices. A mobile terminal can respond to a query command from the device management application, establish a communication connection with the registered device, query the network card of the registered device, obtain the network information of the registered device, and obtain the device identifier and current software version of the registered device. The registered device can grant access to query device information, and the mobile terminal can then query the device information of the registered device to obtain the device identifier and current software version.
[0065] S330. Store the mobile terminal network information, the registered device network information, the device identifier, and the current software version in a local storage pool.
[0066] For example, a preset size local storage pool can be set in the mobile terminal to store the mobile terminal's network information, registered device network information, device identifier, and current software version in the local storage pool, so that it can be quickly retrieved and used when needed later. The storage format in the local storage pool is shown in Table 1. Here, IPC refers to a network camera.
[0067] Table 1
[0068]
[0069] S340. Select a target device from the registered devices registered in the device management application, and determine the device identifier of the selected target device from the device management application.
[0070] For example, when a device registers in a device management application, the application records the device identifier of the registered device. After selecting a target device, the device identifier of the selected target device can be determined from the device management application.
[0071] S350. Query the current software version of the target device from the local storage pool based on the device identifier of the target device.
[0072] For example, the device identifier of the target device can be compared with the device identifiers in the local storage pool. The current software version corresponding to the matching device identifiers is taken as the current software version of the target device. This solution allows for querying the device identifier and current software version of the target device from the local storage pool without needing to establish a new communication connection with the target device, thus providing a faster and more convenient way to obtain these information.
[0073] S360. Based on the mobile terminal network information of the mobile terminal, the current software version of the target device and the device identifier are sent to the cloud server through the mobile communication network, so that the cloud server, if it determines that the software of the target device needs to be upgraded based on the current software version and the device identifier, returns the latest version software data.
[0074] S370. Receive the latest software version returned by the cloud server and compare the latest software version with the current software version of the target device in the local storage pool.
[0075] The latest version software data includes the latest software version and the latest version software installation data;
[0076] For example, when receiving the latest version of software data returned by the cloud server, it is necessary to first determine whether the software version returned by the cloud server is higher than the current software version of the target device. If not, there is no need to continue receiving the latest version of software installation data returned by the cloud server, thus avoiding unnecessary network usage and storage space waste. The mobile terminal can receive the latest software version returned by the cloud server and compare it with the current software version of the target device recorded in the local storage pool to determine whether the version returned by the cloud server is higher than the current software version of the target device.
[0077] S380. If the latest software version is higher than the current software version of the target device, then receive the latest version software installation data returned by the cloud server.
[0078] For example, if the latest software version is higher than the target device's software version, it is determined that the software on the target device needs to be upgraded, and therefore the system starts receiving the latest version software installation data returned by the cloud server. If the latest software version is not higher than the target device's software version, it is determined that the software on the target device does not need to be upgraded, and therefore the system does not receive the latest version software installation data returned by the cloud server, thus avoiding unnecessary network resource consumption and storage space waste.
[0079] S390. Based on the mobile terminal network information obtained from the local storage pool and the target device network information of the target device, the latest version software data is sent to the target device via a wireless local area network to perform a software update.
[0080] In this embodiment of the application, the method further includes:
[0081] Change the upgrade status of the target device in the local storage pool to pending upgrade, and record the latest software version returned to the target device;
[0082] After updating the software by sending the latest version software data to the target device via a wireless local area network, the method further includes:
[0083] If the target device is detected to be online, a new communication connection is established with the target device to obtain the current software version of the target device;
[0084] If the current software version is consistent with the latest software version, then the target device is determined to have been successfully upgraded, and the current software version of the target device is updated on the local storage device.
[0085] For example, after receiving the latest version software installation data from the cloud server, the software on the target device is about to be upgraded. The upgrade status of the target device can be marked in the local storage device. Target devices that need upgrading but haven't been upgraded are marked as "awaiting upgrade." For the target devices awaiting upgrade, the latest version software data is sent to them, and the latest software version corresponding to the sent latest version software data is recorded. After sending the latest version software data to the target device for upgrade, the target device will generally restart. During the restart process, the communication connection between the mobile terminal and the target device is broken, but the mobile terminal will listen for the target device. If the target device is detected as online (i.e., a signal is sent to the target device and a response is received), a new communication connection is established with the target device to obtain the current software version. If the target device upgrade is successful, the current software version should be consistent with the latest software version recorded in the local storage pool. The obtained current software version of the target device can be compared with the latest software version recorded in the local storage pool. If they match, the software upgrade of the target device is determined to be successful. At this time, the current software version of the target device in the local storage pool is updated to the latest obtained current software version, which is the latest software version. The above solution can detect whether the target device has been successfully upgraded and update the current software version in the local storage pool in a timely manner to maintain the accuracy of the target device's relevant information.
[0086] This application provides a method for upgrading device software versions. Responding to a query command from a device management application, the method queries the baseband module and Ethernet card to obtain the mobile terminal's network information; establishes a communication connection with the registered device, queries the Ethernet card of the registered device to obtain its network information, and obtains the device identifier and current software version of the registered device; stores the mobile terminal network information, the registered device network information, the device identifier, and the current software version in a local storage pool, thereby pre-storing relevant information about the target device and mobile terminal for quick and direct retrieval when needed later, improving retrieval efficiency. The method further involves determining the device identifier of the selected target device from the device management application; and querying the current software version of the target device from the local storage pool based on the device identifier, thereby conveniently and quickly obtaining the current software version of the target device. The system receives the latest software version returned by the cloud server and compares it with the current software version of the target device in the local storage pool. If the latest software version is higher than the current software version of the target device, the system receives the latest version software installation data returned by the cloud server. This avoids the waste of network resources and storage space caused by the target device receiving the latest version software installation data even though it does not need a software upgrade.
[0087] Figure 4 This is a flowchart illustrating a device software version upgrade method according to another embodiment of this application. This embodiment is an optimization based on the above embodiments; solutions not described in detail in this embodiment are found in the above embodiments. Figure 4 As shown, the method in this embodiment of the application specifically includes the following steps:
[0088] S410. Select a target device from the registered devices registered in the device management application, and obtain the current software version and device identifier of the target device.
[0089] S420. Find the first network address used by the mobile terminal when connecting to the mobile communication network from the mobile terminal network information.
[0090] The mobile terminal network information can be obtained in real time from the mobile terminal, or it can be obtained from the local storage pool based on the above embodiments.
[0091] In this embodiment, when the mobile terminal is in a closed network, it needs to communicate with the outside world using a mobile communication network, such as a 4G or 5G network. The first network address used by the mobile terminal when connecting to the mobile communication network can be found in the mobile terminal's network information, such as the IP address of a 4G network or a 5G network, to communicate with the cloud server based on the specified IP address.
[0092] S430. Send the current software version of the target device and the device identifier to the cloud server using the first network address as the source address.
[0093] For example, the first network address can be used as the source address to send the current software version and device identifier of the target device to the cloud server via a mobile communication network.
[0094] S440: Receive the latest version software data returned by the cloud server.
[0095] For example, when the cloud server returns the latest version of the software data or a message that no upgrade is required to the mobile terminal, it returns the first network address as the destination address to the mobile terminal.
[0096] S450. Locate the second network address used by the mobile terminal when connecting to the wireless local area network from the mobile terminal network information, and locate the third network address used by the target device when connecting to the wireless local area network from the target device network information; wherein the second network address and the third network address are pre-stored in the local storage pool.
[0097] The network information of the target device can be obtained from the target device in real time, or it can be obtained from the local storage pool based on the above embodiments.
[0098] For example, when the mobile terminal and the target device communicate, they use a wireless local area network (WLAN). Therefore, the second network address used by the mobile terminal to connect to the WLAN is found from the mobile terminal's network information, and the third network address used by the target device to connect to the WLAN is found from the target device's network information, thereby determining the IP address that the mobile terminal should connect to for communication with the target device.
[0099] S460. Using the second network address as the source address and the third network address as the destination address, send the latest version software data to the target device to perform a software update.
[0100] Specifically, the mobile terminal's second network address is used as the source address, and the target device's third network address is used as the destination address to send the latest version of the software data to the target device for software update. On the target device side, the target device can first receive the latest software version sent by the mobile terminal, compare the latest software version with the current software version, and if the latest software version is higher than the current software version, then it receives the latest version of the software installation data sent by the mobile terminal and performs the software upgrade. If the latest software version is not higher than the current software version, then it does not receive the latest version of the software installation data sent by the mobile terminal, thereby avoiding unnecessary network bandwidth consumption and storage space waste.
[0101] This application provides a method for upgrading device software. The method involves: retrieving a first network address used by the mobile terminal when connecting to a mobile communication network from the mobile terminal network information; sending the current software version and device identifier of the target device to a cloud server using the first network address as the source address; retrieving a second network address used by the mobile terminal when connecting to a wireless local area network from the mobile terminal network information, and retrieving a third network address used by the target device when connecting to a wireless local area network from the target device network information; wherein the second and third network addresses are pre-stored in a local storage pool; and sending the latest version software data to the target device for software update using the second network address as the source address and the third network address as the destination address. This solution adaptively selects appropriate IP addresses and networks for communication at different stages of the target device software upgrade process, ensuring the normal progress of the upgrade process without manual network switching or upgrade failure due to untimely network switching.
[0102] Figure 5A signaling diagram illustrating a specific implementation of an embodiment of this application, such as... Figure 5 As shown, the specific implementation methods include:
[0103] 1. When the device management application starts, it obtains the registered device network information, device identifier and current software version of each registered device, and obtains the mobile terminal network information of the mobile terminal, and stores them in the local storage pool.
[0104] 2. Identify the target devices that need to be checked and upgraded, determine the device identifier of the target device from the device management application, and obtain the current software version of the target device from the local storage pool.
[0105] 3. Select the IP address used by the mobile terminal to connect to the mobile communication network from the local storage pool, and send the target device's device identifier and current software version to the cloud server through the mobile communication network using the IP address as the source address.
[0106] Fourth, the cloud server compares the target device's current software version with the latest software version. If the latest software version is higher than the current software version, it determines that an upgrade is needed and returns the latest version software data to the mobile terminal; otherwise, it returns a message that no upgrade is needed.
[0107] 5. The mobile terminal receives the latest version of the software data. If the latest software version is higher than the current software version, it receives the latest version of the software installation data.
[0108] 6. Select the IP address used by the mobile terminal when connecting to the wireless LAN from the local storage as the source address, and select the IP address used by the target device when connecting to the wireless LAN as the destination address, and send the latest version of the software data.
[0109] 7. The target device receives the latest version of the software data. If the latest software version is higher than the current software version, it receives the latest version of the software installation data and performs an upgrade.
[0110] 8. If the mobile terminal detects that the target device is online, it re-establishes a communication connection with the target device and obtains the current software version. If the current software version matches the latest software version, it indicates that the target device's software upgrade was successful. The mobile terminal then updates the target device's current software version in its local storage pool, recording the latest software version. Finally, it deletes the latest version software installation data.
[0111] Figure 6 This is a schematic diagram of a device software version upgrade apparatus provided in an embodiment of this application. This apparatus can execute the device software version upgrade method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects for executing the method. Figure 6As shown, the device is configured on a mobile terminal, which has a device management application installed. The device includes:
[0112] The target device selection module 510 is used to select a target device from the registered devices registered in the device management application and determine the device identifier of the selected target device.
[0113] The latest version software data acquisition module 520 is used to acquire the latest version software data from a local storage pool, or to acquire the latest version software data from a cloud server via a mobile communication network based on the mobile terminal network information of the mobile terminal acquired from the local storage pool.
[0114] The update module 530 is configured to, if it is determined that the software of the target device needs to be updated based on the current software version of the target device updated in real time in the local storage pool and the latest version software data, send the latest version software data to the target device via a wireless local area network to perform a software update based on the mobile terminal network information obtained from the local storage pool and the target device network information of the target device.
[0115] In this embodiment of the application, if the target device is a newly added target device, after determining the device identifier of the selected target device, the apparatus further includes:
[0116] The latest software version query module is used to query the latest software version of other devices stored in the local storage pool;
[0117] The update judgment module is used to determine that if the current software version of the newly added target device is consistent with the latest software version, the current software version of the newly added target device does not need to be updated.
[0118] The acquisition module is used to acquire the latest version of the software data from the local storage pool if the current software version of the newly added target device is lower than the latest software version, or to acquire the latest version of the software data from the cloud server through the mobile communication network based on the mobile terminal network information of the mobile terminal acquired from the local storage pool.
[0119] In this embodiment, the latest version software data acquisition module 520 acquires the latest version software data from the cloud server via a mobile communication network based on the mobile terminal network information of the mobile terminal obtained from the local storage pool, including:
[0120] Based on the mobile terminal network information of the mobile terminal obtained from the local storage pool, the current software version of the latest version of the software data currently stored in the local storage pool, and / or the current software version of the target device and the device identifier are sent to the cloud server via the mobile communication network; wherein, the current software version of the target device is queried from the local storage pool based on the device identifier of the target device;
[0121] If the cloud server determines that the target device's software needs an upgrade based on the current software version of the latest version software data currently stored in the local storage pool, and / or the current software version of the target device and the device identifier, the cloud server downloads the latest version software data from the cloud server to the local storage pool via a mobile communication network.
[0122] In this embodiment of the application, the device further includes:
[0123] The mobile terminal network information acquisition module is used to respond to the query command of the device management application, query the baseband module and Ethernet card of the mobile terminal, and acquire the mobile terminal network information.
[0124] The registration device information acquisition module is used to establish a communication connection with the registration device, query the Ethernet card of the registration device, obtain the network information of the registration device, and obtain the device identifier and current software version of the registration device.
[0125] The storage module is used to store the mobile terminal network information, the registered device network information, the device identifier, and the current software version in a local storage pool.
[0126] In this embodiment of the application, the target device selection module 510 obtains the current software version and device identifier of the target device, including:
[0127] The device identifier of the selected target device is determined from the device management application;
[0128] The current software version of the target device is queried from the local storage pool based on the device identifier of the target device.
[0129] In this embodiment of the application, the latest version software data includes the latest software version and the latest version software installation data;
[0130] The data receiving module 530 receives the latest version software data returned by the cloud server, including:
[0131] Receive the latest software version returned by the cloud server, and compare the latest software version with the current software version of the target device in the local storage pool;
[0132] If the latest software version is higher than the current software version of the target device, then the latest version software installation data returned by the cloud server is received.
[0133] In this embodiment of the application, the device further includes:
[0134] The recording module is used to modify the upgrade status of the target device in the local storage pool to "to be upgraded" and record the latest software version returned to the target device.
[0135] The monitoring module is used to re-establish a communication connection with the target device and obtain the current software version of the target device if the target device is detected to be online.
[0136] An update module is used to determine that the target device has been successfully upgraded if the current software version is consistent with the latest software version, and then update the current software version of the target device on the local storage device.
[0137] In this embodiment, the information sending module 520 sends the current software version and device identifier of the target device to the cloud server via a mobile communication network based on the mobile terminal network information of the mobile terminal, including:
[0138] Find the first network address used by the mobile terminal when connecting to the mobile communication network from the mobile terminal network information;
[0139] The first network address is used as the source address to send the current software version of the target device and the device identifier to the cloud server.
[0140] In this embodiment, the data receiving module 530 updates the software by sending the latest version software data to the target device via a wireless local area network, based on the mobile terminal network information and the target device network information, including:
[0141] The second network address used by the mobile terminal when connecting to the wireless local area network is retrieved from the mobile terminal network information, and the third network address used by the target device when connecting to the wireless local area network is retrieved from the target device network information; wherein the second network address and the third network address are pre-stored in a local storage pool;
[0142] Using the second network address as the source address and the third network address as the destination address, the latest version of the software data is sent to the target device for software update.
[0143] The device software version upgrade apparatus provided in this application embodiment can execute the device software version upgrade method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects of the method execution.
[0144] Figure 7 A schematic diagram of an electronic device 10, which can be used to implement embodiments of this application, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the application described and / or claimed herein.
[0145] like Figure 7 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0146] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of monitors, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless device software version upgrade transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0147] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as device software version upgrade methods.
[0148] In some embodiments, the device software version upgrade method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the device software version upgrade method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the device software version upgrade method by any other suitable means (e.g., by means of firmware).
[0149] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0150] Computer programs used to implement the methods of this application may be written in any combination of one or more programming languages. These computer programs may be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable device software version upgrade apparatus, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0151] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0152] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0153] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0154] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0155] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired information of the technical solution of this application can be achieved, and this is not limited herein.
[0156] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for upgrading device software, characterized in that, Applied to a mobile terminal, wherein a device management application is installed on the mobile terminal, the method includes: Select the target device from the registered devices registered in the device management application, and determine the device identifier of the selected target device; The latest version of the software data can be obtained from the local storage pool, or the latest version of the software data can be obtained from the cloud server through the mobile communication network based on the mobile terminal network information of the mobile terminal obtained from the local storage pool. If it is determined that the target device's software needs to be updated based on the current software version of the target device updated in real time in the local storage pool and the latest version software data, then the latest version software data is sent to the target device via a wireless local area network to perform the software update, based on the mobile terminal network information obtained from the local storage pool and the target device network information of the target device.
2. The method according to claim 1, characterized in that, If the target device is a newly added device, after determining the device identifier of the selected target device, the method further includes: Query the local storage pool for the latest software versions of other devices that are already stored; If the current software version of the newly added target device is the same as the latest software version, then it is determined that the current software version of the newly added target device does not need to be updated; If the current software version of the newly added target device is lower than the latest software version, the latest version software data is obtained from the local storage pool, or the latest version software data is obtained from the cloud server through the mobile communication network based on the mobile terminal network information of the mobile terminal obtained from the local storage pool.
3. The method according to claim 1, characterized in that, Based on the mobile terminal network information of the mobile terminal obtained from the local storage pool, the latest version software data is obtained from the cloud server via the mobile communication network, including: Based on the mobile terminal network information of the mobile terminal obtained from the local storage pool, the latest software version of the latest version of the software data currently stored in the local storage pool, and / or the current software version of the target device and the device identifier are sent to the cloud server via the mobile communication network; wherein, the current software version of the target device is queried from the local storage pool based on the device identifier of the target device; When the cloud server determines that it needs to return the latest version of the software data based on the latest version of the software data currently stored in the local storage pool, and / or the current software version of the target device and the device identifier, the latest version of the software data in the cloud server is downloaded to the local storage pool via the mobile communication network.
4. The method according to claim 1, characterized in that, Before selecting a target device from devices registered in the device management application, the method further includes: In response to the query command from the device management application, the baseband module and Ethernet card of the mobile terminal are queried to obtain the network information of the mobile terminal; Establish a communication connection with the registration device, query the Ethernet card of the registration device to obtain the network information of the registration device, and obtain the device identifier and current software version of the registration device; The mobile terminal network information, the registered device network information, the device identifier, and the current software version are stored in a local storage pool; The latest version software data includes the latest software version and the latest version software installation data; Receiving the latest version software data returned by the cloud server includes: Receive the latest software version returned by the cloud server, and compare the latest software version with the current software version of the target device in the local storage pool; If the latest software version is higher than the current software version of the target device, then the latest version software installation data returned by the cloud server is received.
5. The method according to claim 4, characterized in that, The method further includes: Change the upgrade status of the target device in the local storage pool to pending upgrade, and record the latest software version returned to the target device; After updating the software by sending the latest version software data to the target device via a wireless local area network, the method further includes: If the target device is detected to be online, a new communication connection is established with the target device to obtain the current software version of the target device; If the current software version is consistent with the latest software version, then the target device is determined to have been successfully upgraded, and the current software version of the target device is updated on the local storage device.
6. The method according to claim 1 or 2, characterized in that, Based on the mobile terminal network information of the mobile terminal, the current software version of the target device and the device identifier are sent to the cloud server via the mobile communication network, including: Find the first network address used by the mobile terminal when connecting to the mobile communication network from the mobile terminal network information; The first network address is used as the source address to send the current software version of the target device and the device identifier to the cloud server.
7. The method according to claim 1 or 2, characterized in that, Based on the mobile terminal network information and the target device network information, the latest version software data is sent to the target device via a wireless local area network for software update, including: The second network address used by the mobile terminal when connecting to the wireless local area network is retrieved from the mobile terminal network information, and the third network address used by the target device when connecting to the wireless local area network is retrieved from the target device network information; wherein the second network address and the third network address are pre-stored in a local storage pool; Using the second network address as the source address and the third network address as the destination address, the latest version of the software data is sent to the target device for software update.
8. A device for upgrading device software versions, characterized in that, Configured on a mobile terminal, wherein a device management application is installed on the mobile terminal, the device includes: The target device selection module is used to select a target device from the registered devices registered in the device management application and determine the device identifier of the selected target device; The latest version software data acquisition module is used to acquire the latest version software data from a local storage pool, or to acquire the latest version software data from a cloud server via a mobile communication network based on the mobile terminal network information of the mobile terminal acquired from the local storage pool. The update module is configured to, if it is determined that the software of the target device needs to be updated based on the current software version of the target device updated in real time in the local storage pool and the latest version software data, send the latest version software data to the target device via a wireless local area network to perform a software update, based on the mobile terminal network information obtained from the local storage pool and the target device network information of the target device.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the device software version upgrade method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the device software version upgrade method according to any one of claims 1-7.