Intelligent cabinet application updating method and device, computer device and storage medium
By receiving application update instructions from upper-layer devices, downloading and judging local environmental conditions, and pushing installation packages using a tree structure, the problem of server pressure and network impact during smart cabinet application updates is solved, improving update efficiency and operation and maintenance efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN HIVE BOX NETWORK TECH LTD
- Filing Date
- 2022-11-29
- Publication Date
- 2026-04-24
AI Technical Summary
When updating existing smart locker applications, the server-side data pressure is high, and the locker terminal is easily affected by the network, resulting in low update efficiency.
By receiving application update instructions from upper-layer devices, downloading the installation package, and determining whether the local environment meets the upgrade requirements, if so, the package is installed and update instructions are sent to lower-layer devices. The installation package is pushed using a tree structure, which reduces server load and optimizes network transmission.
It alleviated the data pressure on the server side, improved the operation and maintenance efficiency and application push efficiency of the smart cabinet, and reduced the network transmission traffic consumption.
Smart Images

Figure CN115914211B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart cabinet technology, and in particular to a smart cabinet application update method, apparatus, computer equipment, and storage medium. Background Technology
[0002] Software-as-a-Service (SaaS) platform providers offer software services to enterprise users via the internet. The provider centrally deploys the application software's server-side on a server, and enterprise users can subscribe to application software services and technical support services based on their actual needs. Enterprise users subscribe to application services to generate smart cabinet applications, which are then installed on the cabinet. The server-side manages and maintains the smart cabinet applications via the network.
[0003] When updating existing smart cabinet applications, the cabinet sends an update request to the server. After the server responds, the cabinet downloads the new version of the smart cabinet application directly from the server online and installs it. However, this process has several drawbacks. First, simultaneous updates from a large number of cabinets increase the request volume, putting excessive pressure on the server's data flow and reducing its operational efficiency. Second, the cabinets are widely distributed, especially for enterprise users with cabinets located overseas. Large installation packages or unstable cross-border network signals can cause errors or failures when downloading the new version directly from the server, impacting update efficiency and even affecting the normal operation of the cabinets. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, device, computer equipment, and storage medium for updating smart cabinet applications to address the aforementioned technical problems, thereby solving the issues of high server-side data pressure, vulnerability of the cabinet to network interference, and low update efficiency during smart cabinet application updates.
[0005] A method for updating a smart cabinet application includes:
[0006] Receive a first application update instruction sent by an upper-layer device; the first application update instruction includes application information to be updated for a specified application; the upper-layer device is a server or an upper-layer cabinet.
[0007] Download the installation package corresponding to the application information to be updated from the upper-layer device;
[0008] If the installation package is downloaded successfully, the local environment information is obtained, and it is determined whether the local environment information meets the local application upgrade conditions.
[0009] If the local environment information meets the local application upgrade conditions, then install the installation package;
[0010] If the installation package is successfully installed, a second application update instruction is sent to the lower-level device so that the lower-level device updates the specified application according to the second application update instruction; the lower-level device includes a plurality of lower-level cabinets; the second application update instruction includes the application information to be updated.
[0011] A smart cabinet application update device, comprising:
[0012] An update instruction receiving module is used to receive a first application update instruction sent by an upper-layer device; the first application update instruction includes application information to be updated for a specified application; the upper-layer device is a server or an upper-layer cabinet.
[0013] The installation package download module is used to download the installation package corresponding to the application information to be updated from the upper-layer device.
[0014] The condition judgment module is used to obtain local environment information if the installation package is successfully downloaded, and to determine whether the local environment information meets the local application upgrade conditions.
[0015] The installation package installation module is used to install the installation package if the local environment information meets the local application upgrade conditions.
[0016] An update instruction sending module is used to send a second application update instruction to a lower-level device if the installation package is successfully installed, so that the lower-level device updates the specified application according to the second application update instruction; the lower-level device includes a plurality of lower-level cabinets; the second application update instruction includes the application information to be updated.
[0017] A computer device includes a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor implements the above-described smart cabinet application update method when executing the computer-readable instructions.
[0018] One or more readable storage media storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the smart cabinet application update method described above.
[0019] The aforementioned smart cabinet application update method, apparatus, computer equipment, and storage medium include a method for updating the smart cabinet application by receiving a first application update instruction sent by an upper-layer device; the first application update instruction includes information about the application to be updated for a specified application; the upper-layer device is a server or an upper-layer cabinet unit; the method downloads an installation package corresponding to the application information to be updated from the upper-layer device; if the installation package is successfully downloaded, the method obtains local environment information and determines whether the local environment information meets the local application upgrade conditions; if the local environment information meets the local application upgrade conditions, the method installs the installation package; if the installation package is successfully installed, the method sends a second application update instruction to a lower-layer device, so that the lower-layer device updates the specified application according to the second application update instruction; the lower-layer device includes several lower-layer cabinet units; the second application update instruction includes information about the application to be updated. The smart cabinet application update method of the present invention first pushes the installation package to several cabinet terminals at the first level through the server, and then pushes the installation package to several cabinet terminals at the second level through the several cabinet terminals at the first level, until the installation package of the last cabinet terminal is pushed to complete the application update. This greatly alleviates the data pressure on the server, saves the server's traffic consumption, and improves the operation and maintenance efficiency and application push efficiency of the smart cabinet. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart illustrating a smart cabinet application update method according to an embodiment of the present invention;
[0022] Figure 2 This is a schematic diagram of a hierarchical distribution of the smart cabinet application update method in one embodiment of the present invention;
[0023] Figure 3 This is a schematic diagram of the structure of an intelligent cabinet application update device in one embodiment of the present invention;
[0024] Figure 4 This is a schematic diagram of a computer device according to an embodiment of the present invention. Detailed Implementation
[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] In one embodiment, as Figure 1 shown, an intelligent cabinet application update method is provided, including the following steps S10 - S50.
[0027] S10. Receive a first application update instruction sent by an upper - layer device; the first application update instruction includes the to - be - updated application information of a specified application; the upper - layer device is a server or an upper - layer cabinet machine.
[0028] Understandably, the Over - the - Air Technology (OTA) is a technology that realizes remote management of terminal device and SIM card data through the air interface of mobile communication. In the cabinet - end device of the intelligent cabinet, a SIM card or an Internet of Things card for networking is installed. The supplier of the SaaS platform realizes remote management of the intelligent cabinet application on the cabinet - end through OTA technology. Devices are divided into upper and lower levels according to the relative relationship of sending or receiving application update instructions. The upper - layer device is used to send an application update instruction to the current - layer device (the current cabinet machine or a cabinet machine at the same layer as the current cabinet machine). In this embodiment, a tree - diagram form is used to represent the distribution of devices, with the server as the trunk, and the server and the cabinet - end are organized in a parent - child hierarchical structure. The upper - layer device can be a server or an upper - layer cabinet machine. For example, when the upper - layer device (parent level) is a server, the cabinet - end at the first level (child level) is the current cabinet machine; when the upper - layer device (parent level) is the cabinet - end at the first level, the cabinet - end at the second level (child level) is the current cabinet machine. The first application update instruction is an application update instruction sent by the upper - layer device to the current cabinet machine, and the to - be - updated application information of the specified application is the application version number of the installation package of the specified application in the first application update instruction. When an enterprise user creates an intelligent cabinet application upgrade task for the cabinet - end, first, the server is used as the upper - layer device, and the server of the server sends an application update instruction to the cabinet - end at the first level; after the intelligent cabinet application upgrade task of the cabinet - end at the first level is completed, an application update instruction is sent to the cabinet - end at the second level through the cabinet - end at the first level;..., until an application update instruction is sent to the last cabinet - end.
[0029] S20. Download an installation package corresponding to the to - be - updated application information from the upper - layer device.
[0030] Understandably, when the upper - layer device is a server, the cabinet - end at the first level responds to the application update instruction and downloads an installation package corresponding to the to - be - updated application information from the server. When the upper - layer device is the cabinet - end at the (i - 1) - th level, the cabinet - end at the i - th level responds to the application update instruction and downloads an installation package corresponding to the to - be - updated application information from the cabinet - end at the (i - 1) - th level. Here, i is a positive integer, and 1 < i < m, where m is the total number of levels of the cabinet - end.
[0031] S30. If the installation package is downloaded successfully, obtain the local environment information and determine whether the local environment information meets the local application upgrade conditions.
[0032] Understandably, after the installation package is successfully downloaded, the parsing and installation process will cause a temporary unavailability of the smart cabinet application service on the cabinet terminal. Therefore, it is necessary to determine whether the local environment information of the cabinet terminal meets the local application upgrade conditions. For example, the installation period is generally during the cabinet terminal's idle period. When the cabinet terminal is in use, the installation of the installation package can be paused or canceled. Local environment information refers to the current hardware or software environment of the cabinet terminal, such as the current application version number, cabinet time, and cabinet operating status.
[0033] S40. If the local environment information meets the local application upgrade conditions, then install the installation package.
[0034] Understandably, when the local environment information meets the local application upgrade conditions, the installation package data is parsed and installed. If the installation fails, it will be reinstalled according to the time and condition requirements. If the number of failed reinstallations reaches a preset threshold, feedback information of the upgrade task failure will be reported so that the maintenance personnel can confirm and resolve the problem before reinstalling. After the installation package is installed, it needs to be saved. To avoid application rollback, the local space of the cabinet saves at least two installation package versions of the same application. Application rollback refers to reverting the application from a new version to a historical version. When the application upgrade fails during the upgrade process, the smart cabinet application will automatically terminate the upgrade and roll back the application. When the new version of the application has problems or anomalies after the upgrade task is completed, the application can be manually rolled back. In this embodiment, the local space of the cabinet saves two installation package versions of the same application. Before installing the new version installation package, the cabinet saves two historical version installation packages. After the new version installation package is installed and saved, the cabinet automatically deletes the lowest version installation package among the two historical version installation packages and saves the new version installation package and the highest version historical version installation package.
[0035] S50. If the installation package is successfully installed, a second application update instruction is sent to the lower-level device so that the lower-level device updates the specified application according to the second application update instruction; the lower-level device includes a plurality of lower-level cabinets; the second application update instruction includes the application information to be updated.
[0036] Understandably, in this embodiment, only the first-level cabinet terminal receives the application update command sent by the server. After the smart cabinet application upgrade is successful on the first-level cabinet terminal, cabinet terminals at other levels all receive the application update command sent by the cabinet terminal at the previous level. That is, only the first-level cabinet terminal downloads the installation package through the server network, while cabinet terminals outside the first level download the installation package through the cabinet terminal network according to the hierarchical structure. The devices are divided into upper and lower levels according to the relative relationship of sending or receiving application update commands. Lower-level devices are used to receive application update commands sent by devices at the current level (the current cabinet terminal or cabinet terminals at the same level as the current cabinet terminal). Lower-level devices include several lower-level cabinet terminals, and the number of lower-level cabinet terminals can be set as needed. For example, each device at the same level as the current cabinet terminal corresponds to two lower-level cabinet terminals. This embodiment uses a tree diagram to represent the distribution of devices, with the server terminal as the trunk, and a parent-child hierarchical structure to organize the server terminal and cabinet terminals. If the current cabinet device (parent level) is the first-level cabinet terminal, then the second-level (child level) cabinet terminal is the lower-level device. The second application update command is the application update command sent by the current cabinet device to the lower-level device. The application information to be updated refers to the application version number of the installation package. When an enterprise user creates a smart cabinet application upgrade task for a cabinet terminal, the server is first used as the upper-level device, and the server sends the application update command to the first-level cabinet terminal device through the server. After the smart cabinet application upgrade task of the first-level cabinet terminal device is completed, the application update command is sent from the first-level cabinet terminal device to the second-level cabinet terminal device; ..., until the application update command is sent to the last cabinet terminal device.
[0037] This embodiment receives a first application update instruction sent by an upper-layer device; the first application update instruction includes information about the application to be updated for a specified application; the upper-layer device is a server or an upper-layer cabinet; the installation package corresponding to the application information to be updated is downloaded from the upper-layer device; if the installation package is successfully downloaded, local environment information is obtained, and it is determined whether the local environment information meets the local application upgrade conditions; if the local environment information meets the local application upgrade conditions, the installation package is installed; if the installation package is successfully installed, a second application update instruction is sent to a lower-layer device, so that the lower-layer device updates the specified application according to the second application update instruction; the lower-layer device includes several lower-layer cabinets; the second application update instruction includes information about the application to be updated. The smart cabinet application update method of this embodiment first pushes the installation package to several cabinets at the first level through the server, and then pushes the installation package to several cabinets at the second level through the several cabinets at the first level, until the installation package of the last cabinet is pushed to complete the application update. This significantly alleviates the data pressure on the server, saves server traffic consumption, and improves the operation and maintenance efficiency and application push efficiency of the smart cabinet.
[0038] Optionally, the upper-layer device is a server; step S10, that is, before receiving the first application update instruction from the upper-layer device, includes:
[0039] S101, The server obtains the location information of the cabinet;
[0040] S102. The server processes the cabinet location information according to the preset push rules to determine the current cabinet.
[0041] S103, The server sends the first application update instruction to the current cabinet machine.
[0042] Understandably, during installation, each cabinet device of an enterprise user has its location information configured with its address and latitude / longitude coordinates, and the server's location information configured with the server's data center coordinates. When an enterprise user creates a smart cabinet application upgrade task, the cabinet to be upgraded is determined by setting a specified coverage area. Preset push rules are pre-set rules used to determine the push or download path of the installation package for each cabinet. These rules can be based on proximity or pre-configured specific path rules. In one embodiment, when an enterprise user creates a smart cabinet application upgrade task, the server location information and the cabinet location information of multiple cabinets are obtained. Distance calculations are performed by traversing the cabinet location information of each cabinet using the server location information to obtain the server distance information for each cabinet. The server distance information of each cabinet is sorted, and the cabinets with the closest server distances are determined as the first-level cabinets. The first-tier cabinet terminal can have one, two, or more. The server acts as the upper-layer device, sending application update commands to the first-tier cabinet terminal devices so that they can download the installation package via the server.
[0043] In this embodiment, the server determines the first-level cabinet terminal based on the cabinet location information and sends application update instructions to the first-level cabinet terminal devices. This eliminates the need to send application update instructions to every single cabinet terminal. Furthermore, preset push rules can be set according to actual conditions to adjust the number of cabinet terminals to which the server sends updates. This embodiment helps reduce requests to the server, saves server bandwidth consumption, and alleviates server data pressure.
[0044] Optionally, step S50, i.e., before sending the second application update instruction to the lower-level device, includes:
[0045] S501, Obtain the location information of the cabinet unit;
[0046] S502. Process the cabinet location information according to the preset push rules to determine the lower-level device.
[0047] Understandably, only the first-tier cabinet terminals download the installation package via the server network; all other cabinet terminals download the installation package via the cabinet terminal network according to the hierarchical structure. In one embodiment, the current cabinet terminal is a first-tier terminal. After the first-tier terminal successfully downloads and installs the installation package, the cabinet location information of each terminal is obtained, and the cabinet distance information between the first-tier terminal and each terminal to be upgraded is calculated. The cabinet distance information is sorted according to a preset push rule (such as a proximity calculation rule), and the several terminal terminals with the closest cabinet distance information are determined as the second-tier terminal terminals. The second-tier terminal terminals can be one, two, or more. The second-level cabinet terminal is used as the lower-level device of the first-level cabinet terminal, and the first-level cabinet terminal sends application update commands to the second-level cabinet terminal; the third-level cabinet terminal is used as the lower-level device of the second-level cabinet terminal, and so on, so that cabinet terminals other than the first level can download the installation package through the cabinet terminal according to the hierarchical structure.
[0048] In another embodiment, after the installation package is successfully downloaded and installed on the first-level cabinet terminal, if there is a historical push path between the first-level cabinet terminal and each cabinet terminal to be upgraded (such as a push path created in a historical upgrade task based on the principle of proximity), the path dependency principle is adopted, and the installation package can be directly pushed to the cabinet terminals of the second level, the third level and the i-th level according to the hierarchical structure of the historical push path, without having to perform repeated calculations according to the preset push rules.
[0049] In this embodiment, after the installation package is successfully downloaded and installed on the current cabinet, the cabinet terminal of the next lower-level device is determined based on the cabinet's location information. This enables the push and download of the installation package between cabinet terminals. Simultaneously, preset push rules can be set according to actual conditions to adjust the number of pushes between cabinet terminals. This embodiment pushes the installation package via the cabinet terminal network, reducing the data pressure on the server network. Furthermore, the preset push rules ensure that each cabinet terminal downloads the installation package promptly to complete the upgrade task, improving application push efficiency.
[0050] Optionally, step S20, i.e., after downloading the installation package corresponding to the application information to be updated from the upper-layer device, includes:
[0051] S201. If the installation package download fails, a first installation package request instruction is sent to the upper-layer device according to the first retry rule, so as to receive the installation package resent by the upper-layer device through the first installation package request instruction.
[0052] Understandably, the first retry rule refers to the rule of re-downloading from the original download device (the server or cabinet terminal of the original download path), and the first installation package request instruction is the installation package request instruction sent by the cabinet terminal to the original download device. When the cabinet terminal at the first level fails to download the installation package due to network fluctuations, it sends a first installation package request instruction to the server to receive the resent installation package from the server. When a cabinet terminal outside the first level fails to download the installation package, it sends a first installation package request instruction to the cabinet terminal at the corresponding original download path in the upper-level device to receive the resent installation package from the cabinet terminal at the original download path. That is, the cabinet terminal at the first level re-downloads the installation package from the server, and the cabinet terminals outside the first level re-download the installation package from the original cabinet terminal.
[0053] In this embodiment, after the installation package download fails, an installation package request command is sent to the original downloading device through retry rules to avoid the impact of network fluctuations on the installation package download and ensure the success rate of the installation package download.
[0054] Optionally, step S201, i.e., after sending a first installation package request instruction to the upper-layer device according to the first retry rule, to receive the installation package resent by the upper-layer device through the first installation package request instruction, includes:
[0055] S2011. If the installation package fails to be received, a second installation package request instruction is sent to the target device according to the second retry rule, so as to receive the installation package sent by the target device through the second installation package request instruction; the target device includes a first device at the same level as the current cabinet, a second device at the same level as the upper-level device and / or a third device at the next level above the upper-level device.
[0056] Understandably, the second retry rule refers to the rule of re-downloading from an installed device other than the original download device, and the second installation package request instruction is an installation package request instruction sent by the cabinet terminal to an installed device other than the original download device. In one embodiment, as... Figure 2As shown, the Software as a Service (SaaS) platform provider deploys the application software server-side uniformly on a server, providing software services to multiple tenants simultaneously through a cloud server cluster. A tenant refers to an enterprise user who subscribes to the software service from the provider. Each enterprise user's smart cabinet is configured with a local server to provide local services and interact with data over the network. The current enterprise user is tenant number 1. Tenant number 1's n smart cabinets are distributed hierarchically. The first-level cabinet is cabinet number 1, the second-level cabinets are cabinets 2 and 3, the third-level cabinets are cabinets 4, 5, 6, and 7, and so on, until the last cabinet, number n. The default push rule is based on the principle of "1 pushes 2, proximity follows". That is, after cabinet 1 successfully downloads and installs the installation package from the server, it sends application update commands to cabinets 2 and 3; after cabinets 2 and 3 successfully download and install the installation package from cabinet 1, they send application update commands to cabinets 4 and 5, and from cabinet 3 to cabinets 6 and 7; and so on, until the last cabinet (n) is pushed. If cabinets 1, 2, 3, and 5 have all successfully downloaded and installed the installation package, and cabinet 4 fails to download the installation package from cabinet 2, it is determined that there is a network fluctuation between cabinets 4 and 2. Cabinet 4 then sends a first installation package request command to cabinet 2. If the resent installation package from cabinet 2 fails a specified number of times (e.g., 3 times), it is determined that there is a network fault between cabinets 4 and 2. At this point, if the target device is the first device at the same level as the current cabinet (i.e., cabinet 5), then cabinet 4 sends a second installation package request instruction to cabinet 5 and receives the installation package resent by cabinet 5. If the target device is the second device at the same level (second level) as the upper-level device (cabinet 2) (i.e., cabinet 3), then cabinet 4 sends a second installation package request instruction to cabinet 3 and receives the installation package resent by cabinet 3. If the target device is the third device at the level above the upper-level device (cabinet 2) (first level) (i.e., cabinet 1), then cabinet 4 sends a second installation package request instruction to cabinet 1 and receives the installation package resent by cabinet 1.
[0057] Furthermore, the retry order can be configured as needed. For example, a second installation package request command can be sent to the first device at the same level as the current cabinet, and if that fails, it can be sent to the second device at the same level as the upper-level device, and if that fails, it can be sent to the third device at the next higher level. To ensure application push efficiency, a single cabinet can only push and download installation packages from two cabinets simultaneously within a given time frame. That is, if multiple cabinets send installation package request commands to the same cabinet at the same time, no more installation package request commands will be accepted after two such requests.
[0058] In another embodiment, the second retry rule further includes that the first-level cabinet terminal is cabinet number 1. When cabinet number 1 fails to download the installation package from the server, it sends an installation package request instruction to the server. After the resent installation package from the server fails a specified number of times (e.g., 3 times), it is determined that there is a network fault between cabinet number 1 and the server. At this time, the server obtains the location information of cabinets other than cabinet number 1, processes the cabinet location information according to the preset push rules, and re-determines the first-level cabinet terminal until the first-level cabinet terminal successfully downloads and installs the installation package.
[0059] In this embodiment, after failing to download the installation package from the original download device, an installation package request command is sent to an installed device other than the original download device through retry rules. This flexibly adjusts the download path, avoids the impact of local network failures on the installation package download, and ensures the success rate of the installation package download.
[0060] Optionally, the local environment information includes the current application version number; step S30, namely determining whether the local environment information meets the local application upgrade conditions, includes:
[0061] S301. Obtain the application version number of the installation package;
[0062] S302. Determine whether the application version number is greater than the current application version number;
[0063] S303. If the application version number is less than or equal to the current application version number, then it is determined that the local environment information does not meet the local application upgrade conditions.
[0064] Understandably, the local environment information includes the current application version number of the current cabinet. The current cabinet determines the application version number of the installation package of the specified application based on the application information to be updated in the first application update instruction. If the application version number is less than or equal to the current application version number, it is determined that the local environment information does not meet the local application upgrade conditions, that is, the smart cabinet application of the current cabinet does not need to be upgraded or updated, to avoid duplicate installation or accidental application rollback.
[0065] This embodiment compares the application version number of the installation package to determine whether the smart cabinet application of the current cabinet needs to be upgraded or updated, thus avoiding application version confusion and affecting the user experience.
[0066] Optionally, the local environment information includes the current time information; step S302, i.e., after determining whether the application version number is greater than the current application version number, includes:
[0067] S3021. If the application version number is greater than the current application version number, then determine whether the current time information has reached the preset update time.
[0068] S3022. If the current time information reaches the preset update time, determine whether there is a cancellation task for terminating the installation package update;
[0069] S3023. If the cancellation task does not exist, obtain the current operation status of the cabinet.
[0070] S3024. If the operation state is in a no-service standby state, then it is determined that the local environment information meets the local application upgrade conditions.
[0071] Understandably, when installing the installation package, in addition to ensuring the application version number is greater than the current application version number, a series of upgrade conditions must also be met. In one embodiment, firstly, the cabinet terminal sets a preset update time (e.g., the idle period in the early morning). If the current time information of the cabinet terminal has not reached the preset update time or the preset update time for the current day's cycle has passed, the installation will be postponed to the preset update time of the next time cycle (e.g., the next day). Secondly, if someone performs business operations on the smart cabinet application during the installation process, the task is immediately canceled and the installation package update is stopped. If no one performs business operations on the smart cabinet application within 1 minute thereafter, the condition judgment continues. Finally, when there are no canceled tasks, the current operation status of the cabinet terminal is obtained. If the operation status is in a no-business standby state, such as the cabinet terminal page being on the homepage or screensaver page, it is determined that the local environment information meets the local application upgrade conditions, and the installation package can be installed.
[0072] This embodiment ensures the success rate of installation package installation by determining whether the local environment information of the current cabinet meets the local application upgrade conditions, thereby improving intelligence and user-friendliness and avoiding the impact of smart cabinet application updates on the user experience.
[0073] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0074] In one embodiment, a smart cabinet application update device is provided, which corresponds one-to-one with the smart cabinet application update method described in the above embodiments. For example... Figure 3 As shown, the smart cabinet application update device includes an update command receiving module 10, an installation package download module 20, a condition judgment module 30, an installation package installation module 40, and an update command sending module 50. Detailed descriptions of each functional module are as follows:
[0075] The update instruction receiving module 10 is used to receive a first application update instruction sent by an upper-layer device; the first application update instruction includes application information to be updated for a specified application; the upper-layer device is a server or an upper-layer cabinet.
[0076] The installation package download module 20 is used to download the installation package corresponding to the application information to be updated from the upper-layer device.
[0077] The condition judgment module 30 is used to obtain local environment information if the installation package is successfully downloaded, and to determine whether the local environment information meets the local application upgrade conditions.
[0078] The installation package installation module 40 is used to install the installation package if the local environment information meets the local application upgrade conditions.
[0079] The update instruction sending module 50 is used to send a second application update instruction to the lower-level device if the installation package is successfully installed, so that the lower-level device updates the specified application according to the second application update instruction; the lower-level device includes a plurality of lower-level cabinets; the second application update instruction includes the application information to be updated.
[0080] Optionally, the update instruction receiving module 10 includes:
[0081] The first unit for obtaining cabinet location information is used by the server to obtain cabinet location information.
[0082] The current cabinet unit is used by the server to process the cabinet location information according to preset push rules and determine the current cabinet.
[0083] The first application update instruction sending unit is used for the server to send the first application update instruction to the current cabinet.
[0084] Optionally, the update instruction sending module 50 includes:
[0085] The second unit for acquiring cabinet location information is used to acquire cabinet location information;
[0086] The lower-level device determination unit is used to process the cabinet location information according to preset push rules and determine the lower-level device.
[0087] Optionally, the installation package download module 20 includes:
[0088] The first installation package request instruction sending unit is configured to send a first installation package request instruction to the upper-layer device according to a first retry rule if the installation package download fails, so as to receive the installation package resent by the upper-layer device through the first installation package request instruction.
[0089] Optionally, the installation package download module 20 also includes:
[0090] The second installation package request instruction sending unit is used to send a second installation package request instruction to the target device according to a second retry rule if the installation package reception fails, so as to receive the installation package sent by the target device through the second installation package request instruction; the target device includes a first device at the same level as the current cabinet, a second device at the same level as the upper-level device and / or a third device at the next level above the upper-level device.
[0091] Optionally, the condition judgment module 30 includes:
[0092] An application version number acquisition unit is used to acquire the application version number of the installation package;
[0093] A version number size determination unit is used to determine whether the application version number is greater than the current application version number;
[0094] The version number condition determination unit is used to determine that the local environment information does not meet the local application upgrade conditions if the application version number is less than or equal to the current application version number.
[0095] Optionally, the condition judgment module 30 also includes:
[0096] A time determination unit is used to determine whether the current time information has reached a preset update time if the application version number is greater than the current application version number.
[0097] The task cancellation judgment unit is used to determine whether there is a task cancellation for terminating the installation package update if the current time information reaches the preset update time.
[0098] The operation status acquisition unit is used to acquire the current operation status of the cabinet if the cancellation task does not exist.
[0099] An operation status determination unit is used to determine that the local environment information meets the local application upgrade conditions if the operation status is in a no-service standby state.
[0100] Specific limitations regarding the smart cabinet application update device can be found in the limitations of the smart cabinet application update method described above, and will not be repeated here. Each module in the aforementioned smart cabinet application update device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0101] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a readable storage medium and internal memory. The readable storage medium stores an operating system, computer-readable instructions, and a database. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the readable storage medium. The database stores data related to the smart cabinet application update method. The network interface communicates with external terminals via a network connection. When the computer-readable instructions are executed by the processor, a smart cabinet application update method is implemented. The readable storage medium provided in this embodiment includes both non-volatile and volatile readable storage media.
[0102] In one embodiment, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor performs the following steps when executing the computer-readable instructions:
[0103] Receive a first application update instruction sent by an upper-layer device; the first application update instruction includes application information to be updated for a specified application; the upper-layer device is a server or an upper-layer cabinet.
[0104] Download the installation package corresponding to the application information to be updated from the upper-layer device;
[0105] If the installation package is downloaded successfully, the local environment information is obtained, and it is determined whether the local environment information meets the local application upgrade conditions.
[0106] If the local environment information meets the local application upgrade conditions, then install the installation package;
[0107] If the installation package is successfully installed, a second application update instruction is sent to the lower-level device so that the lower-level device updates the specified application according to the second application update instruction; the lower-level device includes a plurality of lower-level cabinets; the second application update instruction includes the application information to be updated.
[0108] In one embodiment, one or more computer-readable storage media storing computer-readable instructions are provided. The readable storage media provided in this embodiment include non-volatile readable storage media and volatile readable storage media. The readable storage media stores computer-readable instructions, which, when executed by one or more processors, perform the following steps:
[0109] Receive a first application update instruction sent by an upper-layer device; the first application update instruction includes application information to be updated for a specified application; the upper-layer device is a server or an upper-layer cabinet.
[0110] Download the installation package corresponding to the application information to be updated from the upper-layer device;
[0111] If the installation package is downloaded successfully, the local environment information is obtained, and it is determined whether the local environment information meets the local application upgrade conditions.
[0112] If the local environment information meets the local application upgrade conditions, then install the installation package;
[0113] If the installation package is successfully installed, a second application update instruction is sent to the lower-level device so that the lower-level device updates the specified application according to the second application update instruction; the lower-level device includes a plurality of lower-level cabinets; the second application update instruction includes the application information to be updated.
[0114] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware with computer-readable instructions. These computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When executed, these computer-readable instructions can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0115] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0116] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for updating smart cabinet applications, characterized in that, include: Receive a first application update instruction sent by an upper-layer device; the first application update instruction includes application information to be updated for a specified application; The upper-layer device is a server or an upper-layer cabinet; Download the installation package corresponding to the application information to be updated from the upper-layer device; If the installation package is downloaded successfully, the local environment information is obtained, and it is determined whether the local environment information meets the local application upgrade conditions. If the local environment information meets the local application upgrade conditions, then install the installation package; If the installation package is successfully installed, a second application update command is sent to the lower-level devices, so that the lower-level devices update the specified application according to the second application update command; the lower-level devices include a plurality of lower-level cabinets; the second application update command includes the application information to be updated; the first-level cabinets download the installation package through the server network, and the second-level cabinets are used as the lower-level devices of the first-level cabinets, and the application update command is sent from the first-level cabinets to the second-level cabinets; the third-level cabinets are used as the lower-level devices of the second-level cabinets, until the application update command is sent to the last cabinet, so that the cabinets outside the first level download the installation package according to the hierarchical structure; Wherein, when the upper-layer device is a server, before receiving the first application update instruction from the upper-layer device, the method further includes: The server obtains the location information of the cabinet; The server processes the cabinet location information according to preset push rules to determine the current cabinet. The server sends the first application update instruction to the current cabinet machine; After downloading the installation package corresponding to the application information to be updated from the upper-layer device, the process further includes: If the installation package download fails, a first installation package request instruction is sent to the upper-layer device according to the first retry rule, so as to receive the installation package resent by the upper-layer device through the first installation package request instruction. The first installation package request instruction is the installation package request instruction sent by the cabinet terminal to the original downloading device. If the installation package fails to be received, a second installation package request instruction is sent to the target device according to the second retry rule, so as to receive the installation package sent by the target device through the second installation package request instruction; the target device includes a first device at the same level as the current cabinet, a second device at the same level as the upper-level device and / or a third device at the next level above the upper-level device.
2. The smart cabinet application update method as described in claim 1, characterized in that, Before sending the second application update instruction to the lower-layer device, the method further includes: Obtain the location information of the cabinet unit; The cabinet location information is processed according to preset push rules to determine the lower-level device.
3. The smart cabinet application update method as described in claim 1, characterized in that, The local environment information includes the current application version number; The step of determining whether the local environment information meets the local application upgrade conditions includes: Obtain the application version number of the installation package; Determine whether the application version number is greater than the current application version number; If the application version number is less than or equal to the current application version number, then the local environment information is determined to not meet the local application upgrade conditions.
4. The smart cabinet application update method as described in claim 3, characterized in that, The local environment information includes the current time information; After determining whether the application version number is greater than the current application version number, the method further includes: If the application version number is greater than the current application version number, then determine whether the current time information has reached the preset update time; If the current time information reaches the preset update time, it is determined whether there is a cancellation task to stop the installation package update; If the cancellation task does not exist, obtain the current operating status of the cabinet. If the operation status is in a no-service standby state, then the local environment information is determined to meet the local application upgrade conditions.
5. A smart cabinet application update device, characterized in that, include: The update instruction receiving module is used to receive a first application update instruction sent by the upper-layer device; the first application update instruction includes the application information to be updated for a specified application; The upper-layer device is a server or an upper-layer cabinet; The installation package download module is used to download the installation package corresponding to the application information to be updated from the upper-layer device. The condition judgment module is used to obtain local environment information if the installation package is successfully downloaded, and to determine whether the local environment information meets the local application upgrade conditions. The installation package installation module is used to install the installation package if the local environment information meets the local application upgrade conditions. An update instruction sending module is used to send a second application update instruction to lower-level devices if the installation package is successfully installed, so that the lower-level devices update the specified application according to the second application update instruction; the lower-level devices include a plurality of lower-level cabinets; the second application update instruction includes the application information to be updated; the first-level cabinets download the installation package through the server network, and the second-level cabinets are used as the lower-level devices of the first-level cabinets, and the application update instruction is sent from the first-level cabinets to the second-level cabinets; the third-level cabinets are used as the lower-level devices of the second-level cabinets, until the application update instruction is sent to the last cabinet, so that the cabinets outside the first level download the installation package according to the hierarchical structure; The update instruction receiving module includes: The first unit for obtaining cabinet location information is used by the server to obtain cabinet location information. The current cabinet unit is used by the server to process the cabinet location information according to preset push rules and determine the current cabinet. The first application update instruction sending unit is used for the server to send the first application update instruction to the current cabinet machine; The installation package download module includes: The first installation package request instruction sending unit is used to send a first installation package request instruction to the upper-layer device according to the first retry rule if the installation package download fails, so as to receive the installation package resent by the upper-layer device through the first installation package request instruction. The first installation package request instruction is an installation package request instruction sent by the cabinet terminal to the original downloading device. The second installation package request instruction sending unit is used to send a second installation package request instruction to the target device according to a second retry rule if the installation package reception fails, so as to receive the installation package sent by the target device through the second installation package request instruction; the target device includes a first device at the same level as the current cabinet, a second device at the same level as the upper-level device and / or a third device at the next level above the upper-level device.
6. A computer device comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, characterized in that, When the processor executes the computer-readable instructions, it implements the smart cabinet application update method as described in any one of claims 1 to 4.
7. A computer-readable storage medium storing computer-readable instructions, characterized in that, When the computer-readable instructions are executed by one or more processors, the one or more processors cause the smart cabinet application update method as described in any one of claims 1 to 4 to be performed.
Citation Information
Patent Citations
Express cabinet information transmission method, device and system, express cabinet and storage medium
CN109873867A
Upgrading method and device, terminal and storage medium
CN114422357A
Automated teller machine and file downloading method thereof
KR101416642B1