An upgrade pushing method and device, computer device and storage medium
Patent Information
- Application Number
- CN202610678909.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-15
- Publication Date
- 2026-09-01
AI Technical Summary
[0004]有鉴于此,本申请提供一种升级推送方法、装置、计算机设备及存储介质,用以解决现有技术中升级信息推送的整体覆盖效果差的问题
[0023] The upgrade push method, apparatus, computer device, and storage medium provided in this application embodiment set a corresponding push time interval for target clients that have already received upgrade information, and skips the push of upgrade information to the target clients within the push time interval. This prevents clients that have received upgrade information but have not yet upgraded from repeatedly occupying push resources for a certain period of time, thereby facilitating other clients waiting to be upgraded to receive upgrade information and improving the overall coverage effect of upgrade information push. Furthermore, by updating the push time interval based on the number of currently online clients waiting to be upgraded and the push information sending rate, the push rhythm can be adapted to the current scale of clients waiting to be upgraded and the push capability, improving the flexibility of the upgrade push process.
Smart Images

Figure CN122679136A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically, to an upgrade push method, apparatus, computer device, and storage medium. Background Technology
[0002] As client software versions continue to iterate, the server typically needs to push upgrade information to online clients to prompt them to update. In practice, the number of online clients is often large, and clients may not immediately perform the upgrade operation after receiving the upgrade information. Therefore, the server usually needs to repeatedly push upgrade information to clients to improve upgrade coverage.
[0003] In existing technologies, client upgrade information pushes are typically delivered at a fixed frequency or at fixed time intervals. Under this method, clients that have already received upgrade information but have not yet upgraded may continue to participate in subsequent push notifications, thus repeatedly consuming push resources. This makes it difficult for other clients to receive upgrade information in a timely manner, affecting the overall coverage of upgrade information pushes. Summary of the Invention
[0004] In view of this, this application provides an upgrade push method, apparatus, computer device, and storage medium to solve the problem of poor overall coverage effect of upgrade information push in the prior art.
[0005] Specifically, this application is implemented through the following technical solution: Firstly, this application provides an upgrade push method, including: Identify the target client from the currently online clients awaiting upgrade, obtain the current push time interval corresponding to the target client, and the historical push timestamp corresponding to the last upgrade push of the target client; If the difference between the current timestamp and the historical push timestamp is less than the current push time interval, skip the upgrade information push to the target client and re-determine the target client from the currently online clients to be upgraded; If the difference between the current timestamp and the historical push timestamp is greater than or equal to the current push time interval, upgrade information is pushed to the target client. After pushing upgrade information to the target client, obtain the number of currently online clients to be upgraded, as well as the pre-configured push information sending rate; Based on the number of currently online clients awaiting upgrade and the push information sending rate, the push time interval corresponding to the target client is updated, and the target client is re-determined from the currently online clients awaiting upgrade.
[0006] In some embodiments, the method further includes: Obtain heartbeat information sent by currently online clients; the heartbeat information includes client identification information and version information; Clients that have sent the heartbeat information within a preset time period and whose version information meets the upgrade conditions are identified as currently online clients to be upgraded.
[0007] In some implementations, updating the push time interval corresponding to the target client based on the number of currently online clients awaiting upgrade and the push information sending rate includes: Based on the number of currently online clients awaiting upgrade and the push information sending rate, determine the candidate push time interval for the target client; If the candidate push time interval is less than the preset minimum push time interval, the minimum push time interval shall be used as the updated push time interval corresponding to the target client. If the candidate push time interval is greater than or equal to the minimum push time interval, the candidate push time interval shall be used as the updated push time interval corresponding to the target client.
[0008] In some implementations, determining the candidate push time interval for the target client based on the number of currently online clients awaiting upgrade and the push information sending rate includes: The candidate push time interval for the target client is determined based on the ratio between the number of currently online clients awaiting upgrade and the push information sending rate.
[0009] In some implementations, after pushing upgrade information to the target client, the method further includes: Obtain the push result returned by the target client in response to the upgrade information push; If the push result indicates that the push was successful, the updated push time interval corresponding to the target client is determined to take effect; If the push result indicates that the push failed, the push time interval corresponding to the target client before the update is determined to remain in effect.
[0010] In some embodiments, the method further includes: Obtain the update status information sent by the target client; If the update status information indicates that the target client has completed downloading the update file, or indicates that the target client has completed the update, then the target client will be removed from the list of currently online clients awaiting upgrade.
[0011] In some embodiments, the method further includes: Periodically retrieve the push notification sending rate configuration information entered by the administrator; Based on the obtained push information sending rate configuration information, the pre-configured push information sending rate is updated.
[0012] In some embodiments, the method further includes: Get the current resource status of the server and / or the current receiving capacity of the client; The pre-configured push information sending rate is updated based on the current resource status of the server and / or the current receiving capability of the client.
[0013] Secondly, this application also provides an upgrade push device, comprising: The first acquisition module is used to determine the target client from the currently online clients to be upgraded, acquire the current push time interval corresponding to the target client, and the historical push timestamp corresponding to the last upgrade push of the target client; The first processing module is used to skip pushing upgrade information to the target client and re-determine the target client from the currently online clients to be upgraded if the difference between the current timestamp and the historical push timestamp is less than the current push time interval. The second processing module is used to push upgrade information to the target client when the difference between the current timestamp and the historical push timestamp is greater than or equal to the current push time interval. The second acquisition module is used to acquire the number of currently online clients to be upgraded, as well as the pre-configured push information sending rate, after pushing upgrade information to the target client. The update module is used to update the push time interval corresponding to the target client based on the number of currently online clients to be upgraded and the push information sending rate, and to re-determine the target client from the currently online clients to be upgraded.
[0014] In some embodiments, the apparatus further includes a determining module for: Obtain heartbeat information sent by currently online clients; the heartbeat information includes client identification information and version information; Clients that have sent the heartbeat information within a preset time period and whose version information meets the upgrade conditions are identified as currently online clients to be upgraded.
[0015] In some implementations, the update module is used to: Based on the number of currently online clients awaiting upgrade and the push information sending rate, determine the candidate push time interval for the target client; If the candidate push time interval is less than the preset minimum push time interval, the minimum push time interval shall be used as the updated push time interval corresponding to the target client. If the candidate push time interval is greater than or equal to the minimum push time interval, the candidate push time interval shall be used as the updated push time interval corresponding to the target client.
[0016] In some implementations, the update module is used to: The candidate push time interval for the target client is determined based on the ratio between the number of currently online clients awaiting upgrade and the push information sending rate.
[0017] In some embodiments, the apparatus further includes a verification module for: After pushing upgrade information to the target client, obtain the push result returned by the target client in response to the upgrade information push; If the push result indicates that the push was successful, the updated push time interval corresponding to the target client is determined to take effect; If the push result indicates that the push failed, the push time interval corresponding to the target client before the update is determined to remain in effect.
[0018] In some embodiments, the apparatus further includes a third acquisition module, used for: Obtain the update status information sent by the target client; If the update status information indicates that the target client has completed downloading the update file, or indicates that the target client has completed the update, then the target client will be removed from the list of currently online clients awaiting upgrade.
[0019] In some embodiments, the apparatus further includes a fourth acquisition module, used for: Periodically retrieve the push notification sending rate configuration information entered by the administrator; Based on the obtained push information sending rate configuration information, the pre-configured push information sending rate is updated.
[0020] In some embodiments, the apparatus further includes a fifth acquisition module, used for: Get the current resource status of the server and / or the current receiving capacity of the client; The pre-configured push information sending rate is updated based on the current resource status of the server and / or the current receiving capability of the client.
[0021] Thirdly, this application also provides a computer device including a processor and a memory, the memory storing machine-readable instructions executable by the processor, the processor executing the machine-readable instructions stored in the memory, the machine-readable instructions being executed by the processor performing the steps of the first aspect above, or any possible implementation of the first aspect.
[0022] Fourthly, this application also provides a computer-readable storage medium storing a computer program that, when run, performs the steps of the first aspect or any possible implementation thereof.
[0023] The upgrade push method, apparatus, computer device, and storage medium provided in this application embodiment set a corresponding push time interval for target clients that have already received upgrade information, and skips the push of upgrade information to the target clients within the push time interval. This prevents clients that have received upgrade information but have not yet upgraded from repeatedly occupying push resources for a certain period of time, thereby facilitating other clients waiting to be upgraded to receive upgrade information and improving the overall coverage effect of upgrade information push. Furthermore, by updating the push time interval based on the number of currently online clients waiting to be upgraded and the push information sending rate, the push rhythm can be adapted to the current scale of clients waiting to be upgraded and the push capability, improving the flexibility of the upgrade push process. Attached Figure Description
[0024] Figure 1 This is a flowchart illustrating an exemplary embodiment of the present application of an upgrade push method; Figure 2 This is a flowchart illustrating another upgrade push method according to an exemplary embodiment of this application; Figure 3 This is a schematic diagram illustrating an upgrade push device according to an exemplary embodiment of this application; Figure 4 This is a schematic diagram of a computer device illustrated in an exemplary embodiment of this application. Detailed Implementation
[0025] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0026] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0027] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0028] Research has found that client upgrade information pushes are typically delivered at a fixed frequency or time interval. Under this method, clients that have already received upgrade information but haven't upgraded yet may continue to participate in subsequent push notifications, thus repeatedly consuming push resources. This makes it difficult for other clients to receive upgrade information in a timely manner, affecting the overall coverage of upgrade information pushes.
[0029] In view of this, this application provides an upgrade push method, apparatus, computer device, and storage medium to solve the problem of poor overall coverage effect of upgrade information push in the prior art.
[0030] To facilitate understanding of this embodiment, the application scenarios of the upgrade push method disclosed in this application embodiment will first be introduced. The execution subject of the upgrade push method provided in this application embodiment can be a computer device. In some possible implementations, the upgrade push method can be implemented by a processor calling computer-readable instructions stored in memory. The computer device can be a server, a cloud inference node, a terminal device, or other device with information processing capabilities, and this application does not limit it.
[0031] See Figure 1 The diagram shown is a flowchart illustrating an exemplary embodiment of this application for an upgrade push method. The method includes steps S101-S105, wherein: S101. Determine the target client from the currently online clients to be upgraded, obtain the current push time interval corresponding to the target client, and the historical push timestamp corresponding to the last upgrade push of the target client.
[0032] In some embodiments, the upgrade push method can be applied to a zero-trust system. For example, the zero-trust system may include a zero-trust client, a zero-trust platform, and a zero-trust gateway. The zero-trust client can be deployed on a user terminal to establish a connection with the zero-trust platform and access corresponding network resources via the zero-trust gateway after successful authentication. The zero-trust platform can be used to perform user authentication, client management, version management, and upgrade information push processing. The zero-trust gateway can be used to forward, allow, or control client access requests. As client functions iterate, security policies are updated, or vulnerabilities are patched, the zero-trust platform can push upgrade information to the client to prompt the client to perform a version upgrade.
[0033] In this embodiment, the server can maintain a set of currently online clients awaiting upgrades. For example, the server can receive heartbeat information periodically sent by each client and determine whether a client is online based on the heartbeat information. Simultaneously, the server can also combine the version information reported by the clients to filter out clients whose version information meets the upgrade conditions, as currently online clients awaiting upgrades. That is, the currently online clients awaiting upgrades can be understood as clients that are currently online but whose current version does not yet meet the requirements of the target version.
[0034] After identifying the currently online clients to be upgraded, the server can determine the target client from among them. This application does not limit the specific method for determining the target client. For example, the server can select a client from the currently online clients to be upgraded as the target client according to a preset traversal order, polling order, queue order, or other client selection rules.
[0035] After identifying the target client, the server obtains the current push time interval corresponding to the target client. The current push time interval can represent the length of time required for the target client to participate in upgrade information pushes again after the last upgrade information push. In other words, the current push time interval is used to limit the time threshold for the target client to re-participate in upgrade information pushes, in order to prevent clients that have already received upgrade information but have not yet upgraded from continuously occupying push resources.
[0036] In some implementations, when a target client is first included in the set of currently online clients awaiting upgrades, it may not yet have a corresponding current push time interval stored. In this case, an initialization method can be used to determine the current push time interval for the target client. For example, a preset minimum push time interval can be used as the initial push time interval for the target client; alternatively, the initial push time interval can be calculated based on the number of currently online clients awaiting upgrades and the currently effective push information sending rate; or the system default push time interval can be used as the initial push time interval for the target client. This application does not limit this, as long as it provides a basis for subsequent time difference comparisons.
[0037] Furthermore, if the target client does not yet have historical push records, the target client may also lack a corresponding historical push timestamp. In some implementations, the target client's queuing time, online time, time it was identified as a client to be upgraded, or initialization time can be used as the initial value of the historical push timestamp. In other implementations, such target clients can be identified as the first push recipients, and upgrade information can be directly pushed to them, so that a corresponding historical push timestamp and current push time interval can be established after the first push is completed.
[0038] Simultaneously, the server can also obtain the historical push timestamp corresponding to the last upgrade push to the target client. The historical push timestamp can be a timestamp recorded by the server when it last sent upgrade information to the target client. For example, after each upgrade information push to the target client, the server can record the time of this push as the historical push timestamp corresponding to that target client, for use in subsequent time difference comparisons.
[0039] S102. If the difference between the current timestamp and the historical push timestamp is less than the current push time interval, skip the upgrade information push to the target client and re-determine the target client from the currently online clients to be upgraded.
[0040] In this embodiment, after obtaining the current push time interval and historical push timestamps corresponding to the target client, the server can obtain the current timestamp and calculate the difference between the current timestamp and the historical push timestamps. The current timestamp can be the time stamp corresponding to when the server performs the current push judgment; the difference can represent the duration since the target client last received an upgrade information push.
[0041] When the difference is less than the current push time interval, it can be considered that the target client has not yet met the time condition for participating in the upgrade information push again since the last upgrade information push. In this case, the server skips the upgrade information push to the target client. That is, in this round of push processing, upgrade information will not be repeatedly sent to the target client to avoid clients that have already received upgrade information but have not yet performed the upgrade from continuously occupying push resources in a short period of time.
[0042] After skipping the upgrade information push to the target client, the server can re-determine the target client from the currently online clients awaiting upgrades to continue with subsequent push decisions. It should be noted that "re-determining the target client" here does not mean deleting the aforementioned target client from the currently online clients awaiting upgrades; rather, it means not pushing upgrade information to that target client at the current moment, and instead selecting another client from the currently online clients awaiting upgrades as the next target to be processed. Once the aforementioned target client meets the corresponding push time interval requirement, it can still participate in the subsequent upgrade information push process.
[0043] For example, the server can reselect target clients from the currently online clients awaiting upgrades according to a preset traversal order, polling order, queue order, or other client selection rules. Since clients that have already received upgrade information are temporarily skipped during the corresponding push interval, the server can prioritize allocating the limited push resources to other clients that have not yet received pushes or currently meet the push conditions, thereby improving the overall coverage of upgrade information pushes.
[0044] S103. If the difference between the current timestamp and the historical push timestamp is greater than or equal to the current push time interval, push upgrade information to the target client.
[0045] In this embodiment, when the server determines that the difference between the current timestamp and the historical push timestamp corresponding to the target client is greater than or equal to the current push time interval, the target client can be considered to have met the time condition for participating in the upgrade information push again. At this time, the server can push the upgrade information to the target client.
[0046] The upgrade information can be used to notify the target client that an update is available and guide the target client to perform subsequent update-related operations. For example, the upgrade information may include one or more of the following: upgrade version information, download address of the update file, update description, update time requirement, and update strategy information. This application does not limit this.
[0047] In some implementations, the server can send upgrade information to the target client through a communication connection established with the target client. Exemplarily, the communication connection can be a long connection, a short connection, or other communication links that can be used for interaction between the server and the client; this application does not limit this. After completing the upgrade information push, the server can record the push timestamp corresponding to this push as a historical push timestamp for subsequent push judgments.
[0048] It should be noted that pushing upgrade information to the target client means sending upgrade-related prompts, control information, or notification information to the target client so that the target client is aware that there is an executable update operation. As for whether the target client immediately downloads the update file, immediately performs the update, or delays the update, this can be determined by the client side based on the preset update strategy, user operation, or device operating status, and this application does not limit this.
[0049] S104. After pushing upgrade information to the target client, obtain the number of currently online clients to be upgraded, as well as the pre-configured push information sending rate.
[0050] In this embodiment of the application, after the server completes the upgrade information push to the target client, it can further obtain the number of currently online clients to be upgraded, as well as the pre-configured push information sending rate, so as to provide a basis for the push time interval corresponding to the subsequent update of the target client.
[0051] The number of currently online clients awaiting upgrades represents the scale of clients that are still online and need to participate in the upgrade push process. For example, the server can determine the current online status based on the heartbeat information reported by each client, and combine this with version information, update status information, or upgrade-pending flags to count the number of currently online clients awaiting upgrades. It should be noted that after the upgrade information is pushed to the target clients, the number of currently online clients awaiting upgrades can be the latest number obtained through re-counting, or it can be the number maintained and updated during this round of push processing; this application does not limit this. In some embodiments, the number of currently online clients can be directly used as the number of currently online clients awaiting upgrades.
[0052] The push notification sending rate can represent the upper limit of the number of clients allowed to send upgrade information per unit time. For example, the push notification sending rate can be pre-configured by administrators to control the number of upgrade information pushes per unit time, thereby avoiding the impact on server processing performance or network transmission performance caused by sending upgrade information to a large number of clients in a short period. This application does not limit the specific value of the unit time; it can be per minute, every several minutes, or other statistical periods.
[0053] In some implementations, the pre-configured push notification sending rate can be the initial system configuration value; in other implementations, the pre-configured push notification sending rate can be the latest configuration information entered by the administrator or the currently effective value updated based on the current server resource status and the client's current receiving capability. Any sending capability parameter that reflects the current control over the pace of upgrade information pushes can be used as the push notification sending rate obtained in this step.
[0054] For example, the push message sending rate configuration information input by the administrator can be obtained periodically; then, based on the obtained push message sending rate configuration information, the pre-configured push message sending rate can be updated.
[0055] Alternatively, the current resource status of the server and / or the current receiving capability of the client can be obtained; then, based on the current resource status of the server and / or the current receiving capability of the client, the pre-configured push information sending rate can be updated.
[0056] S105. Based on the number of currently online clients to be upgraded and the push information sending rate, update the push time interval corresponding to the target client, and re-determine the target client from the currently online clients to be upgraded.
[0057] In this embodiment, after obtaining the number of currently online clients awaiting upgrade and the push information sending rate, the server can update the push time interval corresponding to the target client based on the number of currently online clients awaiting upgrade and the push information sending rate. The updated push time interval can be used to characterize the length of time required for the target client to participate in upgrade information push again after the upgrade information has been pushed to the target client this time.
[0058] For example, the server can determine the candidate push interval for the target client based on the correspondence between the number of currently online clients awaiting upgrades and the push information sending rate. The number of currently online clients awaiting upgrades reflects the scale of clients still needing to participate in upgrade information push processing, while the push information sending rate reflects the upper limit of the number of clients allowed to send upgrade information per unit time. Determining the push interval based on these two parameters ensures that the time it takes for the target client to re-participate in push notifications is adapted to the current client scale and current push capabilities.
[0059] In some implementations, the server can determine the candidate push interval for the target client based on the ratio between the number of currently online clients awaiting upgrades and the push information sending rate. Further, if the candidate push interval is less than a preset minimum push interval, the minimum push interval can be used as the updated push interval; if the candidate push interval is greater than or equal to the minimum push interval, the candidate push interval can be used as the updated push interval. This method avoids the target client being repeatedly pushed upgrade information too frequently within a short period.
[0060] After updating the push time interval for the target client, the server can re-determine the target client from the currently online clients awaiting upgrades to proceed to the next round of push processing. It should be noted that "re-determining the target client" here can be understood as the server selecting the next client to be processed from the currently online clients awaiting upgrades for subsequent push time determination and upgrade information push processing. As for the previous target client, it can temporarily not participate in subsequent upgrade information pushes until the updated push time interval is reached; after reaching the corresponding push time interval, it can still participate in subsequent push processing.
[0061] For example, the server can reselect a target client from the currently online clients awaiting upgrade according to a preset traversal order, polling order, queue order, or other client selection rules. Since the previous target client is given an updated push time interval after completing this upgrade information push, it will not continuously occupy subsequent push opportunities during this push time interval. The server can prioritize allocating push resources to other clients awaiting upgrade, thereby giving more clients the opportunity to receive upgrade information pushes.
[0062] In some implementations, if the target client returns a push notification indicating successful delivery of the upgrade information, the updated push interval can be confirmed to be in effect; if the push notification indicates failure, the previous push interval can be confirmed to remain in effect. Therefore, the timing conditions for the target client to subsequently participate in push notifications can be controlled based on the current push notification result.
[0063] In some implementations, update status information sent by the target client can be obtained. This update status information can be used to characterize the current update progress or stage of the target client. For example, the update status information may include one or more of the following: downloading, download complete, updating, update complete, and update failed; this application does not limit this to any particular type.
[0064] After receiving the upgrade information pushed by the server, the target client can obtain the corresponding update file based on the upgrade information, and report the corresponding update status information to the server during or after the update file download process. Furthermore, the target client can also report update status information representing the update execution progress or update result to the server during the update process. Upon receiving the update status information, the server can determine whether the target client has met the conditions for removal from the currently online clients awaiting upgrade.
[0065] When the update status information indicates that the target client has completed downloading the update file, it can be assumed that the target client has obtained the update file required to perform subsequent updates. At this point, the server can remove the target client from the list of currently online clients awaiting upgrades. This avoids the server repeatedly pushing the same upgrade information to target clients that have already completed downloading the update file.
[0066] When the update status information indicates that the target client has completed the update, it can be considered that the target client has completed the update process for the corresponding version. At this time, the server can also remove the target client from the list of currently online clients awaiting upgrades. This prevents clients that have already completed the update from continuing to participate in subsequent upgrade information push processing.
[0067] It should be noted that if the update status information does not instruct the target client to complete the update file download, nor does it instruct the target client to complete the update, the server may retain the target client as a currently online client awaiting upgrade, so that the target client can continue to participate in subsequent upgrade information pushes when the corresponding push conditions are met. Therefore, the server can use "complete update file download" or "complete update" as the condition for the target client to leave the set of currently online clients awaiting upgrades, thereby avoiding removing the target client simply because the upgrade information push was successful, which could cause clients that have not yet actually entered the download stage to prematurely exit the subsequent push process.
[0068] The upgrade push method provided in this application sets a corresponding push time interval for target clients that have already received upgrade information, and skips the push of upgrade information to the target clients within the push time interval. This prevents clients that have received upgrade information but have not yet upgraded from repeatedly occupying push resources for a certain period of time, thereby facilitating other clients waiting to be upgraded to receive upgrade information and improving the overall coverage of upgrade information push. Furthermore, by updating the push time interval based on the number of currently online clients waiting to be upgraded and the push information sending rate, the push rhythm can be adapted to the current scale of clients waiting to be upgraded and the push capability, improving the flexibility of the upgrade push process.
[0069] Figure 2 A flowchart illustrating another upgrade push method provided in an embodiment of this application is shown. Figure 2 As shown, after the server starts pushing the message, it first determines whether the push time corresponding to the target client has been reached. If the push time has not been reached, the upgrade information push will not be performed on the current target client, and the next push request will be processed instead; if the push time has been reached, the upgrade information push will be performed on the target client, and the next push time will be calculated.
[0070] After completing the upgrade information push, the server can further determine whether the push was successful. If the push fails, a next push is allowed so that the target client can re-participate in subsequent push processing as soon as possible. If the push is successful, the server further determines whether the calculated next push time is less than the preset minimum push time. If the next push time is less than the minimum push time, the minimum push time is set to a preset duration, such as 10 minutes later. If the next push time is greater than or equal to the minimum push time, subsequent push processing is performed according to the calculated next push time.
[0071] Corresponding to the aforementioned embodiments of the upgrade push method, this application also provides embodiments of the upgrade push device.
[0072] See Figure 3 The diagram shown is a schematic representation of an upgrade push device according to an exemplary embodiment of this application. The device includes: The first acquisition module 310 is used to determine the target client from the currently online clients to be upgraded, acquire the current push time interval corresponding to the target client, and the historical push timestamp corresponding to the last upgrade push of the target client; The first processing module 320 is used to skip pushing upgrade information to the target client and re-determine the target client from the currently online clients to be upgraded if the difference between the current timestamp and the historical push timestamp is less than the current push time interval. The second processing module 330 is used to push upgrade information to the target client when the difference between the current timestamp and the historical push timestamp is greater than or equal to the current push time interval. The second acquisition module 340 is used to acquire the number of currently online clients to be upgraded and the pre-configured push information sending rate after pushing upgrade information to the target client. The update module 350 is used to update the push time interval corresponding to the target client based on the number of currently online clients to be upgraded and the push information sending rate, and to re-determine the target client from the currently online clients to be upgraded.
[0073] In some embodiments, the apparatus further includes a determining module for: Obtain heartbeat information sent by currently online clients; the heartbeat information includes client identification information and version information; Clients that have sent the heartbeat information within a preset time period and whose version information meets the upgrade conditions are identified as currently online clients to be upgraded.
[0074] In some implementations, the update module 350 is used to: Based on the number of currently online clients awaiting upgrade and the push information sending rate, determine the candidate push time interval for the target client; If the candidate push time interval is less than the preset minimum push time interval, the minimum push time interval shall be used as the updated push time interval corresponding to the target client. If the candidate push time interval is greater than or equal to the minimum push time interval, the candidate push time interval shall be used as the updated push time interval corresponding to the target client.
[0075] In some implementations, the update module 350 is used to: The candidate push time interval for the target client is determined based on the ratio between the number of currently online clients awaiting upgrade and the push information sending rate.
[0076] In some embodiments, the apparatus further includes a verification module for: After pushing upgrade information to the target client, obtain the push result returned by the target client in response to the upgrade information push; If the push result indicates that the push was successful, the updated push time interval corresponding to the target client is determined to take effect; If the push result indicates that the push failed, the push time interval corresponding to the target client before the update is determined to remain in effect.
[0077] In some embodiments, the apparatus further includes a third acquisition module, used for: Obtain the update status information sent by the target client; If the update status information indicates that the target client has completed downloading the update file, or indicates that the target client has completed the update, then the target client will be removed from the list of currently online clients awaiting upgrade.
[0078] In some embodiments, the apparatus further includes a fourth acquisition module, used for: Periodically retrieve the push notification sending rate configuration information entered by the administrator; Based on the obtained push information sending rate configuration information, the pre-configured push information sending rate is updated.
[0079] In some embodiments, the apparatus further includes a fifth acquisition module, used for: Get the current resource status of the server and / or the current receiving capacity of the client; The pre-configured push information sending rate is updated based on the current resource status of the server and / or the current receiving capability of the client.
[0080] The upgrade push device provided in this application sets a corresponding push time interval for target clients that have already received upgrade information, and skips the push of upgrade information to the target clients within the push time interval. This prevents clients that have received upgrade information but have not yet upgraded from repeatedly occupying push resources for a certain period of time, thereby facilitating other clients waiting to be upgraded to receive upgrade information and improving the overall coverage of upgrade information push. Furthermore, by updating the push time interval based on the number of currently online clients waiting to be upgraded and the push information sending rate, the push rhythm can be adapted to the current scale of clients waiting to be upgraded and the push capability, improving the flexibility of the upgrade push process.
[0081] For a description of the processing flow of each module in the device and the interaction flow between each module, please refer to the relevant descriptions in the above method embodiments, which will not be repeated here.
[0082] This application also provides a computer device, such as... Figure 4 The diagram shown is a schematic representation of a computer device structure according to an exemplary embodiment of this application. The computer device includes: Processor 41 and memory 42; the memory 42 stores machine-readable instructions executable by the processor 41, and the processor 41 executes the machine-readable instructions stored in the memory 42. When the machine-readable instructions are executed by the processor 41, the processor 41 performs the following steps: Identify the target client from the currently online clients awaiting upgrade, obtain the current push time interval corresponding to the target client, and the historical push timestamp corresponding to the last upgrade push of the target client; If the difference between the current timestamp and the historical push timestamp is less than the current push time interval, skip the upgrade information push to the target client and re-determine the target client from the currently online clients to be upgraded; If the difference between the current timestamp and the historical push timestamp is greater than or equal to the current push time interval, upgrade information is pushed to the target client. After pushing upgrade information to the target client, obtain the number of currently online clients to be upgraded, as well as the pre-configured push information sending rate; Based on the number of currently online clients awaiting upgrade and the push information sending rate, the push time interval corresponding to the target client is updated, and the target client is re-determined from the currently online clients awaiting upgrade.
[0083] In some implementations, processor 41 is also used to perform: Obtain heartbeat information sent by currently online clients; the heartbeat information includes client identification information and version information; Clients that have sent the heartbeat information within a preset time period and whose version information meets the upgrade conditions are identified as currently online clients to be upgraded.
[0084] In some implementations, updating the push time interval corresponding to the target client based on the number of currently online clients awaiting upgrade and the push information sending rate includes: Based on the number of currently online clients awaiting upgrade and the push information sending rate, determine the candidate push time interval for the target client; If the candidate push time interval is less than the preset minimum push time interval, the minimum push time interval shall be used as the updated push time interval corresponding to the target client. If the candidate push time interval is greater than or equal to the minimum push time interval, the candidate push time interval shall be used as the updated push time interval corresponding to the target client.
[0085] In some implementations, determining the candidate push time interval for the target client based on the number of currently online clients awaiting upgrade and the push information sending rate includes: The candidate push time interval for the target client is determined based on the ratio between the number of currently online clients awaiting upgrade and the push information sending rate.
[0086] In some implementations, after pushing upgrade information to the target client, the processor 41 is also used to perform: Obtain the push result returned by the target client in response to the upgrade information push; If the push result indicates that the push was successful, the updated push time interval corresponding to the target client is determined to take effect; If the push result indicates that the push failed, the push time interval corresponding to the target client before the update is determined to remain in effect.
[0087] In some implementations, processor 41 is also used to perform: Obtain the update status information sent by the target client; If the update status information indicates that the target client has completed downloading the update file, or indicates that the target client has completed the update, then the target client will be removed from the list of currently online clients awaiting upgrade.
[0088] In some implementations, processor 41 is also used to perform: Periodically retrieve the push notification sending rate configuration information entered by the administrator; Based on the obtained push information sending rate configuration information, the pre-configured push information sending rate is updated.
[0089] In some implementations, processor 41 is also used to perform: Get the current resource status of the server and / or the current receiving capacity of the client; The pre-configured push information sending rate is updated based on the current resource status of the server and / or the current receiving capability of the client.
[0090] The aforementioned memory 42 includes a main memory 421 and an external memory 422; the main memory 421, also known as internal memory, is used to temporarily store the computational data in the processor 41, as well as the data exchanged with external memory 422 such as a hard disk. The processor 41 exchanges data with the external memory 422 through the main memory 421.
[0091] The specific execution process of the above instructions can be referred to the steps of the upgrade push method described in the embodiments of this application, and will not be repeated here.
[0092] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0093] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the upgrade push method described in the above method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0094] This application also provides a computer program product, including a computer program / instruction, which, when executed by the computer program / instruction processor, implements the upgrade push method provided in the various embodiments of this application.
[0095] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0096] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0097] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0098] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0099] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0100] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The scope of protection of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application. Such modifications, changes, 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 this application, and should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0101] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. An upgrade push method, characterized in that, The method includes: Identify the target client from the currently online clients awaiting upgrade, obtain the current push time interval corresponding to the target client, and the historical push timestamp corresponding to the last upgrade push of the target client; If the difference between the current timestamp and the historical push timestamp is less than the current push time interval, skip the upgrade information push to the target client and re-determine the target client from the currently online clients to be upgraded; If the difference between the current timestamp and the historical push timestamp is greater than or equal to the current push time interval, upgrade information is pushed to the target client. After pushing upgrade information to the target client, obtain the number of currently online clients to be upgraded, as well as the pre-configured push information sending rate; Based on the number of currently online clients awaiting upgrade and the push information sending rate, the push time interval corresponding to the target client is updated, and the target client is re-determined from the currently online clients awaiting upgrade.
2. The method according to claim 1, characterized in that, The method further includes: Obtain heartbeat information sent by currently online clients; the heartbeat information includes client identification information and version information; Clients that have sent the heartbeat information within a preset time period and whose version information meets the upgrade conditions are identified as currently online clients to be upgraded.
3. The method according to claim 1, characterized in that, The step of updating the push interval corresponding to the target client based on the number of currently online clients awaiting upgrade and the push information sending rate includes: Based on the number of currently online clients awaiting upgrade and the push information sending rate, determine the candidate push time interval for the target client; If the candidate push time interval is less than the preset minimum push time interval, the minimum push time interval shall be used as the updated push time interval corresponding to the target client. If the candidate push time interval is greater than or equal to the minimum push time interval, the candidate push time interval shall be used as the updated push time interval corresponding to the target client.
4. The method according to claim 3, characterized in that, The step of determining the candidate push time interval for the target client based on the number of currently online clients awaiting upgrade and the push information sending rate includes: The candidate push time interval for the target client is determined based on the ratio between the number of currently online clients awaiting upgrade and the push information sending rate.
5. The method according to claim 1, characterized in that, After pushing upgrade information to the target client, the method further includes: Obtain the push result returned by the target client in response to the upgrade information push; If the push result indicates that the push was successful, the updated push time interval corresponding to the target client is determined to take effect; If the push result indicates that the push failed, the push time interval corresponding to the target client before the update is determined to remain in effect.
6. The method according to claim 1, characterized in that, The method further includes: Obtain the update status information sent by the target client; If the update status information indicates that the target client has completed downloading the update file, or indicates that the target client has completed the update, then the target client will be removed from the list of currently online clients awaiting upgrade.
7. The method according to claim 1, characterized in that, The method further includes: Periodically retrieve the push notification sending rate configuration information entered by the administrator; Based on the obtained push information sending rate configuration information, the pre-configured push information sending rate is updated.
8. The method according to claim 1, characterized in that, The method further includes: Get the current resource status of the server and / or the current receiving capacity of the client; The pre-configured push information sending rate is updated based on the current resource status of the server and / or the current receiving capability of the client.
9. An upgrade push device, characterized in that, The device includes: The first acquisition module is used to determine the target client from the currently online clients to be upgraded, acquire the current push time interval corresponding to the target client, and the historical push timestamp corresponding to the last upgrade push of the target client; The first processing module is used to skip pushing upgrade information to the target client and re-determine the target client from the currently online clients to be upgraded if the difference between the current timestamp and the historical push timestamp is less than the current push time interval. The second processing module is used to push upgrade information to the target client when the difference between the current timestamp and the historical push timestamp is greater than or equal to the current push time interval. The second acquisition module is used to acquire the number of currently online clients to be upgraded, as well as the pre-configured push information sending rate, after pushing upgrade information to the target client. The update module is used to update the push time interval corresponding to the target client based on the number of currently online clients to be upgraded and the push information sending rate, and to re-determine the target client from the currently online clients to be upgraded.
10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method as described in any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 8.