Update control method and device, chip system, storage medium and program product
By mapping device identifiers to random numbers and evenly distributing silent updates, the download traffic peak problem caused by silent updates is solved, improving user experience and controlling CDN costs.
Patent Information
- Application Number
- CN202410718091.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2044-06-04
AI Technical Summary
Silently updating a large number of mobile phones at the same time results in heavy download traffic, impacting user experience and increasing CDN costs.
By mapping device identifiers to random numbers within a preset range and evenly distributing silent updates over multiple days based on target equalization values and date intervals, the silent update traffic can be dynamically regulated.
Improved download speed for silent updates, optimized user experience, and reduced CDN costs.
Smart Images

Figure CN120743300A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an update control method, device, chip system, storage medium and program product. Background Art
[0002] Currently, mobile phones often have application market applications (APPs) installed. Users can download the required applications from the APPs and install them on their phones. In addition, the APPs can update and manage the various applications installed on the phone.
[0003] When managing updates, the App Market app can periodically query the server to see if there are updated versions of the various applications installed on the phone. If an updated version of an application is available, the App Market app can automatically download the updated data from the server and update the application based on the updated data if the silent update function is enabled.
[0004] However, if a large number of mobile phones perform silent updates at the same time period, the download traffic during that time period will be very large, which can easily affect the download speed and, in turn, the user experience. Summary of the Invention
[0005] This application provides an update control method, device, chip system, storage medium, and program product that can increase download speed during silent updates and improve user experience. The technical solution is as follows:
[0006] In a first aspect, an update control method is provided. The method is applied to a first device and includes receiving an update query request sent by a second device; if it is determined that the second device requires an update, mapping the device identifier of the second device to a random number within a preset numerical range; determining a target numerical range corresponding to the current date within the preset numerical range based on the number of days between the preset date and the current date and a target fraction value, where the target numerical range is one of the parts obtained by dividing the preset numerical range into n equal parts, where n is the target fraction value and n is an integer greater than or equal to 2; if the random number is not within the target numerical range, prohibiting the second device from performing a silent update on the current date; and if the random number is within the target numerical range, allowing the second device to perform a silent update on the current date.
[0007] The preset numerical range can be set in advance. For example, the preset numerical range can include at least 100 different integers. For example, the preset numerical range can include 100 consecutive or discontinuous integers, such as the preset numerical range can include integers from 0 to 99, integers from 1 to 100, or integers from 2 to 101.
[0008] The same device identifier is mapped to the same random number within a preset range of values. That is, each time the first device receives an update query request from the same second device, it maps the device identifier of the second device to the same random number within the preset range of values. Different device identifiers may be mapped to the same or different random numbers within the preset range of values. Because there are a sufficient number of second devices communicating with the first device, the random numbers mapped to the device identifiers of these second devices within the preset range of values are relatively evenly distributed within the preset range of values, without significant skew.
[0009] It should be noted that after dividing the preset numerical range into n equal parts, n numerical ranges can be obtained, and the target numerical range is a numerical range corresponding to the current date in the n numerical ranges.
[0010] Dividing a preset numerical range into n equal parts means dividing all integers within the preset numerical range into n parts, with the number of integers in each part being equal or approximately the same. That is, the n equal parts in this application do not necessarily have to be strictly equal parts; they can also be slightly different parts, as long as the number of integers in each part is relatively close.
[0011] The target equal division value is used to indicate that the silent updates of all second devices originally performed within one day are evenly distributed to n days, which is equivalent to n days as a cycle. Therefore, the first device can determine which day the current date is in this cycle (i.e., n days) based on the number of days between the preset date and the current date and the target equal division value. Correspondingly, it can be determined which part of the n parts obtained by dividing the preset numerical range into n equal parts corresponds to the current date, that is, determine the target numerical range corresponding to the current date in the preset numerical range. In this case, the second device identified by the device identifier mapped to an integer within the target numerical range is allowed to perform silent updates on the current date, while the second device identified by the device identifier mapped to an integer outside the target numerical range is prohibited from performing silent updates on the current date.
[0012] In this application, the first device can evenly distribute the silent updates originally scheduled for all second devices within a day over n days. That is, the silent update traffic originally scheduled for all second devices within a day is scheduled over n days, achieving even traffic distribution. This not only improves the download speed during silent updates and enhances the user experience, but also dynamically regulates instantaneous bandwidth by dynamically adjusting the silent update traffic, thereby avoiding excessive daily peak bandwidth to a certain extent and achieving the goal of controlling CDN costs.
[0013] In one possible implementation, the operation of mapping the device identification of the second device to a random number within a preset numerical range can be: obtaining a hash value of the device identification of the second device; initializing a random number generator using the hash value as a random number seed; and generating a random number within a preset numerical range through the initialized random number generator.
[0014] The random number seed determines the starting state of the random number generator. The same random number seed will cause the random number generator to produce the same random number sequence, while different random number seeds will cause the random number generator to produce different random number sequences, thus ensuring randomness. For the same device identifier, each time the random number generator is initialized using the hash value of the device identifier as the random number seed, it can be guaranteed that the random number sequence generated each time is the same. Therefore, for the same device identifier, the random number generated by the random number generator within the preset value range after each initialization is also the same. In this way, the same device identifier is mapped to the same random number within the preset value range each time.
[0015] In one possible implementation, based on the number of days between the preset date and the current date and the target fractional value, before determining the target numerical range corresponding to the current date within the preset numerical range, the value obtained by dividing 1 by the preset ratio may be rounded up to obtain the target fractional value. The preset ratio may be a ratio preconfigured by a technician and is used to indicate a maximum percentage of all second devices that are allowed to perform silent updates each day.
[0016] Optionally, the value obtained by dividing 100 by the target equal division value may be rounded up to obtain a target average, and the target average may be divided by 100 to obtain a target average ratio. The target average ratio indicates the average daily proportion of all second devices that are allowed to perform silent updates.
[0017] In one possible implementation, based on the number of days between the preset date and the current date and the target equal-division value, the operation of determining the target numerical range corresponding to the current date in the preset numerical range can be: performing a remainder operation on the number of days between the preset date and the current date and the target equal-division value to obtain the target remainder; and determining the target numerical range corresponding to the current date in the preset numerical range based on the target remainder.
[0018] The target remainder is an integer greater than or equal to 0 and less than or equal to n-1. The target remainder may indicate that the current date is on the i+1th day of the current cycle (ie, n days), where i is the target remainder.
[0019] As an example, the operation of determining the target numerical range corresponding to the current date in the preset numerical range according to the target remainder may be: determining the target numerical range as the (i+1)th part obtained by dividing the preset numerical range into n equal parts.
[0020] In this case, the first device divides the preset numerical range into n equal parts in advance. After obtaining the target remainder (i.e., i), the i+1th part of the n parts obtained by dividing the preset numerical range into n equal parts can be directly determined as the target numerical range.
[0021] As another example, the preset numerical range includes integers from 0 to 99. The operation of determining the target numerical range corresponding to the current date in the preset numerical range based on the target remainder may be: determining a range in the preset numerical range that is greater than or equal to i times the target average and less than i+1 times the target average as the target numerical range.
[0022] When the preset numerical range includes integers from 0 to 99, the range of integers greater than or equal to 0 times the target average and less than the smaller of 100 and n times the target average is consistent with the preset numerical range, while the range of integers greater than or equal to i times the target average and less than i+1 times the target average is one of the parts obtained by dividing the entire range into n equal parts. Therefore, in this case, the first device does not need to divide the preset numerical range into n equal parts in advance and can directly determine the target numerical range based on the target remainder (i.e., i) and the target average. This allows for simple and rapid determination of the target numerical range.
[0023] As another example, the operation of determining the target numerical range corresponding to the current date in the preset numerical range based on the target remainder can be: determining the range that is greater than i times the target average ratio and less than or equal to i+1 times the target average ratio as the target ratio range; and determining the numerical range corresponding to the target ratio range in the preset numerical range as the target numerical range.
[0024] The numerical range corresponding to the target ratio range in the preset numerical range refers to all integers in the preset numerical range that are within the target ratio range.
[0025] The range of ratios greater than 0 times the target average ratio and less than or equal to the smaller of 1 and n times the target average ratio is the range of (0, 100%], and the range greater than i times the target average ratio and less than or equal to i+1 times the target average ratio is one of the parts obtained by dividing the entire range into n equal parts. Therefore, in this case, the first device does not need to divide the preset numerical range into n equal parts in advance, and can directly determine the target ratio range based on the target remainder (i.e., i) and the target average ratio. Based on this, the target numerical range can be directly determined from the preset numerical range, thereby simply and quickly determining the target numerical range.
[0026] In one possible implementation, after determining the target numerical range corresponding to the current date in the preset numerical range, one or more target times can be determined based on the bandwidth usage and traffic price in each time period of each day in the m days before the current date when the random number is within the target numerical range, where m is a positive integer and the target time is the time when the second device is allowed to perform silent updates within the current date.
[0027] In this application, the time with lower bandwidth usage within unit cost can be determined as the target time based on the bandwidth usage and traffic price of each time period in each day in the last m days to improve the download speed of the second device during silent update.
[0028] In one possible implementation, the operation of determining one or more target times based on the bandwidth usage and traffic prices for each time period of each day in the m days before the current date may be: dividing the bandwidth usage for each time period of each day in the m days by the traffic price to obtain the unit bandwidth usage for each time period of each day in the m days; determining the estimated unit bandwidth usage for each time period in the current date based on the unit bandwidth usage for each time period in the m days; obtaining the average unit bandwidth usage of the estimated unit bandwidth usage for each time period in the current date; and determining one or more target times based on the average unit bandwidth usage.
[0029] The unit bandwidth usage rate indicates the bandwidth usage per unit cost. A lower unit bandwidth usage rate indicates more bandwidth available per unit cost, leading to faster download speeds. A higher unit bandwidth usage rate indicates less bandwidth available per unit cost, leading to slower download speeds.
[0030] This average unit bandwidth usage rate indicates the average level of unit bandwidth usage for the current day. Based on this, a target time can be determined as a time when the unit bandwidth usage rate is lower than this average. When the second device performs a silent update at the target time, it can achieve a faster download speed at the same cost. This balances the user's download experience with CDN costs.
[0031] As an example, the operation of determining one or more target times based on the average unit bandwidth usage may be: determining one or more target time periods in which the estimated unit bandwidth usage is less than the average unit bandwidth usage from various time periods after the current time within the current date; and determining the start time of each target time period in at least one of the one or more target time periods as the target time.
[0032] As another example, the operation of determining the one or more target times based on the average unit bandwidth usage may be: dividing the bandwidth usage at the current time by the traffic price at the current time to obtain the actual unit bandwidth usage at the current time; if the actual unit bandwidth usage at the current time is less than the average unit bandwidth usage, determining the current time as the target time; if the actual unit bandwidth usage at the current time is greater than or equal to the average unit bandwidth usage, determining one or more target time periods in which the estimated unit bandwidth usage is less than the average unit bandwidth usage from each time period after the current time within the current date, and determining the start time of each target time period in at least one of the one or more target time periods as the target time.
[0033] If the current actual unit bandwidth usage is lower than the average unit bandwidth usage, indicating that the current actual unit bandwidth usage is low, the first device can directly use the current time as the target time to subsequently instruct the second device to perform a silent update at the current time. This allows the second device to start the silent update as soon as possible, improving the user experience.
[0034] In one possible implementation, the operation of prohibiting the second device from performing silent updates on the current date may be: sending a first update message to the second device, the first update message carrying the download address of the update data and first indication information, the first indication information being used to indicate that silent updates are prohibited on the current date.
[0035] In one possible implementation, the operation of allowing the second device to perform a silent update on the current date may be: sending a second update message to the second device, the second update message carrying the download address of the update data and second indication information, the second indication information being used to indicate that a silent update is allowed on the current date.
[0036] In a second aspect, an update control device is provided, which has the function of implementing the update control method described in the first aspect. The update control device includes at least one module, which is used to implement the update control method described in the first aspect.
[0037] In a third aspect, a computer device is provided, the computer device comprising: one or more processors, and a memory;
[0038] The memory is coupled to the one or more processors, and is used to store computer program code, which includes computer instructions. The one or more processors call the computer instructions to enable the computer device to execute the update control method provided by the first aspect above.
[0039] In a fourth aspect, a chip system is provided, which is applied to a computer device. The chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the computer device executes the update control method provided in the first aspect above.
[0040] In a fifth aspect, a computer-readable storage medium is provided, which includes instructions. When the instructions are executed on a computer device, the computer device executes the update control method provided in the first aspect.
[0041] In a sixth aspect, a computer program product is provided. When the computer program product is run on a computer device, the computer device executes the update control method provided in the first aspect.
[0042] The technical effects obtained by the above-mentioned second, third, fourth, fifth and sixth aspects are similar to the technical effects obtained by the corresponding technical means in the above-mentioned first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a flowchart of an application update process provided by the related art;
[0044] Figure 2 This is a schematic diagram of the process of enabling and disabling the silent update function in an application market APP provided by an embodiment of the present application;
[0045] Figure 3 This is a flow chart of an update control method provided by an embodiment of the present application;
[0046] Figure 4 This is a schematic diagram of mapping a device identifier to a random number within a preset value range provided by an embodiment of the present application;
[0047] Figure 5 is a schematic diagram of a manual update process provided in an embodiment of the present application;
[0048] Figure 6 This is a schematic diagram of a silent update provided by an embodiment of the present application;
[0049] Figure 7 is a flowchart of another update control method provided by an embodiment of the present application;
[0050] Figure 8 is a flowchart of another update control method provided by an embodiment of the present application;
[0051] Figure 9 is a schematic diagram of a communication system provided in an embodiment of the present application;
[0052] Figure 10 is a flowchart of another update control method provided by an embodiment of the present application;
[0053] Figure 11 This is a schematic structural diagram of an update control device provided in an embodiment of the present application;
[0054] Figure 12 is a structural diagram of a first device provided in an embodiment of the present application;
[0055] Figure 13 It is a structural diagram of a second device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] In the following description, specific details such as specific system structures and technologies are provided for illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details.
[0057] It should be understood that when used in the specification and appended claims of this application, the term "comprising" indicates the presence of the described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or their collections. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0058] It should be understood that the "one or more" mentioned in this application refers to one, two or more, and the "multiple" mentioned in this application refers to two or more. In the description of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B. The "and / or" in this article is only a way to describe the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0059] To facilitate the clear description of the technical solutions of this application, the words "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that the words "first" and "second" do not limit the quantity or order of execution, and the words "first" and "second" do not necessarily mean different.
[0060] The phrases "one embodiment" or "some embodiments" described in this application mean that the specific features, structures, or characteristics described in the embodiment are included in one or more embodiments of the application. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. that appear in different places in this application do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized.
[0061] The application scenarios involved in the embodiments of the present application are described below.
[0062] Currently, mobile phones often have an app store installed on them. Users can download and install the required applications from the app store. Furthermore, the app store can manage the installation, uninstallation, and update of various applications installed on the phone.
[0063] During update management, the App Market APP can periodically query the server to see if there are updated versions of various applications installed on the phone. If an updated version of an application exists, and the silent update function is enabled, the App Market APP can automatically download the updated data of the application from the server when the silent update conditions are met, such as when the phone is connected to a wireless local area network (WLAN) (such as a wireless fidelity (Wi-Fi) network) and the phone is in the screen-off state, and update the application according to the updated data.
[0064] The silent update feature allows the App Store app to automatically update apps on your phone when the conditions for a silent update are met. This is a crucial feature for mobile phones, ensuring a positive user experience. It eliminates the need for users to manually update apps, allowing updates to be automatically performed in the background.
[0065] However, if a large number of mobile phones perform silent updates in the same time period, the download traffic in that time period will be very large, which can easily affect the download speed and, in turn, the user experience. In addition, for mobile phone manufacturers, their servers need to transmit application update data to the application market APP in the mobile phone through the content delivery network (CDN), and mobile phone manufacturers need to pay fees to CDN manufacturers. CDN manufacturers usually charge based on daily peak bandwidth. A large amount of download traffic in a certain time period will result in a large instantaneous bandwidth, which will in turn lead to an increase in CDN costs. It can be seen that the emergence of download peaks will not only result in poor user experience, but also increase CDN costs for mobile phone manufacturers.
[0066] Next, the process of updating an application program in the application market APP in a mobile phone in the related art is described.
[0067] Figure 1 This is a flowchart of an application update process provided by related technology. Figure 1 , the process includes the following steps 101 to 108:
[0068] Step 101: The application market APP sends an application update query request to the server. The application update query request carries the application identifier and version number of each application in one or more applications installed in the mobile phone.
[0069] Step 102: After receiving the application update query request, the server determines whether there is an application to be updated in the one or more applications according to the application update query request.
[0070] For example, for any one of the one or more applications, if the version number of the application is lower than the version number of an application stored in the server with the same application identifier as the application, the application is determined to be an application to be updated.
[0071] Step 103: The server obtains the download address of the update data of the application to be updated and obtains configuration information.
[0072] The configuration information is used to indicate the conditions under which the mobile phone can perform a silent update. For example, the configuration information may include the range of values that the mobile phone temperature must meet, the range of values that the mobile phone battery must meet, etc.
[0073] Step 104: The server sends an application update message to the application market APP, where the application update message carries the download address and the configuration information.
[0074] Step 105: After the application market APP receives the application update message, when the silent update function is turned on, if it detects that the mobile phone status meets the conditions indicated by the configuration information when the mobile phone screen is off, it sends an application download request to the server, and the application download request carries the download address.
[0075] Step 106: After receiving the application download request, the server obtains update data of the application according to the download address.
[0076] Step 107: The server sends the updated data of the application to the application market APP through the CDN.
[0077] Step 108: After receiving the update data of the application, the application market APP updates the application according to the update data.
[0078] As can be seen from the above process, after receiving an app update message, the App Market app performs a silent update when the phone's screen is off, simply by matching the phone's status with the cloud configuration information. This can easily lead to app download peaks, resulting in a poor user experience and increased CDN costs for mobile phone manufacturers.
[0079] To this end, the present invention provides an update control method that evenly distributes the silent updates originally scheduled for all mobile phones within a day over n days. In other words, it schedules the silent update traffic originally scheduled for all mobile phones within a day over n days, achieving a uniform traffic distribution. This not only improves the download speed during silent updates and enhances the user experience, but also dynamically controls the instantaneous bandwidth by dynamically adjusting the silent update traffic, thereby avoiding excessive daily peak bandwidth to a certain extent and achieving the goal of controlling CDN costs.
[0080] The following describes the process of enabling and disabling the silent update function in the App Market APP.
[0081] Generally, the silent update function in the App Market APP can be turned on or off by the user. If the user turns on the silent update function in the App Market APP, the App Market APP can automatically update the application; if the user turns off the silent update function in the App Market APP, the user can manually update the application.
[0082] For example, Figure 2 As shown in FIG. 2 (a), the desktop 210 displayed on the mobile phone displays an icon 211 of the application market APP. The user can click on the icon 211 of the application market APP, and in response to the click operation, Figure 2 As shown in FIG. 2( b ), the electronic device starts the application market APP and displays the application interface 220 of the application market APP. The application interface 220 displays an “application update” control, an “installation management” control, an “uninstallation management” control, a “settings” control 221, etc. The user can click the “settings” control 221, and in response to the click operation, Figure 2 As shown in FIG. 2(c), the electronic device may display a setting interface 230, which includes an "auto-update app" control 231, a "data download reminder" control, a "message notification management" control, a "content management" control, and the like. The user may click on the "auto-update app" control 231, and in response to the click operation, Figure 2As shown in Figure (d), the electronic device displays an automatic update application interface 240, which displays an "On" option, an "Only under WLAN" option, and an "Off" option. The user can select any one of the "On" option, the "Only under WLAN" option, and the "Off" option. Among them, if the user selects the "On" option, the application market APP turns on the silent update function, and the silent update can be performed when the mobile phone is connected to WLAN or mobile network; if the user selects the "Only under WLAN" option, the application market APP turns on the silent update function, and the silent update is performed only when the mobile phone is connected to WLAN, and no silent update is performed when the mobile phone is connected to a mobile network; if the user selects the "Off" option, the application market APP turns off the silent update function.
[0083] It should be noted that the embodiments of this application are only based on Figure 2 Take the example of the process of opening and closing the silent update function in the application market APP as an example. Figure 2 The process shown does not limit the embodiments of the present application. In actual applications, the silent update function in the application market APP can also be turned on or off by other methods.
[0084] Figure 3 This is a flow chart of an update control method provided by an embodiment of the present application. This method is applied to the application market APP and server in the mobile phone. The server can be the server corresponding to the application market APP, and optionally can be the server of the mobile phone manufacturer. Figure 3 , the method comprises the following steps:
[0085] Step 301: The application market APP in the mobile phone sends an application update query request to the server.
[0086] For example, the application update query request may carry the device identifier of the mobile phone, the application identifier and version number of each of the one or more applications installed on the mobile phone. Of course, the application update query request may also carry other information, such as the language currently used by the mobile phone, etc., which is not limited in this embodiment of the application.
[0087] The device identifier of a mobile phone is used to uniquely identify the mobile phone. For example, the device identifier of the mobile phone can be the unique device identifier (UDID) of the mobile phone, the serial number (SN), the user account of the application market APP login, etc., which is not limited in the embodiments of the present application.
[0088] The application identifier of the application is used to identify the application. For example, the application identifier of the application can be the name of the application, etc., which is not limited in the embodiment of the present application.
[0089] The version number of an application is used to indicate the version of the application. Generally, a larger version number indicates a newer version; a smaller version number indicates an older version.
[0090] The application update query request is used to query whether there are updated versions of the one or more application programs.
[0091] In some embodiments, the application market app may periodically send application update query requests to the server to periodically query whether there are updated versions of one or more applications. The periodic length of the application market app's sending of application update query requests to the server may be pre-configured. For example, the application market app may send application update query requests to the server every 30 minutes, 1 hour, or 2 hours.
[0092] Each time the server receives an application update query request sent by the application market APP, it can execute the following steps 302 to 308.
[0093] Step 302: After receiving the application update query request, the server determines, for any one of the one or more applications, whether the application is a target application to be updated based on the application identifier and version number of the application.
[0094] It should be noted that after developing a new version of an application, the application developer will often publish it on various application publishing platforms. The server can obtain the latest version of each application from the various application publishing platforms and store it.
[0095] In this case, for any one of the one or more applications, if the version number of the application is smaller than the version number of the application with the same application identifier as the application stored on the server, it can be determined that the application is the target application to be updated; if the version number of the application is greater than or equal to the version number of the application with the same application identifier as the application stored on the server, it can be determined that the application is not the target application to be updated.
[0096] Step 303: If there is a target application to be updated in the one or more applications, the server obtains a download address of update data of the target application.
[0097] The number of target applications can be one or more.
[0098] The download address of the update data of a target application is used to indicate the storage location of the update data in the server.
[0099] Furthermore, the server may also obtain version information of the updated version of the target application, such as size, version number, update log, etc., which is not limited in the embodiments of the present application.
[0100] Optionally, if a target application to be updated is included in the one or more applications, the server may also obtain configuration information. This configuration information is used to indicate the conditions that the mobile phone status must meet during the silent update. For example, the configuration information may include a range of values that the mobile phone temperature must meet, a range of values that the mobile phone battery must meet, etc., which is not limited in this embodiment of the present application.
[0101] The configuration information can be pre-set, for example, the configuration information can be pre-set by a technician according to needs. For example, the configuration information of all mobile phones can be the same, or the configuration information of mobile phones of the same model can be the same, or the configuration information of mobile phones of the same type can be the same, or the configuration information of mobile phones of the same brand can be the same, and the embodiments of the present application are not limited to this.
[0102] Step 304: The server maps the device identification of the mobile phone to a random number within a preset value range.
[0103] The preset numerical range can be set in advance. For example, the preset numerical range can include at least 100 different integers. For example, the preset numerical range can include 100 continuous or discontinuous integers, such as the preset numerical range can include integers from 0 to 99, integers from 1 to 100, or integers from 2 to 101, etc., which are not limited in the embodiments of the present application.
[0104] It should be noted that the random number mapped to the same device identifier within the preset numerical range is the same, that is, each time the server receives an application update query request sent by the application market APP in the same mobile phone, the server will map the device identifier of the mobile phone to the same random number within the preset numerical range. The random numbers mapped to different device identifiers within the preset numerical range may be the same or different. Since there are a sufficient number of mobile phones communicating with the server, the random numbers mapped to the device identifiers of these mobile phones within the preset numerical range are relatively evenly distributed within the preset numerical range, without any large skew.
[0105] For example, suppose the device identifier of mobile phone 1 is udid1, the device identifier of mobile phone 2 is udid2, the device identifier of mobile phone 3 is udid3, and the device identifier of mobile phone 4 is udid4. The preset value range includes integers from 0 to 99. Figure 4As shown, the server may map udid1 to 0 within a preset numerical range, map udid2 to 97 within a preset numerical range, map udid3 to 2 within a preset numerical range, and map udid4 to 99 within a preset numerical range.
[0106] In some embodiments, the operation of step 304 may be: the server obtains the hash value of the device identification of the mobile phone, uses the hash value as a random number seed to initialize a random number generator, and generates a random number within a preset value range through the initialized random number generator.
[0107] For example, the server may generate a hash value of the device identifier of the mobile phone using a hash algorithm. The hash algorithm may be pre-set. For example, the hash algorithm may be a MurmurHash algorithm, a message digest algorithm 5 (MD5), etc., which is not limited in this embodiment of the present application.
[0108] For example, the random number generator is used to generate a random number within a preset numerical range. For example, the random number generator can be a pseudo-random number generator, a true random number generator, a hybrid random number generator, etc., which is not limited in the present embodiment.
[0109] The random number seed determines the starting state of the random number generator. The same random number seed will cause the random number generator to produce the same random number sequence, while different random number seeds will cause the random number generator to produce different random number sequences, thus ensuring randomness. For the same device identifier, each time the random number generator is initialized using the hash value of the device identifier as the random number seed, it can be guaranteed that the random number sequence generated each time is the same. Therefore, for the same device identifier, the random number generated by the random number generator within the preset value range after each initialization is also the same. In this way, the same device identifier is mapped to the same random number within the preset value range each time.
[0110] Step 305: The server determines the target numerical range corresponding to the current date within the preset numerical range according to the number of days between the preset date and the current date and the target equal division value.
[0111] The preset date can be set in advance. The preset date is a date before the current date. For example, the preset date can be January 1, 1970.
[0112] The target numerical range is one of the parts obtained by dividing the preset numerical range into n equal parts, where n is the target numerical range. Specifically, dividing the preset numerical range into n equal parts can produce n numerical ranges, and the target numerical range is a numerical range corresponding to the current date in the n numerical ranges.
[0113] It should be noted that dividing the preset numerical range into n equal parts means dividing all integers within the preset numerical range into n parts, and the number of integers in each part is equal or close. For example, if the preset numerical range includes 100 different integers, then after dividing the preset numerical range into 3 equal parts, there can be 34 integers in the first part, 34 integers in the second part, and 32 integers in the third part, so that the number of integers in the three parts is relatively close. That is, the n equal parts in the embodiments of the present application are not necessarily strictly equal n equal parts, and can also be slightly different n equal parts, as long as the number of integers in each part is relatively close.
[0114] The target equal distribution value is an integer greater than or equal to 2. The target equal distribution value is used to indicate that the silent updates originally scheduled for all mobile phones within one day should be evenly distributed over n days. For example, assuming the target equal distribution value is 3, and 10 mobile phones originally performed silent updates on the same day, then the embodiment of the present application can distribute the silent updates of these 10 mobile phones more evenly over 3 days. For example, 3 mobile phones can perform silent updates on the first day, another 3 mobile phones can perform silent updates on the second day, and the remaining 4 mobile phones can perform silent updates on the third day.
[0115] Optionally, the target equal division value can be calculated according to a preset ratio.
[0116] The preset ratio can be a ratio pre-configured by a technician, and is used to indicate the maximum ratio of all mobile phones that are allowed to perform silent updates each day. It should be noted that during the operation of the server, the technician can also reset the preset ratio according to changes in demand.
[0117] For example, the server may round up the value obtained by dividing 1 by the preset ratio to obtain the target equal division value. For example, assuming the preset ratio is 40%, the value obtained by dividing 1 by 40% may be rounded up to obtain the target equal division value of 3.
[0118] Optionally, the server may round up the value obtained by dividing 100 by the target equal-division value to obtain a target average. The target average is then divided by 100 to obtain a target average ratio. The target average ratio indicates the average daily percentage of all mobile phones that are allowed to perform silent updates.
[0119] For example, assuming the target score is 3, the value obtained by dividing 100 by 3 can be rounded up to obtain a target average of 34, that is, an average of 34% of all mobile phones allow silent updates every day.
[0120] It should be noted that since CDN manufacturers calculate fees based on daily peak bandwidth, in the embodiment of the present application, the preset ratios configured by technicians can be averaged to obtain the target average ratio, so that the silent updates of all mobile phones can be evenly distributed accordingly.
[0121] Since the target equal-division value is used to indicate that the silent updates of all mobile phones originally scheduled for one day should be evenly distributed to n days, which is equivalent to n days as a cycle, the server can determine which day the current date is in this cycle (i.e., n days) based on the number of days between the preset date and the current date and the target equal-division value. Correspondingly, it can be determined which part of the n parts obtained by dividing the preset numerical range into n equal parts corresponds to the current date, that is, the target numerical range corresponding to the current date in the preset numerical range is determined. In this case, the mobile phone identified by the device identifier mapped to an integer within the target numerical range is allowed to perform silent updates on the current date, while the mobile phone identified by the device identifier mapped to an integer outside the target numerical range is prohibited from performing silent updates on the current date.
[0122] In some embodiments, the server determines the target numerical range corresponding to the current date in the preset numerical range based on the number of days between the preset date and the current date and the target equal-division value. The operation can be: the server performs a remainder operation on the number of days between the preset date and the current date and the target equal-division value to obtain the target remainder; and determines the target numerical range corresponding to the current date in the preset numerical range based on the target remainder.
[0123] The target remainder is an integer greater than or equal to 0 and less than or equal to n-1. The target remainder may indicate that the current date is on the i+1th day of the current cycle (ie, n days), where i is the target remainder.
[0124] Optionally, the operation of the server determining the target numerical range corresponding to the current date within the preset numerical range according to the target remainder may include the following three methods:
[0125] The first method: the server determines the target numerical range as the (i+1)th part obtained by dividing the preset numerical range into n equal parts.
[0126] In this case, the server divides the preset numerical range into n equal parts in advance. After obtaining the target remainder (i.e., i), the i+1th part of the n parts obtained by dividing the preset numerical range into n equal parts can be directly determined as the target numerical range.
[0127] For example, suppose the preset numerical range includes 100 different integers. After dividing the preset numerical range into three equal parts, the first part contains 34 integers, the second part contains 34 integers, and the third part contains 32 integers. If the target remainder is 0, the server can determine the target numerical range to be the 34 integers in the first part; if the target remainder is 1, the server can determine the target numerical range to be the 34 integers in the second part; and if the target remainder is 2, the server can determine the target numerical range to be the 32 integers in the third part.
[0128] The second method: the preset numerical range includes integers from 0 to 99. The server determines the range of the preset numerical range that is greater than or equal to i times the target average and less than i+1 times the target average as the target numerical range.
[0129] If the preset numerical range includes integers from 0 to 99, the range of integers greater than or equal to 0 times the target average and less than the smaller of 100 and n times the target average is consistent with the preset numerical range, while the range of integers greater than or equal to i times the target average and less than i+1 times the target average is one of the parts obtained by dividing the entire range into n equal parts. Therefore, in this case, the server does not need to divide the preset numerical range into n equal parts in advance and can directly determine the target numerical range based on the target remainder (i.e., i) and the target average. This allows for simple and rapid determination of the target numerical range.
[0130] For example, the preset numerical range includes integers from 0 to 99, and it is assumed that the target average is 34. Assuming that the target remainder is 0, the server may determine the range of integers greater than or equal to 0 and less than 34 in the preset numerical range as the target numerical range, that is, the target numerical range includes integers from 0 to 33; assuming that the target remainder is 1, the server may determine the range of integers greater than or equal to 34 and less than 68 in the preset numerical range as the target numerical range, that is, the target numerical range includes integers from 34 to 67; assuming that the target remainder is 1, the server may determine the range of integers greater than or equal to 68 and less than 102 in the preset numerical range as the target numerical range, that is, the target numerical range includes integers from 68 to 99.
[0131] The third method: the server determines a range greater than i times the target average ratio and less than or equal to i+1 times the target average ratio as the target ratio range, and determines a numerical range corresponding to the target ratio range in the preset numerical range as the target numerical range.
[0132] The numerical range corresponding to the target ratio range in the preset numerical range refers to all integers in the preset numerical range that are within the target ratio range.
[0133] The range of ratios greater than 0 times the target average ratio and less than or equal to the smaller of 1 and n times the target average ratio is the range of (0, 100%], while the range greater than i times the target average ratio and less than or equal to i+1 times the target average ratio is one of the parts obtained by dividing the entire range into n equal parts. Therefore, in this case, the server does not need to divide the preset numerical range into n equal parts in advance, and can directly determine the target ratio range based on the target remainder (i.e., i) and the target average ratio. Based on this, the target numerical range can be directly determined from the preset numerical range, thereby making it simple and quick to determine the target numerical range.
[0134] For example, assuming the preset numerical range includes 100 different integers and the target average ratio is 34%, assuming the target remainder is 0, the server may determine the integers in the range (0, 34%) in the preset numerical range as the target numerical range, i.e., the target numerical range includes the first 34 integers in the preset numerical range; assuming the target remainder is 1, the server may determine the integers in the range (34%, 68%) in the preset numerical range as the target numerical range, i.e., the target numerical range includes the 35th to 68th integers in the preset numerical range; assuming the target remainder is 2, the server may determine the integers in the range (68%, 102%) in the preset numerical range as the target numerical range, i.e., the target numerical range includes the 69th to 100th integers in the preset numerical range.
[0135] It should be noted that there is no strict order for executing step 304 and step 305. That is, step 304 may be executed first and then step 305, or step 305 may be executed first and then step 304, or step 304 and step 305 may be executed in parallel.
[0136] If the random number mapped to the device identifier of the mobile phone is within the preset numerical range but is not within the target numerical range, the server prohibits the mobile phone from performing silent updates on the current date, and executes the following step 306; if the random number is within the target numerical range, the server allows the mobile phone to perform silent updates on the current date, and executes the following steps 307 to 308.
[0137] Step 306: If the random number is not within the target value range, the server sends an application update message to the application market APP.
[0138] For example, the application update message may carry a download address of update data of each target application among one or more target applications to be updated and first indication information, where the first indication information is used to indicate that silent update is prohibited on the current date.
[0139] Optionally, the application update message may also carry version information of the updated version of each target application in the one or more target applications, and / or carry configuration information, etc., which is not limited in this embodiment of the present application.
[0140] After the application market APP receives the application update message, it can be learned from the first indication information carried in the application update message that silent update is prohibited on the current date. In this case, even if the silent update function is turned on, the application market APP will not perform silent update on the current date, that is, it will not go to the server to download the update data of the target application on the current date.
[0141] In some embodiments, although the application market APP cannot be silently updated on the current date, the user can still manually update the target application.
[0142] Specifically, after receiving the application update message, the application market app can display an update button for the target application to be updated on the application update interface. In this case, if the application market app receives a trigger operation for the update button, it can send an application download request to the server containing the download address of the target application's update data. After receiving the application download request, the server can obtain the update data based on the download address carried in the application download request and send the update data to the application market app. After receiving the update data, the application market app can update the target application based on the update data.
[0143] For example, the server can send the update data to the application market APP through CDN. In this way, the reliability and stability of data transmission can be improved, and the download speed of the update data can be increased.
[0144] The triggering operation for the update button of the target application can be performed by the user, for example, by clicking the update button. If the application market app receives the triggering operation for the update button, it indicates that the user has instructed to update the target application. The application market app can then download the update data of the target application from the server and update the target application accordingly.
[0145] For example, Figure 5 As shown in FIG. 1 (a), the mobile phone displays an application interface 220 of the application market APP, and the application interface 220 displays an "application update" control 222, an "installation management" control, an "uninstallation management" control, a "settings" control, etc. The user can click on the "application update" control 222, and in response to the click operation, Figure 5As shown in FIG. 2( b ), the electronic device may display an application update interface 250, which displays an update button 251 and a one-touch update button 252 for each of one or more target applications to be updated. If the user wants to update one of the target applications, the user may click the update button 251 of the target application. In response to the click operation, the application market APP may update the target application, specifically by downloading the update data of the target application from the server for updating. If the user wants to batch update all target applications, the user may click the one-touch update button 252. In response to the click operation, the application market APP may update the one or more target applications, specifically by downloading the update data of each of the one or more target applications from the server for updating.
[0146] It should be noted that the embodiments of this application are only based on Figure 5 The process shown is used as an example to illustrate the manual update process. Figure 5 The process shown does not limit the embodiments of the present application. In actual applications, manual updates can also be performed through other methods.
[0147] Step 307: If the random number is within the target value range, the server determines one or more target times based on the bandwidth usage and traffic price of each time period in each of the m days before the current date, where m is a positive integer.
[0148] The target time is the time during which the mobile phone is allowed to perform silent updates on the current date.
[0149] m can be pre-set. For example, m can be 2, 3, 4, 7, etc., which is not limited in the present embodiment.
[0150] The various time periods described here may be at the minute level, such as 1 minute, 5 minutes, 30 minutes, etc., or at the hour level, such as 1 hour, 2 hours, etc., and this embodiment of the present application does not limit this.
[0151] Bandwidth usage indicates the ratio of bandwidth used per unit time to the total available bandwidth.
[0152] The traffic price indicates the fee you need to pay for transmitting a certain amount of data.
[0153] For example, the server can obtain the bandwidth usage rate of each time period of each day in the m days before the current date (i.e., the last m days) from the CDN manufacturer; or, the server can analyze the application download status of all mobile phones in the m days before the current date to obtain the bandwidth usage rate of each time period of each day in the m days; of course, the server can also obtain the bandwidth usage rate of each time period of each day in the m days before the current date through other methods, and the embodiments of the present application are not limited to this.
[0154] For example, the server can obtain the traffic prices for each time period of each day in the m days before the current date from the CDN manufacturer. Of course, the server can also obtain the traffic prices for each time period of each day in the m days before the current date through other methods, and the embodiments of the present application are not limited to this.
[0155] In some embodiments, the operation of step 307 may be: the server divides the bandwidth usage of each time period in each day of the m days before the current date by the traffic price to obtain the unit bandwidth usage of each time period in each day of the m days; estimates the unit bandwidth usage of each time period in the current date based on the unit bandwidth usage of each time period in each day of the m days (hereinafter referred to as the estimated unit bandwidth usage); obtains the average value of the estimated unit bandwidth usage of each time period in the current date (hereinafter referred to as the average unit bandwidth usage); and determines one or more target times based on the average unit bandwidth usage.
[0156] The unit bandwidth usage rate indicates the bandwidth usage per unit cost. A lower unit bandwidth usage rate indicates more bandwidth available per unit cost, leading to faster download speeds. A higher unit bandwidth usage rate indicates less bandwidth available per unit cost, leading to slower download speeds.
[0157] This average unit bandwidth usage rate indicates the average level of unit bandwidth usage for the current day. Based on this, a target time can be determined when the unit bandwidth usage rate is lower than this average. When the phone performs a silent update at the target time, it can achieve a faster download speed at the same cost. This balances the user's download experience with CDN costs.
[0158] Optionally, the server estimates the unit bandwidth usage for each time period on the current date based on the unit bandwidth usage for each time period on each of the m days before the current date as follows: for any time period on a day, perform a weighted average of the unit bandwidth usage for that time period on each of the m days to obtain the estimated unit bandwidth usage for that time period on the current date.
[0159] The weight of each of the m days can be pre-set. The weight of each of the m days is greater than 0 and less than 1, and the sum of the weights of each of the m days is 1. For example, the weight of each of the m days can be the same; or, the weight of the date closer to the current date is greater, and the weight of the date farther from the current date is smaller.
[0160] For example, assuming m is 3, then for the three days before the current date, you can set the weight of the date one day from the current date to 0.5, the weight of the date two days from the current date to 0.3, and the weight of the date three days from the current date to 0.2. For example, assuming the current date is June 1, 2024, and the m days before the current date are May 31, 2024, May 30, 2024, and May 29, 2024. Then, you can set the weight of May 31, 2024 to 0.5, the weight of May 30, 2024 to 0.3, and the weight of May 29, 2024 to 0.2.
[0161] Optionally, the server may determine one or more target times based on the average unit bandwidth usage in the following two ways:
[0162] The first method: The server determines one or more target time periods in which the estimated unit bandwidth usage is less than the average unit bandwidth usage from various time periods after the current time within the current date, and determines the start time of each target time period in at least one of the one or more target time periods as the target time.
[0163] If the total number of the one or more target time periods is less than or equal to the preset number, the server may determine the start time of each target time period in the one or more target time periods as the target time; if the total number of the one or more target time periods is greater than the preset number, the server may sort the one or more target time periods in order of estimated unit bandwidth usage from small to large, or in order of time distance from the current time from small to large, and determine the start time of each target time period in the first j target time periods in the sorted one or more target time periods as the target time, where j is the preset number. The preset number may be set in advance, for example, the preset number may be 2, 3, 4, etc., which is not limited in the embodiments of the present application.
[0164] It should be noted that if there is no target time period in the time periods after the current time on the current date whose estimated unit bandwidth usage is less than the average unit bandwidth usage, it means that the estimated unit bandwidth usage of the time periods after the current time on the current date are all relatively high.
[0165] In this case, as an optional method, the server can determine that all time periods after the current time on the current date are not suitable for silent update. In this case, the server can prohibit the mobile phone from performing silent update on the current date. At this time, the operation of the server sending the application update message to the application market APP in the above step 306 can be executed.
[0166] As another optional manner, the server may determine the start time of a time period with the minimum estimated unit bandwidth usage among various time periods after the current time within the current date as the target time.
[0167] The second method: The server obtains the bandwidth usage and traffic price at the current time, divides the bandwidth usage at the current time by the traffic price at the current time, and obtains the unit bandwidth usage at the current time (hereinafter referred to as the actual unit bandwidth usage); if the actual unit bandwidth usage at the current time is less than the average unit bandwidth usage, the current time is determined as the target time; if the actual unit bandwidth usage at the current time is greater than or equal to the average unit bandwidth usage, one or more target times are determined through the above-mentioned first method.
[0168] For example, the server can obtain the current bandwidth usage from the CDN manufacturer; or, the server can analyze the application download status of all mobile phones at the current time to obtain the current bandwidth usage; of course, the server can also obtain the current bandwidth usage in other ways, which is not limited to this embodiment of the present application.
[0169] For example, the server can obtain the current traffic price from the CDN manufacturer. Of course, the server can also obtain the current traffic price in other ways, which is not limited in this embodiment of the present application.
[0170] If the current actual unit bandwidth usage is lower than the average unit bandwidth usage, indicating that the current actual unit bandwidth usage is low, the server can directly use the current time as the target time to instruct the phone to perform a silent update at the current time. This allows the phone to start the silent update as soon as possible, improving the user experience.
[0171] It should be noted that, if the server determines multiple target times in step 307, the server may also determine the priority of each target time among the multiple target times.
[0172] For example, the server may determine the priority of each target time among the multiple target times according to the time interval between each target time among the multiple target times and the current time.
[0173] Specifically, the server can set the priority of each of the multiple target times in descending order of the time distance from the current time, so as to subsequently instruct the mobile phone to prioritize the silent update at the target time that is closer. In this way, the mobile phone can start the silent update as soon as possible, improving the user experience.
[0174] Step 308: The server sends an application update message to the application market APP.
[0175] For example, the application update message may carry a download address of update data of each target application among one or more target applications to be updated and second indication information, where the second indication information is used to indicate that silent update is allowed on the current date.
[0176] Furthermore, the application update message may also carry the one or more target times, and optionally may also carry the priority of each target time among the multiple target times.
[0177] Optionally, the application update message may also carry version information of the updated version of each target application in the one or more target applications, and / or carry configuration information, etc., which is not limited in this embodiment of the present application.
[0178] After receiving the application update message, the application market APP can learn that silent updates are allowed on the current date based on the second indication information carried in the application update message. In this case, if the application update message does not carry a target time, the application market APP can determine that silent updates are allowed on the current date; if the application update message carries a target time, the application market APP can determine that silent updates are allowed on one or more target times on the current date.
[0179] In some embodiments, if the application update message does not carry the target time, then when the silent update function is turned on, if the application market APP detects that the mobile phone status meets the preset conditions and the conditions indicated by the configuration information within the current date, it can send an application download request to the server, and the application download request carries the download address of the update data of each target application in the one or more target applications to be updated. After receiving the application download request, the server can obtain the update data of each target application according to the download address of the update data of each target application in the one or more target applications, and send the update data of each target application in the one or more target applications to the application market APP. After receiving the update data of each target application in the one or more target applications, the application market APP updates each target application according to the update data of each target application.
[0180] The preset condition can be set in advance. For example, the preset condition can be that the phone is in the screen-off state; or the preset condition can be that the phone is in the screen-off state and connected to WLAN. Of course, the preset condition can also be other conditions, which are not limited in the embodiments of the present application.
[0181] For example, when the user selects Figure 2 In the case of the "Open" option in the automatic update application interface 240 shown in (d) of FIG, the application market APP can set the preset condition as the mobile phone is in the screen-off state; Figure 2 In the case of the "Only under WLAN" option in the automatic update application interface 240 shown in Figure (d), the application market APP can set the preset condition as the mobile phone is in the screen-off state and the mobile phone is connected to WLAN.
[0182] In other embodiments, if the application update message carries one or more target times, then when the silent update function of the application market APP is turned on, if it is detected that the time distance between the current time and any target time is less than or equal to the preset time distance within the current date, and it is detected that the mobile phone status meets the preset conditions and the conditions indicated by the configuration information, then an application download request can be sent to the server, and the application download request carries the download address of the update data of each target application in the one or more target applications to be updated. After receiving the application download request, the server can obtain the update data of each target application according to the download address of the update data of each target application in the one or more target applications, and send the update data of each target application in the one or more target applications to the application market APP. After receiving the update data of each target application in the one or more target applications, the application market APP updates each target application according to the update data of each target application.
[0183] The preset duration can be set in advance. For example, the preset duration can be 3 minutes, 5 minutes, etc., which is not limited in the embodiment of the present application.
[0184] It should be noted that in the embodiment of the present application, the mobile phone can be instructed to have the right to silently update at one or more target times within the current date, but not to silently update at other times, thereby avoiding the situation of never updating the application and repeatedly updating the application to a certain extent.
[0185] For example, the server can send the updated data of the target application to the application market APP through the CDN. In this way, the reliability and stability of data transmission can be improved, and the download speed of the updated data can be increased.
[0186] In some embodiments, if the silent update function in the application market APP is not enabled, the application market APP cannot perform silent updates, but the user can still manually update the target application. The specific operation of the manual update can be referred to the relevant description in step 306, and this embodiment of the application will not be repeated here.
[0187] In an embodiment of the present application, after the server receives an application update query request sent by the application market APP in the mobile phone, if it is determined that the target application to be updated exists in the mobile phone, the device identifier of the mobile phone is mapped to a random number within a preset numerical range, and the target numerical range corresponding to the current date in the preset numerical range is determined based on the number of days between the preset date and the current date and the target equal division value (i.e., n). If the random number is not within the target numerical range, the server prohibits the mobile phone from performing silent updates on the current date; if the random number is within the target numerical range, the server allows the mobile phone to perform silent updates on the current date. In this way, the silent updates originally scheduled for all mobile phones in one day can be evenly distributed to n days, that is, the silent update traffic originally scheduled for all mobile phones in one day can be scheduled to n days to achieve uniform distribution of traffic. This not only improves the download speed during silent updates and improves user experience, but also dynamically controls the instantaneous bandwidth by dynamically controlling the silent update traffic, thereby avoiding excessive daily peak bandwidth to a certain extent and achieving the purpose of controlling CDN costs.
[0188] For example, in the related art, Figure 6 As shown in Figure (a), all mobile phones ( Figure 6 Taking mobile phones 1 to 10 as an example, they can be silently updated every day, which can easily lead to excessive daily download traffic and then excessive daily peak bandwidth. This will not only cause a poor user experience, but also bring higher CDN costs to mobile phone manufacturers.
[0189] To this end, the present application provides the above embodiment Figure 3 The update control method described in the embodiment, in this method, assuming that n is 3, such as Figure 6As shown in Figure (b), all phones can be divided into three groups. Phones 1, 2, and 3 in the first group can perform a silent update on the first day of each cycle (i.e., n days), such as on the 1st, 4th, 7th, and so on. Phones 4, 5, and 6 in the second group can perform a silent update on the second day of each cycle, such as on the 2nd, 5th, 8th, and so on. Phones 7, 8, 9, and 10 in the third group can perform a silent update on the third day of each cycle, such as on the 3rd, 6th, 9th, and so on. This evenly distributes the silent update traffic originally scheduled for a single day across all phones over three days, thus scheduling the traffic evenly across all three days. This not only improves the user download experience but also reduces CDN costs.
[0190] It should be noted that the embodiments of the present application can be applied not only to scenarios where the application market APP in a mobile phone updates various applications in the mobile phone, but also to scenarios where a certain application updates itself, or scenarios where the settings application in the mobile phone updates the operating system of the mobile phone. Of course, it can also be applied to other update scenarios, and the embodiments of the present application are not limited to this.
[0191] The following describes the process of enabling and disabling the silent update function in an application.
[0192] Generally, the silent update function in an application can be enabled or disabled by the user. If the user enables the silent update function in the application, the application can automatically update the application; if the user disables the silent update function in the application, the user can manually update the application.
[0193] For example, with Figure 2 The process shown is similar. The user can open the application on the mobile phone and find the option or switch for turning on or off the silent update function in the interface of the application. The user can turn on or off the silent update function in the application by operating the corresponding option or switch.
[0194] Figure 7 This is a flow chart of an update control method provided by an embodiment of the present application. The method is applied to an application and a server in a mobile phone. The server can be a server corresponding to the application, or alternatively, a server of the developer of the application. Figure 7 , the method comprises the following steps:
[0195] Step 701: The application in the mobile phone sends an application update query request to the server.
[0196] For example, the application update query request can carry the device identification of the mobile phone and the version number of the application. Of course, the application update query request can also carry other information, such as the language currently used by the mobile phone, etc., which is not limited in this embodiment of the present application.
[0197] The device identification of the mobile phone and the version number of the application have been described in the above step 301 and will not be repeated here.
[0198] The application update query request is used to query whether there is an updated version of the application.
[0199] In some embodiments, the application may periodically send an application update query request to the server to periodically query whether an updated version of the application is available. The periodicity at which the application sends the application update query request to the server may be pre-configured. For example, the application may send the application update query request to the server every 30 minutes, 1 hour, or 2 hours.
[0200] Each time the server receives an application update query request sent by the application, it may execute the following steps 702 to 708 .
[0201] Step 702: After receiving the application update query request, the server determines whether the application needs to be updated based on the version number of the application.
[0202] It should be noted that after the application developer develops a new version of the application, it will store it on the server. In this case, if the application version number is lower than the version number of the application stored on the server, it can be determined that the application needs to be updated; if the application version number is greater than or equal to the version number of the application stored on the server, it can be determined that the application does not need to be updated.
[0203] Step 703: If the application needs to be updated, the server obtains a download address for the update data of the application.
[0204] The download address of the update data of the application is used to indicate the storage location of the update data in the server.
[0205] Furthermore, the server can also obtain version information of the updated version of the application, such as size, version number, update log, etc., which is not limited in the embodiment of the present application.
[0206] Optionally, when the application needs to be updated, the server can also obtain configuration information. The configuration information has been described in step 303 above and will not be repeated here.
[0207] Step 704: The server maps the device identifier of the mobile phone to a random number within a preset value range.
[0208] The operation of step 704 is similar to the operation of the above-mentioned step 304, and will not be described in detail in this embodiment of the present application.
[0209] Step 705: The server determines the target numerical range corresponding to the current date within the preset numerical range according to the number of days between the preset date and the current date and the target equal division value.
[0210] The operation of step 705 is similar to that of the above-mentioned step 305, and will not be described in detail in this embodiment of the present application.
[0211] It should be noted that there is no strict order for executing the above steps 704 and 705. That is, step 704 may be executed first and then step 705, or step 705 may be executed first and then step 704, or step 704 and step 705 may be executed in parallel.
[0212] If the random number mapped to the device identifier of the mobile phone is within the preset numerical range but is not within the target numerical range, the server prohibits the mobile phone from performing silent updates on the current date, and executes the following step 706; if the random number is within the target numerical range, the server allows the mobile phone to perform silent updates on the current date, and executes the following steps 707 to 708.
[0213] Step 706: If the random number is not within the target value range, the server sends an application update message to the application.
[0214] For example, the application update message may carry a download address of the update data of the application program and first indication information, where the first indication information is used to indicate that silent update is prohibited on the current date.
[0215] Optionally, the application update message may also carry version information of the updated version of the application, and / or configuration information, etc., which is not limited in the embodiments of the present application.
[0216] After the application receives the application update message, it can be learned from the first indication information carried in the application update message that silent update is prohibited on the current date. Even if the silent update function is turned on, the application will not be silently updated on the current date, that is, the application will not go to the server to download the update data of the application on the current date.
[0217] In some embodiments, although the application cannot be silently updated on the current date, the user can still manually update the application.
[0218] As an example, after receiving the app update message, the application can display an update reminder message when the user opens the application. In this case, if the application receives a confirmation operation for the update reminder message, it can send an application download request to the server containing the download address of the application's update data. After receiving the application download request, the server can obtain the update data according to the download address carried in the application download request and send the update data to the application. After receiving the update data, the application can update the application according to the update data.
[0219] Optionally, the server can send the update data to the application via CDN, thereby improving the reliability and stability of data transmission and increasing the download speed of the update data.
[0220] Step 707: If the random number is within the target value range, the server determines one or more target times based on the bandwidth usage and traffic price of each time period in each of the m days before the current date, where m is a positive integer.
[0221] The operation of step 707 is similar to that of the above-mentioned step 307, and will not be described in detail in this embodiment of the present application.
[0222] Step 708: The server sends an application update message to the application.
[0223] For example, the application update message may carry a download address of the update data of the application program and second indication information, where the second indication information is used to indicate that silent update is allowed on the current date.
[0224] Furthermore, the application update message may also carry the one or more target times, and optionally may also carry the priority of each target time among the multiple target times.
[0225] Optionally, the application update message may also carry version information of the updated version of the application, and / or configuration information, etc., which is not limited in the embodiments of the present application.
[0226] After receiving the application update message, the application can learn, based on the second indication information carried in the application update message, whether silent updates are permitted on the current date. In this case, if the application update message does not carry a target time, the application can determine that silent updates are permitted on the current date; if the application update message carries a target time, the application can determine that silent updates are permitted on one or more target times on the current date.
[0227] In some embodiments, if the application update message does not carry a target time, then if the application, with the silent update function enabled, detects that the phone's status satisfies both pre-set conditions and the conditions indicated by the configuration information within the current date, it may send an application download request to the server. This application download request carries the download address for the application's update data. Upon receiving the application download request, the server may retrieve the update data from the download address for the application's update data and send the update data to the application. Upon receiving the update data, the application may update the application based on the update data.
[0228] The preset condition can be set in advance. For example, the preset condition can be that the phone is in the screen-off state; or the preset condition can be that the phone is in the screen-off state and connected to WLAN. Of course, the preset condition can also be other conditions, which are not limited in the embodiments of the present application.
[0229] In other embodiments, if the application update message carries one or more target times, then when the silent update function is enabled, if the application detects that the time interval between the current time and any target time is less than or equal to a preset time interval within the current date, and detects that the phone status meets preset conditions and the conditions indicated by the configuration information, then the application download request may be sent to the server. The application download request may carry the download address of the application's update data. After receiving the application download request, the server may obtain the update data according to the download address of the application's update data and send the update data to the application. After receiving the update data, the application may update the application according to the update data.
[0230] The preset duration can be set in advance. For example, the preset duration can be 3 minutes, 5 minutes, etc., which is not limited in the embodiment of the present application.
[0231] It should be noted that in the embodiment of the present application, the mobile phone can be instructed to have the right to silently update at one or more target times within the current date, but not to silently update at other times, thereby avoiding the situation of never updating the application and repeatedly updating the application to a certain extent.
[0232] For example, the server can send the update data to the application via CDN, thereby improving the reliability and stability of data transmission and increasing the download speed of the update data.
[0233] In some embodiments, if the silent update function in the application is not enabled, the application cannot be silently updated, but the user can still manually update the application. The specific operation of the manual update can refer to the relevant description in step 706, and this embodiment of the application will not be repeated here.
[0234] In an embodiment of the present application, after the server receives an application update query request sent by an application in a mobile phone, if it is determined that the application needs to be updated, the device identifier of the mobile phone is mapped to a random number within a preset numerical range, and the target numerical range corresponding to the current date in the preset numerical range is determined based on the number of days between the preset date and the current date and the target equal division value (i.e., n). If the random number is not within the target numerical range, the server prohibits the mobile phone from performing silent updates on the current date; if the random number is within the target numerical range, the server allows the mobile phone to perform silent updates on the current date. In this way, the silent updates originally scheduled for all mobile phones in one day can be evenly distributed to n days, that is, the silent update traffic originally scheduled for all mobile phones in one day can be scheduled to n days to achieve uniform distribution of traffic. This not only improves the download speed during silent updates and improves user experience, but also dynamically controls the instantaneous bandwidth by dynamically controlling the silent update traffic, thereby avoiding excessive daily peak bandwidth to a certain extent and achieving the purpose of controlling CDN costs.
[0235] The following describes the process of turning on and off the silent update feature in the Settings app.
[0236] The Settings app is used to configure and manage various phone settings and parameters. For example, the Settings app can be used to configure and manage network settings, application management, display settings, security and privacy, system and update settings, and other aspects. Optionally, the System and Update settings may include an option or switch to enable or disable silent updates.
[0237] Generally, the silent update feature in the Settings app can be enabled or disabled by the user. If the user enables the silent update feature in the Settings app, the Settings app can automatically update the phone's operating system. If the user disables the silent update feature in the Settings app, the user can manually update the phone's operating system.
[0238] For example, with Figure 2 The process shown is similar. The user can open the settings application on the mobile phone and find the option or switch for turning on or off the silent update function in the settings application interface. The user can turn on or off the silent update function in the settings application by operating the corresponding option or switch.
[0239] Figure 8This is a flow chart of an update control method provided by an embodiment of the present application. This method is applied to a setting application and a server in a mobile phone. The server can be a server corresponding to the setting application, or optionally a server of the mobile phone manufacturer. Figure 8 , the method comprises the following steps:
[0240] Step 801: The settings application in the mobile phone sends a system update query request to the server.
[0241] For example, the system update query request may carry the device identification of the mobile phone and the version number of the operating system of the mobile phone. Of course, the system update query request may also carry other information, which is not limited in the embodiment of the present application.
[0242] The device identification of the mobile phone has been described in the above step 301 and will not be repeated here.
[0243] The version number of an operating system is used to indicate the version of the operating system. Generally, a larger version number indicates a newer version; a smaller version number indicates an older version.
[0244] The system update query request is used to query whether there is an updated version of the operating system of the mobile phone.
[0245] In some embodiments, the settings application may periodically send system update query requests to the server to periodically query whether an updated version of the mobile phone's operating system is available. The periodicity of the settings application's sending of system update query requests to the server may be pre-configured. For example, the settings application may send system update query requests to the server every 30 minutes, 1 hour, or 2 hours.
[0246] Each time the server receives the system update query request sent by the setting application, it may execute the following steps 802 to 808 .
[0247] Step 802: After receiving the system update query request, the server determines whether the operating system needs to be updated based on the version number of the operating system.
[0248] It should be noted that after a mobile phone manufacturer develops a new version of the operating system, it will be stored on the server. In this case, if the version number of the operating system is lower than the version number stored on the server, it can be determined that the operating system needs to be updated; if the version number of the operating system is greater than or equal to the version number stored on the server, it can be determined that the operating system does not need to be updated.
[0249] Step 803: If the operating system needs to be updated, the server obtains a download address for the update data of the operating system.
[0250] The download address of the update data of the operating system is used to indicate the storage location of the update data in the server.
[0251] Furthermore, the server may also obtain version information of the updated version of the operating system, such as size, version number, update log, etc., which is not limited in the embodiment of the present application.
[0252] Optionally, when the operating system needs to be updated, the server may also obtain configuration information. The configuration information has been described in step 303 above and will not be described again here.
[0253] Step 804: The server maps the device identification of the mobile phone to a random number within a preset value range.
[0254] The operation of step 804 is similar to the operation of the above-mentioned step 304, and will not be described in detail in this embodiment of the present application.
[0255] Step 805: The server determines the target numerical range corresponding to the current date within the preset numerical range according to the number of days between the preset date and the current date and the target equal division value.
[0256] The operation of step 805 is similar to that of the above-mentioned step 305, and will not be described in detail in this embodiment of the present application.
[0257] It should be noted that there is no strict order for executing the above steps 804 and 805. That is, step 804 may be executed first and then step 805, or step 805 may be executed first and then step 804, or step 804 and step 805 may be executed in parallel.
[0258] If the random number mapped to the device identifier of the mobile phone is within the preset numerical range but is not within the target numerical range, the server prohibits the mobile phone from performing silent updates on the current date, and executes the following step 806; if the random number is within the target numerical range, the server allows the mobile phone to perform silent updates on the current date, and executes the following steps 807 to 808.
[0259] Step 806: If the random number is not within the target value range, the server sends a system update message to the setting application.
[0260] The operation of step 806 is similar to that of the above-mentioned step 706, and will not be described in detail in this embodiment of the present application.
[0261] Step 807: If the random number is within the target value range, the server determines one or more target times based on the bandwidth usage and traffic price of each time period in each of the m days before the current date, where m is a positive integer.
[0262] The operation of step 807 is similar to that of the above-mentioned step 307, and will not be described in detail in this embodiment of the present application.
[0263] Step 808: The server sends a system update message to the setting application.
[0264] The operation of step 808 is similar to that of the above-mentioned step 708, and will not be described in detail in this embodiment of the present application.
[0265] In an embodiment of the present application, after the server receives a system update query request sent by the settings application in the mobile phone, if it is determined that the operating system of the mobile phone needs to be updated, the device identifier of the mobile phone is mapped to a random number within a preset numerical range, and the target numerical range corresponding to the current date in the preset numerical range is determined based on the number of days between the preset date and the current date and the target equal division value (i.e., n). If the random number is not within the target numerical range, the server prohibits the mobile phone from performing silent updates on the current date; if the random number is within the target numerical range, the server allows the mobile phone to perform silent updates on the current date. In this way, the silent updates originally scheduled for all mobile phones in one day can be evenly distributed to n days, that is, the silent update traffic originally scheduled for all mobile phones in one day can be scheduled to n days to achieve uniform distribution of traffic. This not only improves the download speed during silent updates and improves user experience, but also dynamically controls the instantaneous bandwidth by dynamically controlling the silent update traffic, thereby avoiding excessive daily peak bandwidth to a certain extent and achieving the purpose of controlling CDN costs.
[0266] The communication system involved in the embodiments of the present application is described below.
[0267] Figure 9 Schematic diagram of a communication system provided by an embodiment of the present application. Figure 9 , the communication system may include a first device 901 and a second device 902.
[0268] The first device 901 and the second device 902 may communicate via a wired connection or a wireless connection.
[0269] There may be multiple second devices 902. The second device 902 has an operating system, and one or more application programs may be installed on the second device 902.
[0270] For example, any second device 902 may be a mobile terminal (MT), a mobile station (MS), a mobile unit (MU), a wireless unit, a remote unit, a user agent, a mobile client, etc. For example, any second device 902 may be a mobile phone, a tablet computer, a wearable device, a digital camera, an in-vehicle device, an augmented reality (AR) device, a virtual reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a laptop computer, etc., and this embodiment of the present application does not limit this.
[0271] The first device 901 may be a device storing an updated version of an operating system and / or storing an updated version of an application program. For example, the first device 901 may be a server.
[0272] Optionally, the second device 902 may obtain update data for its operating system from the first device 901 and update its own operating system based on the update data. Alternatively, the second device 902 may obtain update data for an application installed on the second device 902 from the first device 901 and update the application based on the update data.
[0273] For example, the first device 901 may transmit operating system update data and / or application update data to the second device 902 via a CDN.
[0274] Figure 10 This is a flow chart of an update control method provided by an embodiment of the present application. Figure 10 , the method comprises the following steps:
[0275] Step 1001: The second device sends an update query request to the first device.
[0276] For example, the update query request can be the above Figure 3 The application update query request described in the embodiment may be Figure 7 The application update query request described in the embodiment may be Figure 8 The system update query request described in the embodiment.
[0277] The update query request is used to query whether the second device has an update requirement.
[0278] If the update query request is the above Figure 3 The application update query request of the embodiment, the second device has an update requirement means that there is a target application to be updated in the application identified by the application identifier of one or more applications carried in the application update query request; if the update query request is the above Figure 7 The application update query request of the embodiment, the second device has an update requirement means that the application sending the application update query request needs to be updated; if the update query request is the above Figure 8 In the system update query request described in the embodiment, the second device having an update requirement means that the operating system of the second device needs to be updated.
[0279] In some embodiments, the second device may periodically send an update query request to the first device to periodically query whether the second device needs to be updated. The periodicity of the second device sending the update query request to the first device may be pre-configured. For example, the second device may send the update query request to the first device every 30 minutes, 1 hour, or 2 hours.
[0280] Each time the first device receives an update query request sent by the second device, it may execute the following steps 1002 to 1008 .
[0281] Step 1002: After receiving the update query request, if the first device determines that the second device has an update requirement, the device identifier of the second device is mapped to a random number within a preset value range.
[0282] Optionally, when the second device has an update requirement, the first device may also obtain a download address for the update data.
[0283] Furthermore, the first device may also obtain version information of the update data, such as size, version number, update log, etc., which is not limited in the embodiment of the present application.
[0284] Optionally, when the second device has an update requirement, the first device may also obtain configuration information. The configuration information has been described in step 303 above and will not be repeated here.
[0285] The operation of the first device mapping the device identifier of the second device to a random number within a preset numerical range is similar to the operation in step 304 above, and will not be described in detail in this embodiment of the present application.
[0286] Step 1003: The first device determines a target numerical range corresponding to the current date within the preset numerical range according to the number of days between the preset date and the current date and the target equal division value.
[0287] The operation of step 1003 is similar to the operation of the above-mentioned step 305, and will not be described in detail in this embodiment of the present application.
[0288] If the random number mapped to the device identification of the second device within the preset numerical range is not within the target numerical range, execute the following step 1004; if the random number is within the target numerical range, execute the following step 1005.
[0289] Step 1004: If the random number is not within the target value range, the first device prohibits the second device from performing silent update on the current date.
[0290] For example, the operation of the first device prohibiting the second device from performing silent update on the current date may be: the first device sends a first update message to the second device.
[0291] The first update message may be the application update message in step 306. In this case, the operation of the first device sending the first update message to the second device is similar to the operation in step 306, and will not be described in detail in this embodiment of the present application.
[0292] Alternatively, the first update message may be the application update message in step 706. In this case, the operation of the first device sending the first update message to the second device is similar to the operation in step 706, and will not be described in detail in this embodiment of the present application.
[0293] Alternatively, the first update message may be the system update message in step 806 above. In this case, the operation of the first device sending the first update message to the second device is similar to the operation in step 806 above, and will not be described in detail in this embodiment of the present application.
[0294] Step 1005: If the random number is within the target value range, the first device allows the second device to perform a silent update on the current date.
[0295] For example, if the random number is within the target value range, the first device may further determine one or more target times based on the bandwidth usage and traffic price for each time period within each of the m days preceding the current date. The specific operation is similar to that of step 307 above and will not be further described in this embodiment of the present application.
[0296] For example, the operation of the first device allowing the second device to perform a silent update on the current date may be: the first device sends a second update message to the second device.
[0297] The second update message may be the application update message in step 308. In this case, the operation of the first device sending the second update message to the second device is similar to the operation in step 308, and will not be described in detail in this embodiment of the present application.
[0298] Alternatively, the second update message may be the application update message in step 708. In this case, the operation of the first device sending the second update message to the second device is similar to the operation in step 708, and will not be described in detail in this embodiment of the present application.
[0299] Alternatively, the second update message may be the system update message in step 808. In this case, the operation of the first device sending the second update message to the second device is similar to the operation in step 808, and will not be described in detail in this embodiment of the present application.
[0300] In an embodiment of the present application, after the first device receives the update query request sent by the second device, if it is determined that the second device has an update requirement, the device identifier of the second device is mapped to a random number within the preset numerical range, and the target numerical range corresponding to the current date in the preset numerical range is determined based on the number of days between the preset date and the current date and the target equal division value (i.e., n). If the random number is not within the target numerical range, the first device prohibits the second device from performing a silent update on the current date; if the random number is within the target numerical range, the first device allows the second device to perform a silent update on the current date. In this way, the silent updates of all second devices originally scheduled within one day can be evenly distributed to n days, that is, the silent update traffic of all second devices originally scheduled within one day can be scheduled to n days to achieve a uniform distribution of traffic. This not only improves the download speed during silent updates and improves user experience, but also dynamically controls the instantaneous bandwidth by dynamically controlling the silent update traffic, thereby avoiding excessive daily peak bandwidth to a certain extent and achieving the purpose of controlling CDN costs.
[0301] Figure 11 This is a schematic diagram of the structure of an update control device provided in an embodiment of the present application. The device can be implemented as part or all of a computer device by software, hardware, or a combination of both. The computer device can be as follows Figure 13 See the equipment shown. Figure 11 The device includes: a receiving module 1101, a mapping module 1102, a determining module 1103, a prohibiting module 1104, and a allowing module 1105.
[0302] Receiving module 1101, configured to receive an update query request sent by a second device;
[0303] A mapping module 1102 is configured to map the device identifier of the second device to a random number within a preset value range if it is determined that the second device needs to be updated;
[0304] Determination module 1103, configured to determine a target numerical range corresponding to the current date within the preset numerical range based on the number of days between the preset date and the current date and the target equal division value, where the target numerical range is one of the equal divisions of the preset numerical range, n being the target equal division value, and n being an integer greater than or equal to 2;
[0305] a prohibition module 1104, configured to prohibit the second device from performing silent update on the current date if the random number is not within a target value range;
[0306] The allowing module 1105 is configured to allow the second device to perform a silent update on the current date if the random number is within a target value range.
[0307] In an embodiment of the present application, after the update control device receives the update query request sent by the second device, if it is determined that the second device has an update requirement, the device identifier of the second device is mapped to a random number within the preset numerical range, and the target numerical range corresponding to the current date in the preset numerical range is determined based on the number of days between the preset date and the current date and the target equal division value (i.e., n). If the random number is not within the target numerical range, the first device prohibits the second device from performing a silent update on the current date; if the random number is within the target numerical range, the first device allows the second device to perform a silent update on the current date. In this way, the silent updates of all second devices originally scheduled within one day can be evenly distributed to n days, that is, the silent update traffic of all second devices originally scheduled within one day can be scheduled to n days to achieve a uniform distribution of traffic. This not only improves the download speed during silent updates and improves user experience, but also dynamically controls the instantaneous bandwidth by dynamically controlling the silent update traffic, thereby avoiding excessive daily peak bandwidth to a certain extent and achieving the purpose of controlling CDN costs.
[0308] It should be noted that: the update control device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example to illustrate the update control. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0309] The functional units and modules in the above embodiments may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The above integrated units may be implemented in the form of hardware or software functional units. In addition, the specific names of the functional units and modules are only for the purpose of distinguishing them from each other and are not intended to limit the scope of protection of the embodiments of this application.
[0310] The update control device and update control method embodiments provided in the above embodiments belong to the same concept. The specific working processes and technical effects brought about by the units and modules in the above embodiments can be found in the method embodiment part and will not be repeated here.
[0311] Figure 12 This is a schematic diagram of the structure of a first device provided in an embodiment of the present application. Figure 12 The first device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0312] It is understood that the structures illustrated in the embodiments of the present application do not constitute specific limitations on the first device. In other embodiments of the present application, the first device may include more or fewer components than shown, or combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0313] The processor 110 may include one or more processing units, for example, an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0314] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0315] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the first device. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0316] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the first device by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created by the first device during use (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0317] The wireless communication function of the first device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, baseband processor, etc.
[0318] The mobile communication module 150 can provide wireless communication solutions including second generation mobile communication technology (2G) / third generation mobile communication technology (3G) / fourth generation mobile communication technology (4G) / fifth generation mobile communication technology (5G) applied on the first device.
[0319] The wireless communication module 160 can provide wireless communication solutions applied on the first device, including WLAN (such as Wi-Fi network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.
[0320] The first device can implement audio functions, such as music playback and recording, through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0321] The first device can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
[0322] The first device implements a display function through a GPU, a display screen 194 , an application processor, and the like.
[0323] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the first device may include one or N display screens 194, where N is an integer greater than one.
[0324] The touch sensor 180K is also called a "touch panel." The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor 180K can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the first device, at a different location from the display screen 194.
[0325] Figure 13 This is a schematic diagram of the structure of a second device provided in an embodiment of the present application. Figure 13 The second device includes at least one processor 201 , a communication bus 202 , a memory 203 , and at least one communication interface 204 .
[0326] The processor 201 may be a microprocessor (including a central processing unit (CPU) etc.), an application-specific integrated circuit (ASIC), or may be one or more integrated circuits for controlling the execution of the program of the present application.
[0327] The communication bus 202 may include a pathway for transmitting information between the aforementioned components.
[0328] The memory 203 may be a read-only memory (ROM), a random access memory (RAM), an electrically erasable programmable read-only memory (EEPROM), an optical disc (including a compact disc read-only memory (CD-ROM), a compact disc, a laser disc, a digital versatile disc, a Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 203 may exist independently and be connected to the processor 201 via the communication bus 202. The memory 203 may also be integrated with the processor 201.
[0329] The communication interface 204 uses any device such as a transceiver to communicate with other devices or communication networks, such as Ethernet, radio access network (RAN), WLAN, etc.
[0330] In a specific implementation, as an embodiment, the processor 201 may include one or more CPUs, such as Figure 13 CPU0 and CPU1 are shown in the figure.
[0331] In a specific implementation, as an embodiment, the second device may include multiple processors, such as Figure 13 1 and 2. Each of these processors may be a single-core processor or a multi-core processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0332] The memory 203 is used to store the program code 206 for executing the solution of the present application, and the processor 201 is used to execute the program code 206 stored in the memory 203. The second device can implement the update control method provided in the above embodiment through the processor 201 and the program code 206 in the memory 203.
[0333] The embodiments of the present application do not particularly limit the specific structure of the execution subject of the update control method. As long as the code recording the update control method provided by the embodiments of the present application can be executed to perform processing according to the update control method provided by the embodiments of the present application, the execution subject of the update control method provided by the embodiments of the present application can be, for example, a functional module in a computer device that can call and execute a program, or a processing device applied to the computer device, such as a chip.
[0334] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0335] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0336] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0337] An embodiment of the present application further provides a computer program product. When the computer program product is run on an electronic device, the electronic device can implement the steps in the above-mentioned various method embodiments.
[0338] The present application also provides a chip system, which includes a processor coupled to a memory, and the processor executes a computer program stored in the memory to implement the steps of any method embodiment of the present application. The chip system can be a single chip or a chip module composed of multiple chips.
[0339] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center via a wired (such as: coaxial cable, optical fiber, data subscriber line (Digital Subscriber Line, DSL) etc.) or wireless (such as: infrared, wireless, microwave etc.) mode. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape, etc.), an optical medium (eg, a digital versatile disc (DVD), etc.), or a semiconductor medium (eg, a solid state disk (SSD), etc.).
[0340] The above are optional embodiments provided for this application and are not intended to limit this application. Any modifications, equivalent replacements, improvements, etc. made within the technical scope disclosed in this application should be included in the scope of protection of this application.
Claims
1. An update control method, characterized in that: Applied to a first device, the method includes: receiving an update query request sent by a second device; If it is determined that the second device needs to be updated, mapping the device identifier of the second device to a random number within a preset value range; Determine, based on the number of days between a preset date and the current date and the target fraction value, a target numerical range corresponding to the current date within the preset numerical range, the target numerical range being one of the parts obtained by dividing the preset numerical range into n equal parts, where n is the target fraction value, and n is an integer greater than or equal to 2; If the random number is not within the target value range, prohibiting the second device from performing silent update on the current date; If the random number is within the target value range, the second device is allowed to perform a silent update on the current date.
2. The method according to claim 1, wherein The preset numerical range includes 100 consecutive integers.
3. The method according to claim 1 or 2, wherein: Mapping the device identifier of the second device to a random number within a preset value range includes: Obtaining a hash value of the device identification of the second device; Initializing a random number generator using the hash value as a random number seed; The initialized random number generator generates a random number within the preset value range.
4. The method according to any one of claims 1 to 3, characterized in that The step of determining, based on the number of days between the preset date and the current date and the target equal division value, that the current date is before the target numerical range corresponding to the preset numerical range further includes: The value obtained by dividing 1 by the preset ratio is rounded up to obtain the target equal division value.
5. The method according to any one of claims 1 to 4, characterized in that: The step of determining the target numerical range corresponding to the current date within the preset numerical range based on the number of days between the preset date and the current date and the target equal division value includes: Performing a remainder operation on the number of days between the preset date and the current date and the target equal division value to obtain a target remainder; The target numerical range corresponding to the current date within the preset numerical range is determined according to the target remainder.
6. The method according to claim 5, wherein The determining, according to the target remainder, the target numerical range corresponding to the current date within the preset numerical range includes: The target numerical range is determined to be the i+1th part obtained by dividing the preset numerical range into n equal parts, where i is the target remainder.
7. The method according to claim 5, wherein The preset value range includes integers from 0 to 99; The step of determining, based on the number of days between the preset date and the current date and the target equal division value, that the current date is before the target numerical range corresponding to the preset numerical range further includes: Divide 100 by the target equal division value and round up the result to obtain the target average; The determining, according to the target remainder, the target numerical range corresponding to the current date within the preset numerical range includes: The range of the preset numerical range that is greater than or equal to i times the target average and less than i+1 times the target average is determined as the target numerical range, where i is the target remainder.
8. The method according to claim 5, wherein The step of determining, based on the number of days between the preset date and the current date and the target equal division value, that the current date is before the target numerical range corresponding to the preset numerical range further includes: Divide 100 by the target equal division value and round up the result to obtain the target average; Divide the target average by 100 to obtain the target average ratio; The determining, according to the target remainder, the target numerical range corresponding to the current date within the preset numerical range includes: Determine a range greater than i times the target average ratio and less than or equal to i+1 times the target average ratio as a target ratio range, where i is the target remainder; The numerical range corresponding to the target ratio range in the preset numerical range is determined as the target numerical range.
9. The method according to any one of claims 1 to 8, characterized in that: After determining the target numerical range corresponding to the current date within the preset numerical range, the method further includes: If the random number is within the target value range, one or more target times are determined based on the bandwidth usage and traffic price in each time period of each day in the m days before the current date, where m is a positive integer and the target time is the time when the second device is allowed to perform silent update within the current date.
10. The method according to claim 9, wherein The step of determining one or more target times based on the bandwidth usage and traffic price in each time period of each day in the m days before the current date includes: Divide the bandwidth usage rate of each time period in each of the m days by the traffic price to obtain the unit bandwidth usage rate of each time period in each of the m days; Determine the estimated unit bandwidth usage for each time period on the current date based on the unit bandwidth usage for each time period on each of the m days; Obtain the average unit bandwidth usage of the estimated unit bandwidth usage for each time period within the current date; The one or more target times are determined according to the average unit bandwidth usage.
11. The method according to claim 10, wherein The determining the one or more target times according to the average unit bandwidth usage includes: Determine one or more target time periods in which the estimated unit bandwidth usage is less than the average unit bandwidth usage from each time period after the current time within the current date; A start time of each target time period in at least one target time period among the one or more target time periods is determined as the target time.
12. The method according to claim 10, wherein The determining the one or more target times according to the average unit bandwidth usage includes: Divide the current bandwidth usage by the current traffic price to obtain the actual unit bandwidth usage at the current time; If the actual unit bandwidth usage at the current time is less than the average unit bandwidth usage, determining the current time as the target time; If the actual unit bandwidth usage at the current time is greater than or equal to the average unit bandwidth usage, one or more target time periods in which the estimated unit bandwidth usage is less than the average unit bandwidth usage are determined from the time periods after the current time within the current date, and the start time of each target time period in at least one of the one or more target time periods is determined as the target time.
13. The method according to any one of claims 1 to 12, characterized in that: The prohibiting the second device from performing silent update on the current date includes: Sending a first update message to the second device, where the first update message carries a download address of update data and first indication information, where the first indication information is used to indicate that silent update is prohibited on the current date; The allowing the second device to perform a silent update on the current date includes: A second update message is sent to the second device, where the second update message carries a download address of update data and second indication information, where the second indication information is used to indicate that silent update is allowed on the current date.
14. A computer device, characterized in that: The computer device includes: one or more processors, and a memory; The memory is coupled to the one or more processors, and is configured to store computer program code, where the computer program code includes computer instructions. The one or more processors call the computer instructions to enable the computer device to perform the method according to any one of claims 1 to 13.
15. A chip system, characterized in that: The chip system is applied to a computer device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the computer device executes the method as described in any one of claims 1 to 13.
16. A computer-readable storage medium, characterized in that The computer-readable storage medium comprises instructions, which, when executed on a computer device, cause the computer device to perform the method according to any one of claims 1 to 13.
17. A computer program product, characterized in that When the computer program product is run on a computer device, the computer device is caused to perform the method according to any one of claims 1 to 13.
Citation Information
Patent Citations
Electronic equipment and method for upgrading software on same
CN102023877A
System upgrading method and device for smart television
CN106412696A
Updating method, device, storage medium and server
CN109257219A
Bandwidth traffic control method and device, and storage medium
CN116233028A
Log database upgrading method and device and storage medium
CN116450603A