Disclosure of Invention
The technical problem to be solved by the present invention is to provide a data updating method, an intelligent terminal and a storage medium for solving the above-mentioned defects in the prior art, and aims to solve the problem that the power consumption of the intelligent terminal is large due to the fact that the data updating is performed by the existing intelligent terminal under the condition that a user does not use the intelligent terminal.
The technical scheme adopted by the invention for solving the problems is as follows:
in a first aspect, an embodiment of the present invention provides a data updating method, where the method includes:
receiving a push message sent by a server, and analyzing a target download address corresponding to data to be updated from the push message;
determining the network bandwidth allocated to the data to be updated according to the network use information of the currently played program; wherein, the network use information is used network bandwidth or program buffer capacity;
and downloading the data to be updated from the target download address by using the network bandwidth so as to realize data updating.
The data updating method, wherein the network usage information is used network bandwidth, and the step of determining the network bandwidth allocated to the data to be updated according to the network usage information of the currently played program includes:
acquiring the used network bandwidth and the current total network bandwidth of the current playing program;
and determining the network bandwidth distributed to the data to be updated according to the used network bandwidth and the total network bandwidth.
The data updating method, wherein when the network usage information is a program buffer amount, the step of determining the network bandwidth allocated to the data to be updated according to the network usage information of the currently played program includes:
acquiring the program buffer volume of a currently played program;
and determining the network bandwidth distributed to the data to be updated according to the program buffer amount.
The data updating method, wherein the step of determining the network bandwidth allocated to the data to be updated according to the program buffer amount comprises:
when the program buffer amount is smaller than or equal to a preset first buffer amount threshold value, determining that the network bandwidth allocated to the data to be updated is a first network bandwidth; wherein the first network bandwidth is less than or equal to a preset first bandwidth threshold;
when the program buffer amount is larger than the first buffer amount threshold and smaller than a preset second buffer amount threshold, determining that the network bandwidth allocated to the data to be updated is a second network bandwidth; wherein the second network bandwidth is greater than the first bandwidth threshold and less than a preset second bandwidth threshold;
when the program buffer amount is larger than the second buffer amount threshold value, determining that the network bandwidth allocated to the data to be updated is a third network bandwidth; wherein the third network bandwidth is greater than or equal to the second bandwidth threshold;
wherein the first buffer amount threshold, the second buffer amount threshold, the first bandwidth threshold, and the second bandwidth threshold are non-negative numbers, the first buffer amount threshold < the second buffer amount threshold, and the first bandwidth threshold < the second bandwidth threshold.
The data updating method, wherein the step of downloading the data to be updated from the target download address by using the network bandwidth comprises:
sending a downloading request containing the downloading address to the server by using the network bandwidth;
and receiving and storing the data to be updated returned by the server.
The data updating method, wherein the step of downloading the data to be updated from the target download address by using the network bandwidth further comprises:
acquiring historical information of a television program watched by a user, and determining the program preference type of the user according to the historical information;
and preferentially downloading the data to be updated belonging to the program preference type from the downloading address by using the network bandwidth.
The data updating method, wherein the method further comprises:
detecting the user state of a currently played program; wherein the user states include a no user viewing state and a user viewing state;
and when the user state is a user watching unavailable state and the duration time of the user watching unavailable state exceeds a preset time threshold, stopping downloading the data to be updated and automatically entering a low power consumption mode.
The data updating method, wherein the method further comprises:
analyzing a continuous downloading address of continuous downloading data from the push message; the continuous downloading task is data to be updated which is not downloaded;
and according to the network use information of the currently played program, allocating network bandwidth for the continuous downloading data so as to realize continuous downloading of the continuous downloading data.
In a second aspect, an embodiment of the present invention provides a data updating apparatus, including:
the address acquisition module is used for receiving a push message sent by the server and analyzing a target download address corresponding to the data to be updated from the push message;
the network allocation module is used for determining the network bandwidth allocated to the data to be updated according to the network use information of the currently played program;
and the data updating module is used for downloading the data to be updated from the target downloading address by using the network bandwidth so as to realize data updating.
In a third aspect, an embodiment of the present invention provides an intelligent terminal, including: a processor, a storage medium communicatively coupled to the processor, the storage medium adapted to store a plurality of instructions; the processor is adapted to call instructions in the storage medium to perform the steps of implementing the data update method described above.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a plurality of instructions are stored, the instructions being adapted to be loaded and executed by a processor to perform the steps of implementing the data updating method described above.
The invention has the beneficial effects that: in the embodiment of the invention, firstly, a push message sent by a server is received, a target download address corresponding to data to be updated is analyzed from the push message, then, a network bandwidth distributed to the data to be updated is determined according to the network use information of a currently played program, and finally, the data to be updated is downloaded from the target download address by using the network bandwidth so as to realize data updating.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It should be noted that, if directional indications (such as up, down, left, right, front, and back … …) are involved in the embodiment of the present invention, the directional indications are only used to explain the relative positional relationship between the components, the movement situation, and the like in a specific posture (as shown in the drawing), and if the specific posture is changed, the directional indications are changed accordingly.
In order to avoid the current television program that is playing to appear blocking among the prior art, intelligent terminal carries out data updating under the condition that the user does not use usually, makes intelligent terminal still need the power supply operation under the condition that the user does not use under this condition (if supply power to the wiFi module in the intelligent terminal, in order to wait to update data download), thereby causes intelligent terminal consumption great.
In order to solve the problems in the prior art, the embodiment provides a data updating method, by which data updating can be performed while a currently playing television program is smoothly played, so that data updating of an intelligent terminal in an unused state is avoided, and energy consumption of the intelligent terminal is reduced. In specific implementation, firstly, a push message sent by a server is received, a target download address corresponding to data to be updated is analyzed from the push message, then, according to the network use information of a currently played program, a network bandwidth distributed to the data to be updated is determined, and finally, the data to be updated is downloaded from the target download address by using the network bandwidth so as to realize data updating.
For example, when a user is watching a movie in a buddha by using an intelligent television, after receiving a push message sent by a server and requiring updating of a television program, the intelligent television firstly analyzes a target download address of data to be updated from the push message, then obtains a used network bandwidth or a program buffer amount of a currently played program (buddha), then allocates a network bandwidth for the data to be updated according to the used network bandwidth or the program buffer amount of the currently played program (buddha), and finally downloads the data to be updated from the target download address by using the network bandwidth, so as to update the television program. Because the network bandwidth is allocated to the data to be updated according to the used network bandwidth or program buffer amount of the currently played program (jingcha), that is, the network bandwidth which is not needed by the currently played program is allocated to the data to be updated for data updating, the fluency of the currently played program (jingcha) is ensured, the simultaneous playing of the program and the data updating is realized, the data updating of the intelligent terminal in the unused state is avoided, and the energy consumption of the intelligent terminal is reduced.
Exemplary method
The embodiment provides a data updating method which can be applied to an intelligent television. As shown in fig. 1 in particular, the method comprises:
step S100, receiving a push message sent by a server, and analyzing a target download address corresponding to the data to be updated from the push message.
In this embodiment, taking an intelligent television as an example, after being awakened by a user, an intelligent terminal is connected to a configured router, and logs in a server through a cloud platform, the server acquires the device attribute of the current intelligent television, the WiFi module and other related information, and when detecting that the acquired device attribute, the WiFi module and other related information are different from the device attribute, the WiFi module and other related information stored in the server, a push message is sent to the intelligent television, where the push message includes a target download address of data to be updated. After receiving the push message sent by the server, the smart television analyzes the target download address corresponding to the data to be updated from the push message, so that the data to be updated is downloaded from the target download address in the subsequent steps, and the data updating is realized.
In the method for waking up the intelligent terminal in this embodiment, after a power-on instruction of a user is received, a remote control command and parameters (such as a pairing command and pairing equipment) are initialized, and after the initialization is finished, a WiFi module in the intelligent terminal is powered on. In order to reduce the power consumption of the intelligent terminal, when the intelligent terminal is awakened and does not detect the operation instruction of the user within the preset time, the power supply is automatically turned off and the intelligent terminal enters a low power consumption mode.
Step S200, determining the network bandwidth distributed to the data to be updated according to the network use information of the current playing program; wherein the network usage information is used network bandwidth or program buffer amount.
Specifically, the currently played program is an online television program (such as a drama, a movie, a synthesis art, and the like) that a user is watching using an intelligent terminal, when the user is watching the online television program using the intelligent television, the user needs to use a network bandwidth to acquire program data, and to avoid the television program watched by the user from being jammed, the currently played television program usually has a certain program buffer amount (for example, the current user is watching data of 18 minutes and 20 seconds in buddha, and buddha has buffered data for 30 minutes), and in this embodiment, the network usage information of the currently played program is the used network bandwidth of the currently played program or the program buffer amount of the currently played program.
In this embodiment, the network bandwidth is allocated to the data to be updated according to the used bandwidth of the television program currently being played by the intelligent terminal or the program buffer amount of the television program currently being played, so as to ensure the fluency of the television program currently being played when data is updated.
In a specific embodiment, when the network usage information is used network bandwidth, step S200 specifically includes:
step M210, obtaining the used network bandwidth and the current total network bandwidth of the current playing program;
step M220, determining the network bandwidth allocated to the data to be updated according to the used network bandwidth and the total network bandwidth.
In order to guarantee the fluency of the currently played television program, in this embodiment, the used network bandwidth of the television program currently being played by the intelligent terminal and the total network bandwidth currently accessed by the intelligent terminal are obtained in real time, and the unused network bandwidth of the television program currently being played by the intelligent terminal in the total network bandwidth is allocated to the data to be updated for data updating, so that the fluency of the currently played television program is guaranteed when the data updating is performed. For example, if the total network bandwidth currently accessed by the intelligent terminal is 100M, and the used network bandwidth of the television program currently being played by the intelligent terminal is 20M, the network bandwidth allocated to the data to be updated is 50M.
In a specific embodiment, when the network usage information is a program buffer amount, step S200 specifically includes:
step R210, obtaining the program buffer volume of the current playing program;
and step R220, determining the network bandwidth distributed to the data to be updated according to the program buffer amount.
In order to guarantee the fluency of the currently played television program, in this embodiment, the program buffer amount of the currently played television program of the intelligent terminal is obtained in real time, the network bandwidth allocated to the data to be updated is determined according to the program buffer amount of the currently played television program of the intelligent terminal, that is, when the program buffer amount of the currently played television program of the intelligent terminal is large, more network bandwidth is allocated to the data to be updated for data updating, and when the program buffer amount of the currently played television program of the intelligent terminal is small, less network bandwidth is allocated to the data to be updated for data updating, so that the fluency of the currently played television program is guaranteed when data updating is performed.
In one embodiment, step R220 specifically includes:
step R221, when the program buffer amount is smaller than or equal to a preset first buffer amount threshold value, determining that the network bandwidth allocated to the data to be updated is a first network bandwidth; wherein the first network bandwidth is less than or equal to a preset first bandwidth threshold;
step R222, when the program buffer amount is greater than the first buffer amount threshold and smaller than a preset second buffer amount threshold, determining the network bandwidth allocated to the data to be updated as a second network bandwidth; wherein the second network bandwidth is greater than the first bandwidth threshold and less than a preset second bandwidth threshold;
step R223, when the program buffer amount is larger than the second buffer amount threshold, determining that the network bandwidth allocated to the data to be updated is a third network bandwidth; wherein the third network bandwidth is greater than or equal to the second bandwidth threshold.
Specifically, in this embodiment, a first buffer amount threshold and a second buffer amount threshold for measuring a program buffer amount, and a first bandwidth threshold and a second bandwidth threshold for measuring a network bandwidth are preset, where the first buffer amount threshold, the second buffer amount threshold, the first bandwidth threshold, and the second bandwidth threshold are non-negative numbers, the first buffer amount threshold < the second buffer amount threshold, and the first bandwidth threshold < the second bandwidth threshold.
After acquiring a program buffer amount of a television program currently played by the intelligent terminal, comparing the program buffer amount with a first buffer amount threshold and a second buffer amount threshold, and when the program buffer amount is smaller than or equal to a preset first buffer amount threshold, determining a network bandwidth allocated to data to be updated as a first network bandwidth, wherein the first network bandwidth is smaller than or equal to the first bandwidth threshold; when the program buffer amount is larger than a first buffer amount threshold and smaller than a second buffer amount threshold, determining that the network bandwidth allocated to the data to be updated is a second network bandwidth, wherein the second network bandwidth is larger than the first bandwidth threshold and smaller than the second bandwidth threshold; and when the program buffer amount is larger than a second buffer amount threshold value, determining that the network bandwidth allocated to the data to be updated is a third network bandwidth, wherein the third network bandwidth is larger than or equal to the second bandwidth threshold value.
For example, the first buffer amount threshold is 15%, the second buffer amount threshold is 30%, the first bandwidth threshold is 10M, the second bandwidth threshold is 30M, when the program buffer amount is 12%, it indicates that the program buffer amount of the television program currently being played by the intelligent terminal is small and is easy to cause pause, it is determined that the network bandwidth allocated to the data to be updated is less than or equal to 10M, that is, less network bandwidth is allocated to the data to be updated, or even network bandwidth is not allocated to the data to be updated; when the program buffer amount is 20%, the fact that the program buffer amount of the television program currently played by the intelligent terminal is large and is less prone to jamming is indicated, and it is confirmed that the network bandwidth allocated to the data to be updated is between 10M and 30M; when the program buffer amount is 40%, the fact that the program buffer amount of the television program currently played by the intelligent terminal is large and jamming is not easy to occur basically indicates that the network bandwidth allocated to the data to be updated is larger than or equal to 30M.
And step S300, downloading the data to be updated from the target download address by using the network bandwidth so as to update the data.
Specifically, after the network bandwidth allocated to the data to be updated is determined, the data to be updated can be downloaded from the target download address by using the network bandwidth, and the original data in the intelligent terminal is replaced by the data to be updated, so that the data updating and upgrading of the intelligent terminal can be realized.
In a specific embodiment, the step of downloading the data to be updated from the target download address by using the network bandwidth in step S300 includes:
step S310, sending a downloading request containing the downloading address to the server by using the network bandwidth;
and step S320, receiving and storing the data to be updated returned by the server.
In this embodiment, when downloading the data to be updated by using the network bandwidth, the intelligent terminal sends a download request including the download address to the server by using the network bandwidth, the server sends the data to be updated to the intelligent terminal after receiving the download request, and the intelligent terminal receives and stores the data to be updated returned by the server, that is, the download of the data to be updated is completed.
In a specific embodiment, the step of downloading the data to be updated from the target download address by using the network bandwidth in step S300 further includes:
step S330, acquiring historical information of programs watched by a user, and determining the favorite type of the program of the user according to the historical information;
step S340, preferentially downloading the data to be updated belonging to the program preference type from the download address by using the network bandwidth.
In order to avoid that a user cannot watch a favorite television program in the data updating process, a historical record of watching the program by the user through an intelligent terminal is stored in a server, in the process of watching the program by the user through the intelligent terminal, the intelligent terminal carries out face recognition detection on the user watching the program at present through a camera to obtain user identity information, obtains historical information of the program watched by the user from the server according to the user identity information, analyzes the historical information, determines the program favorite type of the user watching the program at present, and preferentially downloads the data to be updated belonging to the program favorite type from the downloading address by utilizing the network bandwidth, so that the user can watch the favorite program in advance under the condition that the data is not completely updated.
In a specific embodiment, the method further comprises:
step S410, detecting the user state of the current playing program; wherein the user states include a no user viewing state and a user viewing state;
step S420, when the user state is a no-user viewing state and the duration of the no-user viewing state exceeds a preset time threshold, stopping downloading of the data to be updated and automatically entering a low power consumption mode.
In order to reduce the power consumption of the intelligent terminal, in this embodiment, a user state of a currently played program is also detected in real time through a camera on the intelligent terminal, where the user state includes a no-user watching state and a user watching state, the no-user watching state is a state where the currently played program is not watched by a user, and the user watching state is a state where the currently played program is watched by a user. When the user state is detected to be the user watching-free state, the duration time of the user watching-free state is further obtained, when the duration time of the user watching-free state exceeds a preset time threshold value, downloading of data to be updated is stopped, the power supply is automatically turned off, and after the power supply is turned off, the WiFi module in the intelligent terminal is powered off after the preset time is delayed for 5s, so that the low-power-consumption state is entered.
In a specific embodiment, the method further comprises:
step S510, analyzing a continuous downloading address of continuous downloading data from the push message; the continuous downloading task is data to be updated which is not downloaded;
step S520, according to the network usage information of the currently played program, allocating a network bandwidth to the continuous download data, so as to implement continuous download of the continuous download data.
Considering that the data to be updated is temporarily downloaded when the user state is the user-free watching state and the duration time of the user-free watching state exceeds the preset time threshold, in this embodiment, when the user wakes up the intelligent terminal again, the intelligent terminal analyzes a continuous download address of continuous download data from a push message sent by the server, the continuous download data is the data to be updated which is not downloaded completely, and network bandwidth is allocated to the continuous download data according to the network usage information of the currently played program, so as to realize continuous download of the continuous download data.
Therefore, in the embodiment of the invention, firstly, the push message sent by the server is received, the target download address corresponding to the data to be updated is analyzed from the push message, then, the network bandwidth allocated to the data to be updated is determined according to the network use information of the currently played program, and finally, the data to be updated is downloaded from the target download address by using the network bandwidth so as to realize data update.
Exemplary device
As shown in fig. 2, an embodiment of the present invention provides a data updating apparatus, including: an address acquisition module 210, a network allocation module 220, and a data update module 230. Specifically, the address obtaining module 210 is configured to receive a push message sent by a server, and parse a target download address corresponding to data to be updated from the push message. The network allocation module 220 is configured to determine, according to the network usage information of the currently played program, a network bandwidth allocated to the data to be updated; wherein the network usage information is used network bandwidth or program buffer amount. The data updating module 230 is configured to download the data to be updated from the target download address by using the network bandwidth, so as to implement data updating.
Based on the above embodiment, the present invention further provides an intelligent terminal, and a schematic block diagram thereof may be as shown in fig. 3. The intelligent terminal comprises a processor, a memory, a network interface, a display screen and a temperature sensor which are connected through a system bus. Wherein, the processor of the intelligent terminal is used for providing calculation and control capability. The memory of the intelligent terminal comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the intelligent terminal is used for being connected and communicated with an external terminal through a network. The computer program is executed by a processor to implement a data update method. The display screen of the intelligent terminal can be a liquid crystal display screen or an electronic ink display screen, and the temperature sensor of the intelligent terminal is arranged inside the intelligent terminal in advance and used for detecting the operating temperature of internal equipment.
It will be understood by those skilled in the art that the block diagram shown in fig. 3 is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation to the intelligent terminal to which the solution of the present invention is applied, and a specific intelligent terminal may include more or less components than those shown in the figure, or combine some components, or have a different arrangement of components.
In one embodiment, a smart terminal is provided, comprising a processor, a storage medium communicatively coupled to the processor, the storage medium adapted to store a plurality of instructions; the processor is adapted to invoke instructions in the storage medium to implement the steps of:
receiving a push message sent by a server, and analyzing a target download address corresponding to data to be updated from the push message;
determining the network bandwidth allocated to the data to be updated according to the network use information of the currently played program; wherein, the network use information is used network bandwidth or program buffer capacity;
and downloading the data to be updated from the target download address by using the network bandwidth so as to realize data updating.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
In summary, the present invention discloses a data updating method, an intelligent terminal and a storage medium, wherein the method comprises: receiving a push message sent by a server, and analyzing a target download address corresponding to data to be updated from the push message; determining the network bandwidth allocated to the data to be updated according to the network use information of the currently played program; wherein, the network use information is used network bandwidth or program buffer capacity; and downloading the data to be updated from the target download address by using the network bandwidth so as to realize data updating. According to the method and the device, the network bandwidth is allocated to the data to be updated according to the network use information of the current program played by the intelligent terminal, so that the data is updated while the program is smoothly played, the data is prevented from being updated when the intelligent terminal is not used, and the energy consumption of the intelligent terminal is reduced.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.