Detailed Description
The technical solutions of the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which are obtained by a person skilled in the art based on the embodiments of the present application, fall within the scope of protection of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the application may be practiced otherwise than as specifically illustrated or described herein. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
The method for controlling downloading of an application program, a server, an electronic device and a readable storage medium according to the embodiments of the present application are described in detail below with reference to the accompanying drawings.
The embodiment of the application provides a download control method of an application program, as shown in fig. 1, the download control method comprises the following steps:
step 102, receiving a version update request of an application program sent by first electronic equipment;
Step 104, in response to the version update request, determining a target flow required for downloading the updated version when the updated version exists in the application program;
And step 106, pushing the updated version to the first electronic equipment under the condition that the target flow is smaller than or equal to the allowable use flow in the preset time period.
The first electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a wearable device and the like.
In this embodiment, the second electronic device (e.g., a server) determines that the first electronic device needs to perform an application version update when receiving a version update request of the application sent by the first electronic device. In this case, it is determined whether the application program has an updated version, and if so, it is necessary to determine whether the target traffic required for the first electronic device to download the updated version exceeds the allowable usage traffic within a preset period of time (for example, the current period of time). If the target flow exceeds the allowable use flow in the preset time period, feeding back information of no updated version to the first electronic equipment; and if the target traffic does not exceed the allowable usage traffic within the preset time period, pushing the updated version to the first electronic equipment so that the first electronic equipment downloads the updated version, and thus version updating is carried out on the application program.
By adopting the mode, the idea of peak clipping and valley filling is adopted, and only the updated version which does not exceed the flow control set value (namely the allowed flow) is allowed to be downloaded in the preset time period, so that the CDN flow in unit time is controlled, the situation that the CDN flow waveform is spiked is avoided, the original CDN flow waveform which is suddenly high or low is stabilized, after the peak value of the day is reduced, the cost of the CDN is reduced according to the charging rule, the corresponding saved bandwidth flow can be used for other users, and the purpose of saving flow and reducing cost is fully achieved.
It should be noted that, when a vulnerability problem occurs to an application program of the first electronic device and repair needs to be performed in time, a specific version of the APP needs to be controlled not to perform flow control, so that a user can perform program upgrading in time and not to perform flow control. Specifically, the version update request carries a current version number of the application program, and whether the application program needs to be subjected to version update or version repair is determined according to the current version number, so that flow control is performed when the version update is performed, and flow control is not performed when the version repair is performed.
Further, in one embodiment of the present application, after determining the target traffic required for downloading the updated version, the method further includes: and determining the allowable use flow in the preset time period according to the total use flow and the used flow in the preset time period.
In this embodiment, a way of determining the allowable usage flow rate for a preset period of time is defined.
First, the total usage flow rate for a preset period of time is determined. Specifically, the greater the CDN bandwidth, the faster the APP will be upgraded, and the higher the cost to spend according to CDN cost calculation rules, i.e., peak-to-month average. A compromise needs to be made in both the time and cost dimensions to determine how much bandwidth (i.e., total traffic used) to use for a given period of time, e.g., to calculate how much traffic (Mbps) to download in total per second. Assuming that the result of the calculation is 5000Mbps, a total of one second allows 5000M to be downloaded. Calculated as 1Mb equals 1 token, there are 5000 tokens per second. Of course, if finer granularity control is desired, the calculation may be performed with 1Kb or 1b equal to 1 token.
After 5000 tokens per second are determined, 5000 tokens per second need to be issued in the system for standby, 5000 tokens are issued at the current time (e.g. 2021, 3, 26, 19:46:48), and 5000 tokens are issued again at the next second (2021, 3, 26, 19:46:49).
Because multiple applications may be downloaded within a period of time, a portion of the traffic may already be used for downloading other applications before the application currently needs to be downloaded. Therefore, it is necessary to further determine the used flow rate within the preset period. And obtaining the allowable use flow in the preset time period by calculating the difference between the total use flow and the used flow.
In this embodiment, an implementation procedure of the method for controlling downloading of an application program according to the embodiment of the present application is shown in fig. 2, and includes:
Step 202, initiating a version update request by an APP of a client at intervals;
Step 204, the server detects whether there is an updated version of the APP, if not, step 206 is entered, and if so, step 208 is entered;
step 206, feeding back the information without updated version to the client;
Step 208, judging whether the token in the current time period is enough to download the updated version, if so, entering step 210, and if not, entering step 206;
step 210, updating the number of currently consumed tokens;
step 212, feeding back the download address of the updated version to the client;
Step 214, the client downloads the updated version and performs version update of the APP.
In this embodiment, the APP of the client (i.e. the first electronic device) needs to set a timer to send a version update request like the server (i.e. the server) at regular intervals, for example, once every 1 minute, in which the current version number of the APP needs to be carried. After receiving the version update request, the server compares the current version number carried in the version update request with the latest version number to judge whether the APP of the client needs to be updated. If no update is needed, returning information of no updated version; if the update is needed, the size of the update version of the APP to be downloaded is obtained, and then the update version is rounded up, for example, the size of the update version is 17.5M, 18M is taken, and 18 tokens are needed for the current download according to 1 M=1 token.
Further, it is determined how many of 5000 tokens issued at the current time (e.g., 2021, 3, 26, 19:46: 48) remain available, then it is determined whether the remaining tokens minus 18 are greater than zero, if they are less than zero, it indicates that the tokens are exceeded and cannot be downloaded, and the process ends. Otherwise, subtracting 18 from the remaining token number, and feeding back the download address of the updated version to the client. And after receiving the download address, the client initiates downloading of the update version, then installs the update version and completes the APP update.
By adopting the mode, the flow for downloading in a certain time period is controlled by adopting the peak clipping and valley filling thought, so that CDN cost to be paid is reduced.
Further, in one embodiment of the present application, determining the allowable usage flow rate for the preset time period includes: and under the condition that the number of the application programs comprises a plurality of application programs, determining the allowable use flow in a preset time period corresponding to the application programs according to the sequence of the receiving moments of the version update requests.
In this embodiment, in actual use, one first electronic device may download and update multiple applications at the same time, and multiple first electronic devices may update one application at the same time, which is more complicated, so that concurrency control is required. Specifically, queuing is performed according to the sequence of version update requests, so that traffic calculation errors are prevented from being allowed to be used. For example, the size of the application program corresponding to the version update request received first is 15M, and the size of the application program corresponding to the version update request received later is 18M, then when deducting, it is necessary to deduct 15 tokens first and then deduct 18 tokens, so as to obtain the allowed usage flow of the application program corresponding to the version update request received later.
By the method, the accuracy of calculation of the allowable use flow of the downloaded application program is improved, so that the accuracy of judgment on whether to download the application program is ensured, and the purposes of saving flow and reducing cost are achieved.
Further, in one embodiment of the present application, before receiving the version update request of the application program sent by the first electronic device, the method further includes: dividing a preset time period into a preset number of sub-time periods, and setting corresponding sub-flow for each sub-time period according to total usage flow in the preset time period; after determining the target traffic required to download the updated version, further comprising: determining a first sub-time period corresponding to the receiving time of the version update request, wherein the first sub-time period is one of a preset number of sub-time periods; under the condition that the first sub-time period is the first sub-time period of the preset time period, the sub-allowed use flow corresponding to the first sub-time period is used as the allowed use flow in the preset time period; under the condition that the first sub-time period is the N-th sub-time period of the preset time period, accumulating the sub-allowed use flow corresponding to the second sub-time period to the first sub-time period, and taking the sub-allowed use flow corresponding to the first sub-time period as the allowed use flow in the preset time period; wherein N is a positive integer greater than 1, the second sub-period is N-1 sub-periods before the first sub-period in the preset period, the sub-allowed used traffic of the first sub-period is unused traffic in the sub-traffic of the first sub-period, and the sub-allowed used traffic of the second sub-period is unused traffic in the sub-traffic of the second sub-period.
In this embodiment, another way of determining the allowable usage flow rate for a preset period of time is defined.
It should be noted that, in the above embodiment, it is defined how many tokens are generated every second, and there is no relation between the previous second and the next second, and this control manner is referred to as a fixed window token generation policy. If the current token generation rule is set to 1000 tokens in 1 second, as shown in fig. 3, 1000 tokens are used by the APP that the first electronic device requests to update in the last 100ms of the 1 st second and the first 100ms of the 2 nd second, then a CDN traffic corresponding to 2000 tokens needs to be downloaded in the 200ms period. Because of the network communication delay, this results in a double configuration rate problem at 2 seconds, i.e., using both the 1 st and 2 nd second traffic for 2 nd seconds. Or 100 tokens are used by the APP that the first electronic device requests the update in the last 100ms and the next to last 100ms of the 1 st second, then CDN traffic corresponding to 200 tokens needs to be downloaded in the 200ms period will occur. Because of the network communication delay, this can lead to a double configuration rate problem at the last 100ms of the 1 st second, i.e. the penultimate 100ms and last 100ms traffic are all used within the last 100 ms.
In the embodiment of the application, the CDN bandwidth is controlled by utilizing the sliding window token generation strategy, so that the improvement of the token dynamic generation service is realized, and the problems are solved.
Specifically, the preset time period is divided into a preset number of sub-time periods, and corresponding sub-flows are set for each sub-time period according to the total usage flow in the preset time period. For example, an original window (i.e. a preset time period) is divided into a plurality of equal parts of small windows (i.e. sub-time periods), each small window corresponds to a different time point and is provided with an independent counter, and a certain number of tokens are correspondingly arranged in each small window. When the receiving time point of the version update request is greater than the maximum time point of the current window, the window is shifted forward by one widget (the data of the first widget is discarded, the second widget becomes the first widget, and the current version update request is placed in the last widget). Notably, all requests of the entire window add up to no more than the total number of tokens generated per second of the configuration.
Further, a first sub-time period corresponding to the receiving time of the version update request is determined, and when the first sub-time period is the first sub-time period of the preset time period, the sub-allowed use flow of the first sub-time period is used as the allowed use flow in the preset time period. Note that, the sub-allowable usage flow rate of the first sub-period is an unused flow rate in the sub-flows of the first sub-period, and if the first sub-period is unused, all the sub-flows of the first sub-period are the sub-allowable usage flow rates of the first sub-period.
Under the condition that the first sub-time period is the N-th sub-time period of the preset time period, the sub-allowable use flow corresponding to the N-1 sub-time periods positioned before the first sub-time period in the preset time period is accumulated to the first sub-time period, and the sub-allowable use flow corresponding to the N-1 sub-time periods is the unused part of the sub-flow corresponding to each of the N-1 sub-time periods.
The sub-allowed use flow corresponding to the first sub-time period comprises the sub-allowed use flow of the first sub-time period, and the sub-allowed use flow corresponding to N-1 sub-time periods before the first sub-time period. And taking the sub-allowed use flow corresponding to the first sub-time period at the moment as the allowed use flow in the preset time period.
As shown in FIG. 4, a one second window is divided into 6 portlets, each taking 1/6 second, which are slid forward when the user request exceeds the first 1/6 second. Notably, the size of tokens within a window of 1 second after each slide in FIG. 4 needs to be controlled so that the total number of tokens generated per second cannot be exceeded.
The time span of the widget may be arbitrarily set, and may be between 1 ms and 1000 ms.
The example is given with the small window set to 1 millisecond in size. If the generation rule of the present token is set to 1000 tokens for 1 second, then the corresponding one widget is 1 token, and if the current user requests to download an 18M application, 18 tokens are needed. If the number of accumulated tokens in the current small window is only 1, enough tokens are not acquired, and the downloading fails.
If the next user requests at the time point of the 18 th small window, the small window slides forward for 17 times, the 18 th small window accumulates 18 tokens, the user is just satisfied with the requirement of the tokens, the downloading is allowed, the corresponding token number is subtracted, and then the accumulated tokens of the next small window start from 1. If the current portlet accumulates 18 tokens and the user requests to download a 15M application, the user is allowed to download and deduct 15 tokens and pass the excess tokens to the next portlet, the number of tokens accumulated by the next portlet is 4 (3+1, 3 is left by the last portlet and 1 is by itself). It should be noted that the number of tokens accumulated in the next window cannot exceed the total number of tokens for 1 second, that is, cannot exceed 1000 tokens, and if so, the method is directly cleared.
The embodiment of the application improves the generation of the allowed use flow through the idea of sliding window, accumulates the flow to the sub-time period corresponding to the receiving time of the version update request, can provide the flow for downloading the update version in a timing manner, and solves the problem of double configuration rate in a certain second possibly occurring.
Further, in one embodiment of the present application, the method for controlling downloading of an application program further includes: determining total usage flow in a preset time period according to the historical downloading times of the first electronic device in the preset time period; the preset time period corresponds to the preset time period, and the more the historical downloading times are, the larger the total usage flow is.
In this embodiment, the total usage flow in the preset time period may be a fixed value, for example, the total usage flow per second is calculated according to the total CDN amount required in one day divided by 24×3600, and this embodiment is not changed once the total usage flow in a certain time period is set. However, this embodiment cannot achieve fine control, and in practical applications, the number of downloads may vary between different time periods per day, for example, the peak download time of the user may be 19:00 to 24:00, other times are download low peak periods. For another example, in the case of holidays, the number of downloads by the user may be higher than usual. Therefore, the embodiment of the application provides a function of dynamically adjusting the total use flow in a certain time period according to the historical download times.
Specifically, a configuration service is required that can configure the total usage flow for a certain period of time according to a specific time interval.
It should be noted that, the configuration personnel can adjust the total usage flow in a certain period of time in a large period at any time according to the development condition of the service. The setting of the total usage flow per second is illustratively done according to a granularity of one hour, i.e. the same total usage flow is issued per second during this one hour. For example, a small download of 00:00 to 01:00 limits the issue of 500 tokens per second (i.e., total usage flow per second) for the one hour, while a large download of 20:00 to 21:00 increases the number of tokens, limiting the issue of 1500 tokens per second (i.e., total usage flow per second) for the one hour.
If finer granularity control is also desired, granularity up to the minute scale may be supported. The optimization can also be carried out according to actual conditions, such as control according to granularity of 3 hours or 4 hours, and the workload of configuration is optimized.
And generating the number of tokens per second in real time for the APP update service according to the rule of the configuration personnel in the configuration service configuration. As shown in fig. 5, the configurator configures the size of the number of tokens per period to configure the service. The token dynamic generation service obtains configuration data and generates the number of tokens per second. The client (i.e., the first electronic device) sends a version update request to the APP update service. The APP update service requests the token dynamic generation service for the token size of a preset time period, judges whether the number of tokens is allowed to be downloaded or not, and updates the number of consumed tokens. When downloading is allowed, the APP update service returns the downloading address of the APP to the client, and the client performs downloading installation.
The configuration service, the token dynamic generation service and the APP update service are service ends (i.e. servers).
By the mode, the bandwidth use of the CDN can be controlled in a finer granularity through the newly added configuration service and token dynamic generation service, and the total use flow can be adjusted according to different time periods, so that the purpose of flexibly controlling the total use flow in a certain time period is achieved.
The embodiment of the present application further provides a server, as shown in fig. 6, where the server 600 includes:
A receiving module 602, configured to receive a version update request of an application program sent by a first electronic device;
an obtaining module 604, configured to determine, in response to the version update request, a target flow required for downloading the updated version if the updated version exists in the application program;
And the pushing module 606 is configured to push the updated version to the first electronic device if the target traffic is less than or equal to the allowed usage traffic within a preset period of time.
In this embodiment, the server determines that the first electronic device needs to perform version update of the application program when receiving a version update request of the application program sent by the first electronic device. In this case, whether the application program has an updated version is determined, and if the updated version exists, it is required to determine whether the target traffic of the first electronic device for downloading the updated version exceeds the allowable usage traffic within the preset time period. If the target flow exceeds the allowable use flow in the preset time period, feeding back information of no updated version to the first electronic equipment; and if the target traffic does not exceed the allowable usage traffic within the preset time period, pushing the updated version to the first electronic equipment so that the first electronic equipment downloads the updated version, and thus version updating is carried out on the application program.
By adopting the mode, the idea of peak clipping and valley filling is adopted, and only the updated version which does not exceed the flow control set value (namely the allowed flow) is allowed to be downloaded in the preset time period, so that the CDN flow in unit time is controlled, the situation that the CDN flow waveform is spiked is avoided, the original CDN flow waveform which is suddenly high or low is stabilized, after the peak value of the day is reduced, the cost of the CDN is reduced according to the charging rule, the corresponding saved bandwidth flow can be used for other users, and the purpose of saving flow and reducing cost is fully achieved.
Further, in one embodiment of the present application, the server 600 further includes: the first determining module is used for determining the allowable use flow in the preset time period according to the total use flow and the used flow in the preset time period.
Further, in an embodiment of the present application, the first determining module is specifically configured to determine, when the number of application programs includes a plurality of application programs, that the usage flow is allowed in a preset time period corresponding to the application program according to a sequence of receiving moments of the version update requests.
Further, in one embodiment of the present application, the server 600 further includes: the dividing module is used for dividing the preset time period into a preset number of sub-time periods and setting corresponding sub-flow for each sub-time period according to the total usage flow in the preset time period; a second determining module, configured to: determining a first sub-time period corresponding to the receiving time of the version update request, wherein the first sub-time period is one of a preset number of sub-time periods; under the condition that the first sub-time period is the first sub-time period of the preset time period, the sub-allowed use flow corresponding to the first sub-time period is used as the allowed use flow in the preset time period; under the condition that the first sub-time period is the N-th sub-time period of the preset time period, accumulating the sub-allowed use flow corresponding to the second sub-time period to the first sub-time period, and taking the sub-allowed use flow corresponding to the first sub-time period as the allowed use flow in the preset time period; wherein N is a positive integer greater than 1, the second sub-period is N-1 sub-periods before the first sub-period in the preset period, the sub-allowed used traffic of the first sub-period is unused traffic in the sub-traffic of the first sub-period, and the sub-allowed used traffic of the second sub-period is unused traffic in the sub-traffic of the second sub-period.
Further, in one embodiment of the present application, the server 600 further includes: the third determining module is used for determining total use flow in a preset time period according to the historical downloading times of the first electronic device in the preset time period; the preset time period corresponds to the preset time period, and the more the historical downloading times are, the larger the total usage flow is.
The first electronic device in the embodiment of the application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The first electronic device may be a mobile electronic device or a non-mobile electronic device. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a wearable device, an Ultra-mobile Personal computer (Ultra-Mobile Personal Computer, UMPC), a netbook or Personal digital assistant (Personal DIGITAL ASSISTANT, PDA), etc., and the non-mobile electronic device may be a network attached storage (Network Attached Storage, NAS), a Personal computer (Personal Computer, PC), a Television (Television, TV), a teller machine, a self-service machine, etc., and the embodiments of the present application are not limited in particular.
The first electronic device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an ios operating system, or other possible operating systems, and the embodiment of the present application is not limited specifically.
The server 600 provided in the embodiment of the present application can implement each process implemented in the method embodiments of fig. 1 to 5, and in order to avoid repetition, a description is omitted here.
Optionally, as shown in fig. 7, an embodiment of the present application further provides an electronic device 700, where the electronic device 700 is a server in the foregoing embodiment, and the electronic device 700 includes a processor 702, a memory 704, and a program or an instruction stored in the memory 704 and capable of running on the processor 702, where the program or the instruction is executed by the processor 702 to implement each process of the foregoing embodiment of the download control method of an application program, and the process can achieve the same technical effects, so that repetition is avoided and no further description is given here.
It should be noted that, the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 8 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 800 includes, but is not limited to: radio frequency unit 802, network module 804, audio output unit 806, input unit 808, sensor 810, display unit 812, user input unit 814, interface unit 816, memory 818, and processor 820.
Those skilled in the art will appreciate that the electronic device 800 may also include a power source (e.g., a battery) for powering the various components, which may be logically connected to the processor 820 via a power management system so as to perform functions such as managing charge, discharge, and power consumption via the power management system. The electronic device structure shown in fig. 8 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than shown, or may combine certain components, or may be arranged in different components, which are not described in detail herein.
In the embodiment of the present application, the electronic device 800 is a server in the above embodiment, where the radio frequency unit 802 is configured to receive a version update request of an application program sent by a first electronic device; a processor 820 for determining a target traffic required for downloading an updated version in case the updated version exists in the application in response to the version update request; the radio frequency unit 802 is further configured to push the updated version to the first electronic device if the target traffic is less than or equal to the allowed usage traffic within a preset period of time.
In this embodiment, the second electronic device determines that the first electronic device needs to perform version update of the application program when receiving the version update request of the application program sent by the first electronic device. In this case, whether the application program has an updated version is determined, and if the updated version exists, it is required to determine whether the target traffic of the first electronic device for downloading the updated version exceeds the allowable usage traffic within the preset time period. If the target flow exceeds the allowable use flow in the preset time period, feeding back information of no updated version to the first electronic equipment; and if the target traffic does not exceed the allowable usage traffic within the preset time period, pushing the updated version to the first electronic equipment so that the first electronic equipment downloads the updated version, and thus version updating is carried out on the application program.
By adopting the mode, the idea of peak clipping and valley filling is adopted, and only the updated version which does not exceed the flow control set value (namely the allowed flow) is allowed to be downloaded in the preset time period, so that the CDN flow in unit time is controlled, the situation that the CDN flow waveform is spiked is avoided, the original CDN flow waveform which is suddenly high or low is stabilized, after the peak value of the day is reduced, the cost of the CDN is reduced according to the charging rule, the corresponding saved bandwidth flow can be used for other users, and the purpose of saving flow and reducing cost is fully achieved.
Further, the processor 820 is further configured to determine the allowable usage flow rate in the preset time period according to the total usage flow rate and the used flow rate in the preset time period.
Further, in an embodiment of the present application, the processor 820 is specifically configured to determine, when the number of application programs includes a plurality of application programs, that the usage flow is allowed in a preset period corresponding to the application program according to the sequence of the receiving moments of the version update requests.
Further, in one embodiment of the application, processor 820 is further configured to: dividing a preset time period into a preset number of sub-time periods, and setting corresponding sub-flow for each sub-time period according to total usage flow in the preset time period; determining a first sub-time period corresponding to the receiving time of the version update request, wherein the first sub-time period is one of a preset number of sub-time periods; under the condition that the first sub-time period is the first sub-time period of the preset time period, the sub-allowed use flow corresponding to the first sub-time period is used as the allowed use flow in the preset time period; under the condition that the first sub-time period is the N-th sub-time period of the preset time period, accumulating the sub-allowed use flow corresponding to the second sub-time period to the first sub-time period, and taking the sub-allowed use flow corresponding to the first sub-time period as the allowed use flow in the preset time period; wherein N is a positive integer greater than 1, the second sub-period is N-1 sub-periods before the first sub-period in the preset period, the sub-allowed used traffic of the first sub-period is unused traffic in the sub-traffic of the first sub-period, and the sub-allowed used traffic of the second sub-period is unused traffic in the sub-traffic of the second sub-period.
Further, in one embodiment of the present application, the processor 820 is further configured to determine the total usage flow in the preset time period according to the historical download times of the first electronic device in the preset time period; the preset time period corresponds to the preset time period, and the more the historical downloading times are, the larger the total usage flow is.
It should be understood that, in the embodiment of the present application, the radio frequency unit 802 may be configured to receive and transmit information or signals during a call, and specifically, receive downlink data of a base station or send uplink data to the base station. The radio frequency unit 802 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like.
The network module 804 provides wireless broadband internet access to the user, such as helping the user send and receive e-mail, browse web pages, and access streaming media, etc.
The audio output unit 806 may convert audio data received by the radio frequency unit 802 or the network module 804 or stored in the memory 818 into an audio signal and output as sound. Also, the audio output unit 806 may also provide audio output (e.g., call signal reception sound, message reception sound, etc.) related to a particular function performed by the electronic device 800. The audio output unit 806 includes a speaker, a buzzer, a receiver, and the like.
The input unit 808 is for receiving an audio or video signal. The input unit 808 may include a graphics processor (Graphics Processing Unit, GPU) 8082 and a microphone 8084, the graphics processor 8082 processing image data of still pictures or video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 812, or stored in the memory 818 (or other storage medium), or transmitted via the radio frequency unit 802 or the network module 804. The microphone 8084 may receive sound and may be capable of processing the sound into audio data, which may be converted into a format output that may be transmitted to a mobile communication base station via the radio frequency unit 802 in case of a phone call mode.
The electronic device 800 also includes at least one sensor 810, such as a fingerprint sensor, pressure sensor, iris sensor, molecular sensor, gyroscope, barometer, hygrometer, thermometer, infrared sensor, light sensor, motion sensor, and other sensors.
The display unit 812 is used to display information input by a user or information provided to the user. The display unit 812 may include a display panel 8122, and the display panel 8122 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
The user input unit 814 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 814 includes a touch panel 8142 and other input devices 8144. The touch panel 8142, also referred to as a touch screen, may collect touch operations on or near the user. The touch panel 8142 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends the touch point coordinates to the processor 820, and receives and executes commands sent from the processor 820. Other input devices 8144 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and so forth, which are not described in detail herein.
Further, the touch panel 8142 may be overlaid on the display panel 8122, and when the touch panel 8142 detects a touch operation thereon or thereabout, the touch operation is transferred to the processor 820 to determine a type of touch event, and then the processor 820 provides a corresponding visual output on the display panel 8122 according to the type of touch event. The touch panel 8142 and the display panel 8122 may be two independent components or may be integrated into one component.
The interface unit 816 is an interface to which an external device is connected to the electronic apparatus 800. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 816 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic apparatus 800 or may be used to transmit data between the electronic apparatus 800 and an external device.
Memory 818 may be used to store software programs as well as various data. The memory 818 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, phonebooks, etc.) created according to the use of the mobile terminal, etc. In addition, memory 818 may include high-speed random access memory, and may include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
Processor 820 performs various functions of electronic device 800 and processes data by executing or executing software programs and/or modules stored in memory 818 and invoking data stored in memory 818 to thereby monitor electronic device 800 as a whole. Processor 820 may include one or more processing units; preferably, processor 820 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications.
The embodiment of the application also provides a readable storage medium, and the readable storage medium stores a program or an instruction, which when executed by a processor, implements each process of the application program downloading control embodiment, and can achieve the same technical effects, and is not repeated here.
The processor is a processor in the electronic device in the above embodiment. Readable storage media include computer readable storage media such as Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic or optical disks, and the like.
The embodiment of the application further provides a chip, the chip comprises a processor and a communication interface, the communication interface is coupled with the processor, the processor is used for running programs or instructions, the processes of the application program downloading control embodiment can be realized, the same technical effects can be achieved, and the repetition is avoided, and the description is omitted here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a computer software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are to be protected by the present application.