Local network-based application installation method, device, medium and equipment
Patent Information
- Application Number
- CN202610727188.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-25
- Publication Date
- 2026-10-13
AI Technical Summary
[0021]与现有技术相比,本发明提供了一种基于本地网络的应用程序安装方法、装置、介质及设备。其方法应用于第一设备,包括:获取每个第二设备广播的应用程序安装包的信息,其中,所述第一设备和每个第二设备处于同一本地网络,且每个第二设备实时广播自身本地存储的应用程序安装包的信息,所述信息至少包括应用程序安装包的摘要、版本号和包大小;针对获取到的每个信息,根据所述第一设备本地存储的应用程序安装包的信息,判断是否满足预设第一触发规则,若满足,则生成对应的下载任务,以及确定所述下载任务的优先级,并将所述下载任务送入下载任务队列,其中,所述下载任务队列中的下载任务按照优先级和包大小排序;基于预设下载任务调度策略,调度所述下载任务队列中的每个下载任务执行,以将对应的应用程序安装包下载到本地,并生成对应的安装任务,将对应的下载任务的优先级确定为其优先级,将所述安装任务送入安装任务队列,其中,所述安装任务队列中的安装任务按照优先级排序;基于预设安装任务调度策略,调度所述安装任务队列中的每个安装任务执行,以完成对应的应用程序安装。本发明可根据实时获取的同一本地网络中的其它设备中的应用程序安装包信息与预设触发规则,自主触发生成下载任务,并可根据预设下载任务调度策略,自主调度、执行下载并生成对应的安装任务,以及可根据预设安装任务调度策略,以任务形式自主调度、执行安装。可提高本地网络设备资源利用率,且无需消耗公网流量,用户可自主设置下载触发规则、下载时机和安装时机,可实现应用程序安装包的无感下载、安装,降低了下载、安装对设备和用户的影响,极大提升了用户体验。
Smart Images

Figure CN122903009A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of local network device technology, and more particularly to a technology for installing applications based on a local network. Background Technology
[0002] With the vast increase in application scenarios and applications, installing new applications on smartphones, tablets and other devices, as well as updating existing applications to fix vulnerabilities, add new features and improve user experience, has become a frequent occurrence for users.
[0003] In existing technologies, each time a new application is installed or an existing application is updated, the user needs to interact with the system to download the installation or update package from the service provider's server via the public internet. After the download is complete, the installation is usually automatic, which not only consumes data, but also prevents users from manually setting the timing of the download and installation, resulting in a poor user experience.
[0004] Therefore, how to provide an application installation solution that allows users to set the timing of application package downloads and installations without consuming public network bandwidth is a technical problem that urgently needs to be solved. Summary of the Invention
[0005] In order to at least partially solve the above-mentioned technical problems, the purpose of this invention is to provide a method, apparatus, medium and device for installing applications based on a local network.
[0006] According to one aspect of the present invention, a method for installing an application based on a local network is provided, applied to a first device, wherein the method includes: Obtain information about the application installation package broadcast by each second device, wherein the first device and each second device are on the same local network, and each second device broadcasts information about the application installation package stored locally in real time, the information including at least a summary, version number and package size of the application installation package; For each piece of information obtained, based on the information of the application installation package stored locally on the first device, it is determined whether it meets the preset first triggering rule. If it does, a corresponding download task is generated, the priority of the download task is determined, and the download task is sent to the download task queue. The download tasks in the download task queue are sorted according to priority and package size. Based on a preset download task scheduling strategy, each download task in the download task queue is scheduled to be executed to download the corresponding application installation package to the local machine and generate a corresponding installation task. The priority of the corresponding download task is determined as its priority, and the installation task is sent to the installation task queue. The installation tasks in the installation task queue are sorted according to their priority. Based on a preset installation task scheduling strategy, each installation task in the installation task queue is scheduled to be executed to complete the installation of the corresponding application.
[0007] Optionally, the step of scheduling each download task in the download task queue to download the corresponding application installation package to the local machine based on a preset download task scheduling strategy includes: Based on the priority of each download task in the download task queue, For the highest priority download task, when the network environment and power status of the first device meet the preset second triggering rule, the corresponding download task is scheduled to be executed so as to download the corresponding application installation package to the local device. For download tasks that are not of the highest priority, when the first device is idle, if the device status, network environment, and power status of the first device meet the preset third triggering rule, the corresponding download tasks are scheduled to be executed in priority order to download the corresponding application installation package to the local device. Download tasks of the same priority are executed in parallel. If the device status, network environment, and power status of the first device meet the preset fourth triggering rule, the corresponding download tasks are scheduled to be executed in priority order to download the corresponding application installation package to the local device. Download tasks of the same priority are executed in order of package size of the corresponding application installation package.
[0008] Optionally, the determination of the device status of the first device includes: The device status of the first device is determined based on at least one of the following data acquired in real time from the first device: CPU utilization, memory usage, screen status, background process activity, and operation interval time.
[0009] Optionally, the determination of the network environment of the first device includes: The network environment of the first device is determined based on the real-time acquisition of the first device's local network connection status, bandwidth, packet loss rate, and local network latency.
[0010] Optionally, determining the power state of the first device includes: The power state of the first device is determined based on the real-time charging status and battery level of the first device.
[0011] Optionally, the determination of the user's idle time period includes: The user's historical usage data of the first device is obtained and statistically analyzed. Based on the statistical results, a user profile is determined, wherein the user profile includes at least the user's idle time periods.
[0012] Optionally, the execution of the download task corresponding to the scheduling to download the corresponding application installation package to the local machine includes: Establish a point-to-point connection between the first device and a second device that broadcasts information about the application installation package; Based on the peer-to-peer connection, the application installation package is downloaded from the second device to the local machine.
[0013] Optionally, the download progress of the application installation package is recorded while downloading the application installation package.
[0014] Optionally, if the download of the application installation package is interrupted due to an exception, the method further includes: Once the anomaly is resolved and the peer-to-peer connection is restored, the download resumes from the point of interruption, based on the recorded download progress.
[0015] Optionally, the step of scheduling each installation task in the installation task queue to complete the installation of the corresponding application based on a preset installation task scheduling strategy includes: Based on the priority of each installation task in the installation task queue, For the highest priority installation task, the corresponding installation task is directly scheduled to be executed to complete the installation of the corresponding application; For installation tasks that are not of the highest priority, when the device status of the first device is idle and the storage space meets the preset conditions, the corresponding installation tasks are scheduled to be executed in priority order to complete the installation of the corresponding application. Among them, installation tasks of the same priority are executed in the order of timestamps when they enter the installation task queue. If the corresponding low version application is not installed on the first device, the corresponding application installation package is directly installed. If the application is already installed on the first device, the corresponding application installation package is differentially installed to update the low version application already installed on the first device.
[0016] Optionally, when installing the application installation package, the application installation package is digitally signed and its file integrity is verified. If the verification is successful, the application installation package is installed and the installation process is recorded.
[0017] Optionally, if the application installation package fails to install, the method further includes: Perform a rollback to restore the system to its pre-installation state.
[0018] According to another aspect of the present invention, a local network-based application installation apparatus is provided, deployed on a first device, wherein the apparatus comprises: The first module is used to obtain information about the application installation package broadcast by each second device, wherein the first device and each second device are on the same local network, and each second device broadcasts information about its own stored application installation package in real time through a deployed distribution module. The information includes at least a summary, version number and package size of the application installation package. The second module is used to determine whether each piece of information obtained meets the preset first triggering rule based on the information of the application installation package stored locally on the first device. If it does, a corresponding download task is generated, the priority of the download task is determined, and the download task is sent to the download task queue. The download tasks in the download task queue are sorted according to priority and package size. The third module is used to schedule each download task in the download task queue to be executed based on a preset download task scheduling strategy, so as to download the corresponding application installation package to the local machine and generate the corresponding installation task, determine the priority of the corresponding download task as its priority, and send the installation task into the installation task queue, wherein the installation tasks in the installation task queue are sorted according to priority. The fourth module is used to schedule each installation task in the installation task queue to be executed based on a preset installation task scheduling strategy, so as to complete the installation of the corresponding application.
[0019] According to another aspect of the present invention, a computer-readable medium is provided, wherein computer-readable instructions are stored on the computer-readable medium, and, in combination with a practical application scenario, the computer-readable instructions can be executed by a processor to implement part or all of any of the above methods.
[0020] According to another aspect of the present invention, a smart device is provided, wherein the device comprises: One or more processors; and a memory storing computer-readable instructions that, when executed, cause the processor to perform some or all of the operations described above, depending on the specific application scenario.
[0021] Compared with existing technologies, the present invention provides an application installation method, apparatus, medium, and device based on a local network. The method is applied to a first device and includes: acquiring information about application installation packages broadcast by each second device, wherein the first device and each second device are on the same local network, and each second device broadcasts information about its locally stored application installation packages in real time, the information including at least a summary, version number, and package size of the application installation package; for each acquired information, determining whether a preset first triggering rule is met based on the information of the application installation package locally stored on the first device, if so, generating a corresponding download task, determining the priority of the download task, and sending the download task to a download task queue, wherein the download tasks in the download task queue are sorted according to priority and package size; scheduling each download task in the download task queue to execute based on a preset download task scheduling strategy to download the corresponding application installation package to the local network and generate a corresponding installation task, determining the priority of the corresponding download task as its priority, and sending the installation task to an installation task queue, wherein the installation tasks in the installation task queue are sorted according to priority; and scheduling each installation task in the installation task queue to execute based on a preset installation task scheduling strategy to complete the installation of the corresponding application. This invention can autonomously trigger and generate download tasks based on real-time acquisition of application installation package information from other devices on the same local network and preset trigger rules. It can also autonomously schedule and execute downloads and generate corresponding installation tasks according to preset download task scheduling strategies, and autonomously schedule and execute installations as tasks according to preset installation task scheduling strategies. This improves the utilization rate of local network device resources without consuming public network bandwidth. Users can independently set download trigger rules, download timing, and installation timing, enabling seamless download and installation of application packages, reducing the impact of downloads and installations on devices and users, and greatly enhancing the user experience. Attached Figure Description
[0022] Other features, objects, and technical effects of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 A schematic diagram is shown of a local network-based application installation method for a first device according to one aspect of the present invention. Figure 2 A schematic diagram of a local network-based application installation apparatus deployed on a first device according to another aspect of the present invention is shown. The same or similar reference numerals in the accompanying drawings represent the same or similar parts. Detailed Implementation
[0023] The present invention will now be described in further detail with reference to the accompanying drawings.
[0024] In a typical configuration of various embodiments of the present invention, the method execution entity, trusted parties of the system, and / or modules of the device may include one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0025] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0026] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.
[0027] To further illustrate the technical means adopted and the effects achieved by the present invention, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings and embodiments and / or optional embodiments.
[0028] Figure 1 The diagram illustrates a method for installing an application based on a local network according to one aspect of the present invention, applied to a first device, wherein one embodiment of the method includes: S101 Obtain information about the application installation package broadcast by each second device, wherein the first device and each second device are on the same local network, and each second device broadcasts information about the application installation package stored locally in real time, the information including at least a summary, version number and package size of the application installation package; S102 For each piece of information obtained, based on the information of the application installation package stored locally on the first device, it is determined whether the preset first triggering rule is met. If it is met, a corresponding download task is generated, the priority of the download task is determined, and the download task is sent to the download task queue. The download tasks in the download task queue are sorted according to priority and package size. S103 schedules each download task in the download task queue to be executed based on a preset download task scheduling strategy, so as to download the corresponding application installation package to the local machine and generate a corresponding installation task. The priority of the corresponding download task is determined as its priority, and the installation task is sent to the installation task queue. The installation tasks in the installation task queue are sorted according to priority. S104 schedules each installation task in the installation task queue to be executed based on a preset installation task scheduling strategy in order to complete the installation of the corresponding application.
[0029] This invention provides a method for installing applications based on a local network, applied to a first device 10, implemented through relevant software / firmware deployed on the first device 10. In the technical solution protected by this invention, the first device 10 and the second device 20 are smartphones, tablets, wearable devices, smart home devices, NAS (Network Attached Storage), etc., capable of accessing a local network. The local network can be a WiFi wireless local area network, such as in homes, offices, or campuses where WiFi wireless access is available. The local network does not rely on cellular mobile networks or other types of public communication networks (hereinafter referred to as public networks). This is merely an example; other existing or future devices and / or resource platforms suitable for this invention should also be included within the scope of protection of this invention.
[0030] In this invention, the first device 10 and each of the second devices 20 are equipped with relevant software / firmware. The first device 10 and each of the second devices 20 are located on the same local network. When each device powers on, completes initialization, and connects to the local network, it broadcasts relevant information in real time within its local network. In this embodiment, in step S101, the first device 10 can obtain in real time information about one or more application installation packages locally stored by each of the second devices 20 broadcasting information from the second device 20. The information for each broadcast application installation package includes at least a summary, version number, and package size. The first device 10 can generate a visual application status map based on the information of its locally stored application installation packages and the information of the application installation packages broadcast in real time by each of the second devices 20. In this context, after the first device 10 and each second device 20 in the local network download the application installation package through any channel (e.g., downloading from other devices through the local network or downloading from a server through the public network), they will store it locally and broadcast information such as the summary, version number, and package size of the application installation package in real time. The summary can be used to understand the vulnerabilities to be fixed, new features, and / or importance of the application version number, and the different versions of the application can be compared based on the version number.
[0031] Continuing in this embodiment, in step S102, the first device 10 can compare the information of each application installation package obtained in step S101 with the information of application installation packages already stored locally to determine whether it meets the preset first triggering rule. If it does, a download task corresponding to the application package is generated, the priority of the download task is determined, and the download task is sent to the download task queue. The download tasks in the download task queue are sorted according to the priority of the download task and the package size of the corresponding application installation package.
[0032] An example, the preset first trigger rule may include: 1. When a second device 20 broadcasts information about an application installation package, if the first device 10 does not have any version of the application installation package stored locally, a download task corresponding to the application installation package is triggered.
[0033] 2. When a second device 20 broadcasts information about an application installation package, if the first device 10 has already stored a lower version of the application installation package locally, a download task corresponding to the application installation package is triggered.
[0034] 3. When receiving information about an application installation package broadcast by a second device 20, if the first device 10 has already stored the same version number of the application installation package locally, but the summary content in the information is inconsistent, then a download task corresponding to the application installation package is triggered (integrity repair or reinstallation can be performed later).
[0035] Specifically, for the application installation package to be downloaded, the priority can be determined based on the summary content in its information when generating the corresponding download task. For example, the priority of download tasks, from highest to lowest, could include: urgent updates, vulnerability fixes, frequently used applications, feature updates, regular updates, and new installations.
[0036] Continuing in this embodiment, in step S103, the first device 10 can schedule each download task in the download task queue to be executed according to a preset download task scheduling strategy, so as to download the application installation package corresponding to the download task to the local machine and generate a corresponding installation task, determine the priority of the download task as the priority of the corresponding installation task, and send the installation task to the installation task queue, wherein the installation tasks in the installation task queue are sorted according to their priority.
[0037] Continuing in this embodiment, in step S104, the first device 10 can schedule each installation task in the installation task queue to be executed according to a preset installation task scheduling strategy, so as to complete the installation of the application installation package corresponding to the installation task and install and deploy the corresponding application on the first device 10.
[0038] In this invention, after the first device 10 is powered on and initialized, it monitors relevant data from multiple dimensions in real time. Based on the monitored data, it determines the device status, network environment, power status, storage space, and user profile, including information such as user idle time periods. Then, based on the device status, network environment, power status, storage space, and / or user idle time periods, and in conjunction with a preset download task scheduling strategy, it schedules download tasks and installation tasks. The device status can include idle and non-idle states; the network environment can include conditions that meet download criteria and conditions that do not; and the power status can include conditions that meet download criteria and conditions that do not.
[0039] Optionally, the determination of the device status of the first device 10 includes: The device status of the first device 10 is determined based on at least one of the following data acquired in real time from the first device 10: CPU utilization, memory usage, screen status, background process activity, and operation interval time.
[0040] In this optional embodiment, the first device 10 can determine the device status of the first device 10 based on one or more data related to it acquired in real time. The data acquired in real time may include: the CPU utilization rate (percentage) of the first device 10, the memory utilization rate (percentage), the screen status (on or off), the background process activity (which can be obtained through the standard API interface of the operating system), and the interval time between user operations (idle or busy, for example, no operation for 5 consecutive minutes can be regarded as the device status is idle).
[0041] Optionally, the determination of the network environment of the first device 10 includes: The network environment of the first device 10 is determined based on the real-time acquisition of the local network connection status, bandwidth, packet loss rate, and local network latency of the first device 10.
[0042] In this optional embodiment, the first device 10 can determine its network environment based on multiple data related to its network connection acquired in real time. The data acquired in real time may include: the local network connection status of the first device 10 (connected or not connected), the real-time bandwidth (typically in Mbps) in the connected state, the packet loss rate (percentage), and the local network latency (typically in milliseconds). This data can be obtained through standard network-related API interfaces of the operating system.
[0043] Optionally, determining the power state of the first device 10 includes: The power state of the first device 10 is determined based on the real-time charging status and battery level of the first device 10.
[0044] In this optional embodiment, the first device 10 can determine its power state based on its real-time charging status and battery level. The charging status of the first device 10 can include charging and not charging. When charging, the charging connection type (wired / wireless) and charging mode (fast charging / slow charging) can be further acquired. Additionally, the battery health can be acquired in real-time and used together with the charging status and battery level to determine the power state of the first device 10. This relevant data can be obtained through the API interface related to the system power management service.
[0045] Optionally, the determination of the user idle time period of the first device 10 includes: The system acquires and statistically analyzes the historical usage data of the user on the first device 10, and determines the user profile based on the statistical results. The user profile includes at least the user's idle time periods.
[0046] In this optional embodiment, the first device 10 can obtain the historical usage data of the user using the first device 10. For example, the user's historical usage data can be obtained from various related logs. Statistics can be performed from dimensions such as device usage time, frequency of use of different applications or functions, usage time, and interactive operations. Based on the statistical results, the user profile of the user can be determined. The user profile includes at least the user's idle time when the user does not operate the first device 10.
[0047] Optionally, in step S103, scheduling each download task in the download task queue to be executed based on a preset download task scheduling strategy to download the corresponding application installation package to the local machine includes: Based on the priority of each download task in the download task queue, For the highest priority download task, when the network environment and power status of the first device meet the preset second triggering rule, the corresponding download task is scheduled to be executed so as to download the corresponding application installation package to the local device. For download tasks that are not of the highest priority, when the first device is idle, if the device status, network environment, and power status of the first device meet the preset third triggering rule, the corresponding download tasks are scheduled to be executed in priority order to download the corresponding application installation package to the local device. Download tasks of the same priority are executed in parallel. If the device status, network environment, and power status of the first device meet the preset fourth triggering rule, the corresponding download tasks are scheduled to be executed in priority order to download the corresponding application installation package to the local device. Download tasks of the same priority are executed in order of package size of the corresponding application installation package.
[0048] In this invention, the download task queue obtained in step S102 is sorted according to download task priority. Tasks with the same priority are sorted according to the size of the application installation package corresponding to that download task. In this optional embodiment, in step S103, the first device 10, according to a preset download task scheduling strategy, should first process the download task with the highest priority. Specifically, when the network environment and power status of the first device 10 both meet the preset second triggering rule, the download task with the highest priority is scheduled for execution to download the application installation package corresponding to that download task to the local machine of the first device 10. Secondly, for download tasks that are not of the highest priority, when the first device 10 is in a user idle period, if the device status, network environment, and power status of the first device 10 meet the preset third triggering rule, the download tasks are scheduled to be executed in priority order to download the application installation packages corresponding to the corresponding download tasks to the local machine of the first device 10. If there are multiple download tasks with the same priority, it is not necessary to schedule the download tasks to be executed in order of package size of the application installation packages corresponding to the download tasks. Instead, multiple threads can be executed simultaneously to download the application installation packages corresponding to the download tasks with the same priority at the same time, thereby improving download efficiency. If the device status, network environment, and power status of the first device 10 meet the preset fourth triggering rule, the download tasks are scheduled to be executed in priority order to download the application installation packages corresponding to the corresponding download tasks to the local machine of the first device 10. If there are multiple download tasks with the same priority, the download tasks are scheduled to be executed in order of package size of the application installation packages corresponding to the download tasks, thereby downloading the application installation packages corresponding to the download tasks with the same priority in sequence to avoid excessive power consumption and affecting the performance stability of the first device 10.
[0049] This optional embodiment employs multi-dimensional collaboration and personalized matching, allowing for silent downloading at appropriate times, which greatly reduces download power consumption and impact on users.
[0050] An example, a preset second triggering rule may include: 1. Network environment: Meets the download conditions, wherein the local network is connected and the real-time bandwidth, packet loss rate and local network latency are all within the normal range (i.e. within the preset threshold range, wherein the preset threshold can be adjusted according to the device configuration and / or business strategy in the actual application scenario, for example, bandwidth greater than or equal to 10Mbps, packet loss rate less than or equal to 1%, and local network latency less than or equal to 0.5 milliseconds).
[0051] 2. Power status: Meets the download conditions, wherein the charging status is in the charging stage; or the charging status is not in the charging stage, and the battery level is greater than or equal to a preset threshold (e.g., 20%). Furthermore, the preset threshold can be dynamically adjusted according to the real-time battery health status. For example, if the battery health status is lower than 80%, the battery level will be dynamically adjusted to be greater than or equal to 30%.
[0052] Preset third trigger rules may include: 1. Device status: Idle.
[0053] 2. Network environment: The conditions for downloading are met, with the local network connected and real-time bandwidth, packet loss rate, and local network latency all within normal ranges.
[0054] 3. Power status: The device meets the download conditions, specifically the charging status, which is fast charging, and the battery level is greater than or equal to a preset threshold (e.g., 30%).
[0055] The preset fourth trigger rule may include: 1. Device status: Idle.
[0056] 2. Network environment: The conditions for downloading are met, with the local network connected and real-time bandwidth, packet loss rate, and local network latency all within normal ranges.
[0057] 3. Power status: The battery is charging, the charging mode is slow charging, and the battery level is greater than or equal to a preset threshold (e.g., 20%).
[0058] Optionally, in step S103, the execution of the corresponding download task to download the corresponding application installation package to the local machine includes: Establish a point-to-point connection between the first device and a second device that broadcasts information about the application installation package; Based on the peer-to-peer connection, the application installation package is downloaded from the second device to the local machine.
[0059] In this optional embodiment, in step S103, the first device 10 schedules the execution of the download task according to a preset download task scheduling strategy. First, the first device 10 sends a request to the second device 20 in the same local network that broadcasts the information of the application installation package corresponding to the download task, so as to autonomously establish a peer-to-peer (P2P) connection between the first device 10 and the second device 20 at the communication link layer, without user intervention. After the P2P connection between the two is successfully established, data can be transmitted through the P2P connection. The first device 10 can obtain the application installation package corresponding to the download task from the second device 20 based on relevant protocols (e.g., HTTP / HTTPS, LAN file transfer protocol, or custom transfer protocol, etc.) and download it to the local machine of the first device 10.
[0060] Optionally, the download progress of the application installation package is recorded while downloading the application installation package.
[0061] In this optional embodiment, when the first device 10 performs a download task to download an application installation package from the second device 20 corresponding to the download task to the local machine of the first device 10, the download progress of the application installation package is also recorded during the download process.
[0062] Optionally, if the download of the application installation package is interrupted due to an exception, the method further includes: Once the anomaly is resolved and the peer-to-peer connection is restored, the download resumes from the point of interruption, based on the recorded download progress.
[0063] In this optional embodiment, if the download of the application installation package is interrupted due to an exception during the download process of the first device 10, the first device 10 can resume the download from the point of interruption once the exception is resolved and the point-to-point connection between the first device 10 and the corresponding second device 20 is restored, based on the recorded download progress of the application installation package. The second device 20 at the other end should have a resume function to support resuming downloads from the point of interruption. This improves download efficiency.
[0064] Optionally, if the download of the application installation package is interrupted due to an error during the download process of the first device 10, and the error cannot be quickly eliminated, the application installation package can still be downloaded from the server via the public network when the first device 10 can connect to the public network; if the server supports resuming interrupted downloads, the download can continue according to the recorded download progress; if it does not support resuming interrupted downloads, the download will be restarted.
[0065] Optionally, in step S104, scheduling each installation task in the installation task queue to execute based on a preset installation task scheduling strategy to complete the installation of the corresponding application includes: Based on the priority of each installation task in the installation task queue, For the highest priority installation task, the corresponding installation task is directly scheduled to be executed to complete the installation of the corresponding application; For installation tasks that are not of the highest priority, when the device status of the first device is idle and the storage space meets the preset conditions, the corresponding installation tasks are scheduled to be executed in priority order to complete the installation of the corresponding application. Among them, installation tasks of the same priority are executed in the order of timestamps when they enter the installation task queue. If the corresponding low version application is not installed on the first device, the corresponding application installation package is directly installed. If the application is already installed on the first device, the corresponding application installation package is differentially installed to update the low version application already installed on the first device.
[0066] In this invention, the installation task queue obtained through step S103 contains installation tasks ordered according to their priority. In this optional embodiment, in step S104, the first device 10 can, according to a preset installation task scheduling strategy, first process the installation task with the highest priority. For the highest priority (urgent update) installation task, the corresponding installation task is directly scheduled for execution to complete the installation of the corresponding application in the first device 10. Secondly, for installation tasks that are not of the highest priority, when the device status of the first device 10 is idle and the storage space meets the preset conditions, the corresponding installation tasks are scheduled to be executed in priority order to complete the installation of the corresponding application in the first device 10. Among them, installation tasks of the same priority are automatically triggered to be executed in the order of their timestamps when they enter the installation task queue, so as to improve installation efficiency. For an installation task, if the corresponding low version of the application is not installed in the first device 10, the application installation package corresponding to the installation task can be directly installed in the first device 10. If the corresponding application is already installed in the first device 10 but the version is low, the corresponding application installation package can be differentially installed in the first device 10 to update the low version of the application already installed in the first device 10, which can improve installation efficiency.
[0067] For example, for installation tasks that are not of the highest priority, when the first device 10 is idle and the available capacity of its storage space is at least a preset multiple of the package size of the application installation package corresponding to the task to be installed (the available capacity is mainly used for application installation package verification, decompression / differential synthesis, temporary files and / or reserved rollback space. The preset multiple can be adjusted according to the device configuration, application type and installation method in the actual application scenario. For example, the preset multiple is set to 1.2 times), the corresponding installation task in the installation task queue can be scheduled to be executed in priority order so as to complete the seamless installation of the corresponding application in the first device 10.
[0068] Optionally, when installing the application installation package, the application installation package is digitally signed and its file integrity is verified. If the verification is successful, the application installation package is installed and the installation process is recorded.
[0069] In this invention, the application installation packages locally stored on the first device 10 and the second device 20 may further include digital signature and file integrity verification mechanisms to prevent tampering or damage, thereby improving security. In this optional embodiment, when the first device 10 executes an installation task to install the digitally signed application installation package corresponding to the installation task on the first device 10, before starting the installation of the application installation package, the digital signature and file integrity of the application installation package may be verified first. If the verification passes, the installation of the application installation package will begin, and the installation process of the application installation package will be recorded. If the verification fails, it indicates that the application installation package has been tampered with or its file integrity has been damaged, and successful and complete installation cannot be guaranteed, so the installation is abandoned.
[0070] Optionally, if the application installation package fails to install, the method further includes: Perform a rollback to restore the system to its pre-installation state.
[0071] In this optional embodiment, if the installation of the application package fails due to an anomaly (e.g., file corruption, compatibility issues, etc.) during the installation process of the application package on the first device 10, the first device 10 can automatically perform a rollback, uninstall the partially installed data, and restore the device to its pre-installation state. Specifically, if it is a differential update, the device will restore to the previous, lower version.
[0072] Optionally, the first device 10 may also record the execution status of the installation task in the above embodiments and / or optional embodiments of the present invention, which may include: download result (success or failure), installation result (success or failure), download source (second device 20 on the local network or public network server), download time, traffic consumption (local network or public network), download error information, installation error information, etc. The recorded relevant information can be used for statistics or querying.
[0073] The specific values shown in the examples of the above embodiments and / or optional embodiments of the present invention are merely examples, and the actual values can be set according to the actual application scenario and the resource configuration of the first device 10.
[0074] In an exemplary home Wi-Fi network application scenario, user A's first device 10 (e.g., a smartphone) and second device 20 (e.g., a tablet) are connected to the home Wi-Fi network, which can connect to the public internet. User A typically doesn't use the first device 10 after 11:00 PM and starts charging it at 11:30 PM. Assume the second device 20 has stored the installation package of application B, with a package size of 100MB, but the first device 10 does not have the installation package for application B and has not installed application B. When the second device 20 broadcasts information about the installation package of application B (including package summary, version number, and package size) on the Wi-Fi network, the first device 10 can obtain this information, trigger the generation of a download task according to a preset first triggering rule, determine the priority of the download task (new installation), and send it to the download task queue. At 23:10, if the first device 10 determines, based on real-time monitoring of multi-dimensional data, that its device status, network environment, and power status meet the preset download task scheduling strategy, then it schedules the download task from the download task queue for execution. This includes: establishing a P2P connection between the first device 10 and the second device 20; then, through this P2P connection, the first device 10 silently downloads the installation package of application B from the second device 20 to its local storage without consuming public network traffic; generating a corresponding installation task; determining the priority of the installation task; and sending it to the installation task queue. At 23:35, if the first device 10 determines, based on real-time monitoring of multi-dimensional data, that its device is in an idle state and its storage space meets preset conditions, then it schedules the installation task from the installation task queue for execution to silently install application B on the first device 10.
[0075] If the second device 20 shuts down when the download is 50% complete, the first device 10 can automatically connect to the relevant server on the public network based on the information of application B and resume the download. If the server supports resuming interrupted downloads, it can also continue the remaining 50% of the download based on the recorded download progress until completion. In this case, only the corresponding public network bandwidth is consumed. If the server does not support resuming interrupted downloads, the download will need to be restarted, consuming the corresponding public network bandwidth.
[0076] Through the above embodiments and / or optional embodiments of the present invention, as long as one device (second device 20) in the local network has downloaded an application installation package from a public network server, any other device in the local network (first device 10), after obtaining the application installation package information broadcast by that device, can download the corresponding application installation package from that device in the form of a task according to preset triggering rules and preset download task scheduling strategies, and install it in the form of a task according to preset installation task scheduling strategies. This improves the utilization rate of local network device resources and can be done without consuming public network traffic. Users can independently set download triggering rules, download timing, and installation timing, enabling seamless downloading and installation of application installation packages, reducing the impact of downloading and installation on devices and users, and greatly improving the user experience.
[0077] Figure 2 This invention illustrates a local network-based application installation apparatus, deployed on a first device, according to another aspect of the present invention, wherein, in one embodiment, the apparatus includes: The first module 210 is used to obtain information about the application installation package broadcast by each second device, wherein the first device and each second device are on the same local network, and each second device broadcasts information about its own stored application installation package in real time through a deployed distribution module. The information includes at least a summary, version number and package size of the application installation package. The second module 220 is used to determine whether a preset first triggering rule is met for each piece of information obtained, based on the information of the application installation package stored locally on the first device. If the rule is met, a corresponding download task is generated, the priority of the download task is determined, and the download task is sent to the download task queue. The download tasks in the download task queue are sorted according to priority and package size. The third module 230 is used to schedule each download task in the download task queue to be executed based on a preset download task scheduling strategy, so as to download the corresponding application installation package to the local machine and generate a corresponding installation task, determine the priority of the corresponding download task as its priority, and send the installation task into the installation task queue, wherein the installation tasks in the installation task queue are sorted according to priority. The fourth module 240 is used to schedule the execution of each installation task in the installation task queue based on a preset installation task scheduling strategy, so as to complete the installation of the corresponding application.
[0078] In this embodiment of the device, the device is deployed in a first device, and the hardware and software environment of the first device is the same as that of the aforementioned first device 10.
[0079] In this embodiment of the device, the first module 210 can obtain in real time information about one or more application installation packages locally stored by each second device 20 in the local network, broadcast by the device. The information for each broadcast application installation package includes at least a summary, version number, and package size. The first module 210 can generate a visual application status map of the first device 10 based on the information of the application installation packages locally stored by the first device 10 and the information of the application installation packages locally stored by each second device 20 broadcast in real time. Regardless of the channel through which the first device 10 and each second device 20 downloads the application installation package (e.g., downloading from other devices via the local network or from a server via the public internet), they will store the application installation package locally and broadcast information such as the application installation package summary, version number, and package size in real time.
[0080] Continuing with this device embodiment, the second module 220 of the device can compare the information of each application installation package obtained by the first module 210 with the information of application installation packages already stored locally on the first device 10 to determine whether a preset first triggering rule is met. If it is met, a download task corresponding to the application package is generated, the priority of the download task is determined, and the download task is sent to the download task queue. The download tasks in the download task queue are sorted according to the priority of the download task and the package size of the corresponding application installation package.
[0081] Continuing with this device embodiment, the third module 230 of the device can schedule the execution of each download task in the download task queue according to a preset download task scheduling strategy, so as to download the application installation package corresponding to the download task to the local device 10, generate a corresponding installation task in the first device 10, determine the priority of the download task as the priority of its corresponding installation task, and send the installation task to the installation task queue, wherein the installation tasks in the installation task queue are sorted according to their priority.
[0082] Continuing with this device embodiment, the fourth module 240 of the device can schedule each installation task in the installation task queue of the first device 10 to be executed according to a preset installation task scheduling strategy, so as to complete the installation of the application installation package corresponding to the installation task and install and deploy the corresponding application on the first device 10.
[0083] In the above-described device embodiments, the various components of the device can achieve the same functions as those not mentioned in the aforementioned related method embodiments and / or optional embodiments, and will not be repeated here.
[0084] According to another aspect of the present invention, a computer-readable medium is also provided, the computer-readable medium storing computer-readable instructions that can be executed by a processor to implement the foregoing method embodiments and / or optional embodiments, or to implement some or all of the foregoing method embodiments and / or optional embodiments.
[0085] It should be noted that the method embodiments and / or optional embodiments in this invention do not strictly limit the order of execution of each step, as long as the method embodiments and / or optional embodiments can solve the defects existing in the prior art, achieve the inventive purpose of this invention, and obtain beneficial effects. The method embodiments and / or optional embodiments in this invention can be implemented in software and / or combinations of software and hardware. The software program involved in this invention can be executed by a processor to implement the steps or functions of the above embodiments. Similarly, the software program of this invention (including related data structures) can be stored in a computer-readable recording medium.
[0086] Furthermore, part or all of the present invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the present invention through the operation of the computer. The program instructions invoking the methods of the present invention may be stored in a fixed or removable recording medium, and / or transmitted via a data stream in a broadcast or other signal carrying medium, and / or stored in the working memory of a computer device operating according to the program instructions.
[0087] According to another aspect of the present invention, a local network-based application installation device is also provided. The device includes: a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the device is triggered to run the methods and / or technical solutions of the foregoing embodiments, or the device is triggered to run part or all of the methods and / or technical solutions of the foregoing embodiments.
[0088] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0089] In this invention, when terms such as "upper," "lower," "left," "right," "front," "rear," "top," "bottom," "inner," "outer," "middle," "vertical," "horizontal," "lateral," and "longitudinal" are used, the indicated orientation and / or positional relationship is based on the orientation and / or positional relationship shown in the accompanying drawings. These terms are primarily for the purpose of better describing this invention and its embodiments, and are not intended to limit the indicated device, element, or component to having a specific orientation, or to be constructed and operated in a specific orientation. Furthermore, some of the above terms, in addition to indicating orientation or positional relationship, can also be used to indicate other meanings; for example, the term "upper" can also be used in some cases to indicate a certain dependency or connection relationship. Those skilled in the art can understand the specific meaning of these terms in this invention according to the specific circumstances. Furthermore, the terms "installation," "setup," "equipped with," "connection," and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral structure; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection via an intermediate medium; and they can refer to an internal connection between two devices, elements, or components. Those skilled in the art can understand the specific meaning of these terms in this invention based on the specific circumstances.
[0090] Furthermore, the terms "first," "second," etc., are primarily used to distinguish different devices, units, modules, elements, circuits, or components (which may be the same or different in specific type and construction), and are not intended to indicate or imply the relative importance, order, and / or quantity of the indicated devices, units, modules, elements, circuits, or components. Unless otherwise stated, "a plurality of" means two or more.
[0091] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in the apparatus claims may also be implemented by a single unit or device through software and / or hardware.
Claims
1. A method for installing applications based on a local network, applied to a first device, characterized in that, The method includes: Obtain information about the application installation package broadcast by each second device, wherein the first device and each second device are on the same local network, and each second device broadcasts information about the application installation package stored locally in real time, the information including at least a summary, version number and package size of the application installation package; For each piece of information obtained, based on the information of the application installation package stored locally on the first device, it is determined whether it meets the preset first triggering rule. If it does, a corresponding download task is generated, the priority of the download task is determined, and the download task is sent to the download task queue. The download tasks in the download task queue are sorted according to priority and package size. Based on a preset download task scheduling strategy, each download task in the download task queue is scheduled to be executed to download the corresponding application installation package to the local machine and generate a corresponding installation task. The priority of the corresponding download task is determined as its priority, and the installation task is sent to the installation task queue. The installation tasks in the installation task queue are sorted according to their priority. Based on a preset installation task scheduling strategy, each installation task in the installation task queue is scheduled to be executed to complete the installation of the corresponding application.
2. The method according to claim 1, characterized in that, The step of scheduling each download task in the download task queue based on a preset download task scheduling strategy to download the corresponding application installation package to the local machine includes: Based on the priority of each download task in the download task queue, For the highest priority download task, when the network environment and power status of the first device meet the preset second triggering rule, the corresponding download task is scheduled to be executed so as to download the corresponding application installation package to the local device. For download tasks that are not of the highest priority, when the first device is idle, if the device status, network environment, and power status of the first device meet the preset third triggering rule, the corresponding download tasks are scheduled to be executed in priority order to download the corresponding application installation package to the local device. Download tasks of the same priority are executed in parallel. If the device status, network environment, and power status of the first device meet the preset fourth triggering rule, the corresponding download tasks are scheduled to be executed in priority order to download the corresponding application installation package to the local device. Download tasks of the same priority are executed in order of package size of the corresponding application installation package.
3. The method according to claim 2, characterized in that, The determination of the device status of the first device includes: The device status of the first device is determined based on at least one of the following data acquired in real time from the first device: CPU utilization, memory usage, screen status, background process activity, and operation interval time.
4. The method according to claim 2, characterized in that, The determination of the network environment of the first device includes: The network environment of the first device is determined based on the real-time acquisition of the first device's local network connection status, bandwidth, packet loss rate, and local network latency.
5. The method according to claim 2, characterized in that, Determining the power status of the first device includes: The power state of the first device is determined based on the real-time charging status and battery level of the first device.
6. The method according to claim 2, characterized in that, The determination of the user's idle time period includes: The user's historical usage data of the first device is obtained and statistically analyzed. Based on the statistical results, a user profile is determined, wherein the user profile includes at least the user's idle time periods.
7. The method according to claim 2, characterized in that, The execution of the download task corresponding to the scheduling to download the corresponding application installation package to the local machine includes: Establish a point-to-point connection between the first device and a second device that broadcasts information about the application installation package; Based on the peer-to-peer connection, the application installation package is downloaded from the second device to the local machine.
8. The method according to claim 7, characterized in that, Record the download progress of the application installation package while it is being downloaded.
9. The method according to claim 8, characterized in that, If the download of the application installation package is interrupted due to an anomaly, the method further includes: Once the anomaly is resolved and the peer-to-peer connection is restored, the download resumes from the point of interruption, based on the recorded download progress.
10. The method according to claim 1, characterized in that, The step of scheduling each installation task in the installation task queue based on a preset installation task scheduling strategy to complete the installation of the corresponding application includes: Based on the priority of each installation task in the installation task queue, For the highest priority installation task, the corresponding installation task is directly scheduled to be executed to complete the installation of the corresponding application; For installation tasks that are not of the highest priority, when the device status of the first device is idle and the storage space meets the preset conditions, the corresponding installation tasks are scheduled to be executed in priority order to complete the installation of the corresponding application. Among them, installation tasks of the same priority are executed in the order of timestamps when they enter the installation task queue. If the corresponding low version application is not installed on the first device, the corresponding application installation package is directly installed. If the application is already installed on the first device, the corresponding application installation package is differentially installed to update the low version application already installed on the first device.
11. The method according to claim 10, characterized in that, When installing an application installation package, the application installation package is digitally signed and its file integrity is verified. If the verification is successful, the application installation package is installed, and the installation process is recorded.
12. The method according to claim 11, characterized in that, If the application installation package fails to install, the method further includes: Perform a rollback to restore the system to its pre-installation state.
13. An application installation device based on a local network, deployed on a first device, characterized in that, The device includes: The first module is used to obtain information about the application installation package broadcast by each second device, wherein the first device and each second device are on the same local network, and each second device broadcasts information about its own stored application installation package in real time through a deployed distribution module. The information includes at least a summary, version number and package size of the application installation package. The second module is used to determine whether each piece of information obtained meets the preset first triggering rule based on the information of the application installation package stored locally on the first device. If it does, a corresponding download task is generated, the priority of the download task is determined, and the download task is sent to the download task queue. The download tasks in the download task queue are sorted according to priority and package size. The third module is used to schedule each download task in the download task queue to be executed based on a preset download task scheduling strategy, so as to download the corresponding application installation package to the local machine and generate the corresponding installation task, determine the priority of the corresponding download task as its priority, and send the installation task into the installation task queue, wherein the installation tasks in the installation task queue are sorted according to priority. The fourth module is used to schedule the execution of each installation task in the installation task queue based on a preset installation task scheduling strategy, so as to complete the installation of the corresponding application.
14. A computer-readable medium, characterized in that, It stores computer-readable instructions that are executed by a processor to implement the method as described in any one of claims 1 to 12.
15. An application installation device based on a local network, characterized in that, The device includes: One or more processors; and A memory storing computer-readable instructions, which, when executed, cause the one or more processors to perform the method as described in any one of claims 1 to 12.