Display device, player upgrade method, and storage medium
By automatically detecting and upgrading the player version through the display device's controller, the problem of manual upgrades by users is solved, achieving seamless player upgrades and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HISENSE VISUAL TECH CO LTD
- Filing Date
- 2022-08-12
- Publication Date
- 2026-07-03
Smart Images

Figure CN115344283B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of media players, and more particularly to a display device, a media player upgrade method, and a storage medium. Background Technology
[0002] With the rapid development of science and technology and the multimedia audio-visual industry, more and more human-computer interaction and entertainment functions are appearing in display devices, leading to increasingly higher resource consumption. Simultaneously, with the continuous updates to media encoding and decoding technologies, software needs to add corresponding functions to adapt to the new technologies and ensure the best viewing experience for users. In an era that prioritizes user experience, frequent application upgrades are inevitable.
[0003] In display device systems, the stability and functionality of the system media player are particularly important. Currently, upgrading the system media player typically involves the user triggering an upgrade request when the display device receives a pop-up notification of a new version, followed by an Over-the-Air (OTA) upgrade. However, this method requires manual user intervention, failing to achieve a seamless upgrade experience and negatively impacting the user's viewing experience. Summary of the Invention
[0004] To solve the above-mentioned technical problems, or at least partially solve them, this disclosure provides a display device, a player upgrade method, and a storage medium that can accurately upgrade the library files required by the player without requiring manual operation by the user or a full package upgrade, thereby reducing the operational complexity of OTA upgrades and improving the user's viewing experience.
[0005] In a first aspect, this disclosure provides a display device, the display device comprising:
[0006] The controller is configured to: determine when the player version is updated, download the upgrade package corresponding to the updated version of the player, and install the upgrade package;
[0007] If the version number of the first library file of the player in the data directory is lower than the version number of the second library file of the player carried in the upgrade package, and the second library file is complete, then the second library file is stored in the data directory.
[0008] Compare the version numbers of the third-party library files corresponding to the players in the system directory and the data directory, and load the third-party library file with the largest version number.
[0009] Secondly, this disclosure provides a method for upgrading a media player, including:
[0010] Once it is determined that the player version has been updated, download the upgrade package corresponding to the updated version of the player and install the upgrade package;
[0011] If the version number of the first library file of the player in the data directory is lower than the version number of the second library file of the player carried in the upgrade package, and the second library file is complete, then the second library file is stored in the data directory.
[0012] Compare the version numbers of the third-party library files corresponding to the players in the system directory and the data directory, and load the third-party library file with the largest version number.
[0013] Thirdly, this disclosure provides a computer-readable storage medium, including: storing a computer program on the computer-readable storage medium, wherein when the computer program is executed by a processor, it implements the player upgrade method as shown in the second aspect.
[0014] Fourthly, this disclosure provides a computer program product, including: when the computer program product is run on a computer, causing the computer to implement the player upgrade method as shown in the second aspect.
[0015] Compared with the prior art, the technical solution provided in this disclosure has the following advantages: The controller of the display device first determines that the player version has been updated, downloads the upgrade package corresponding to the updated version of the player, and installs the upgrade package. Then, if the version number of the first library file of the player in the data directory is lower than the version number of the second library file of the player carried in the upgrade package, and the second library file is complete, the second library file is stored in the data directory. Finally, the version numbers of the third library files corresponding to the player in the system directory and the data directory are compared, and the third library file with the largest version number is loaded. Through the above process, the library files required by the player can be accurately upgraded without the need for manual operation by the user and full package upgrade, reducing the operational complexity brought by OTA upgrade, achieving upgrades that are imperceptible to the user, and improving the user's viewing experience. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0017] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram illustrating an operational scenario between a display device and a control device according to one or more embodiments of the present disclosure;
[0019] Figure 2This is a hardware configuration block diagram of a control device 100 according to one or more embodiments of the present disclosure;
[0020] Figure 3A This is a hardware configuration block diagram of a display device 200 according to one or more embodiments of the present disclosure;
[0021] Figure 3B This is a schematic diagram of the software configuration in a display device 200 according to one or more embodiments of the present disclosure;
[0022] Figure 3C This is a schematic diagram showing the icon control interface of an application in a display device 200 according to one or more embodiments of the present disclosure;
[0023] Figure 4A This is a system framework diagram for upgrading a player according to one or more embodiments of this disclosure;
[0024] Figure 4B This is an architecture diagram for upgrading a player according to one or more embodiments of this disclosure;
[0025] Figure 5A A schematic flowchart illustrating a player upgrade method provided in an embodiment of this disclosure;
[0026] Figure 5B A schematic diagram illustrating the principle of a player upgrade method provided in this embodiment of the disclosure;
[0027] Figure 6A This is a schematic diagram of a player upgrade process provided in an embodiment of the present disclosure;
[0028] Figure 6B This is a schematic diagram of the structure of an upgrade service module during a player upgrade process, provided in an embodiment of this disclosure.
[0029] Figure 6C A schematic diagram illustrating the processing flow of the upgrade service module during a player upgrade process, provided in an embodiment of this disclosure;
[0030] Figure 6D This is a schematic diagram of the structure of a player upgrade module during a player upgrade process, provided by an embodiment of this disclosure;
[0031] Figure 6E This is a schematic diagram illustrating the processing flow of the player upgrade module during a player upgrade process, provided as an embodiment of this disclosure.
[0032] Figure 6F This is a schematic diagram of the structure of a media server module during a player upgrade process, provided in an embodiment of this disclosure.
[0033] Figure 6GA schematic diagram illustrating the processing flow of a media server module during a player upgrade process, provided as an embodiment of this disclosure;
[0034] Figure 7A This is a schematic diagram illustrating the interaction process between a server and a display device during a player upgrade, provided by an embodiment of this disclosure.
[0035] Figure 7B An overall timing diagram of a player upgrade process provided in this embodiment of the disclosure;
[0036] Figure 8A A schematic diagram illustrating CPU time slices occupied by a foreground program and a background program, provided for an embodiment of this disclosure;
[0037] Figure 8B This diagram illustrates the CPU usage of the player thread and its parent thread before and after optimization of the parent thread corresponding to the player upgrade module during a player upgrade process, as provided in this embodiment of the disclosure. Detailed Implementation
[0038] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0039] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0040] The terms "first" and "second," etc., used in this disclosure are used to distinguish different objects, not to describe a specific order of objects. For example, "first library file" and "second library file," etc., are used to distinguish different library files, not to describe a specific order of library files.
[0041] With the rapid development of science and technology and the multimedia audio-visual industry, more and more human-computer interaction and entertainment functions are appearing in display devices, adding a lot of fun to users' lives. At the same time, with the continuous updates to media encoding and decoding technologies, software needs to add corresponding functions to adapt to the new encoding and decoding technologies to ensure the best viewing experience for users. In an era that pursues a superior user experience, frequent application upgrades are inevitable.
[0042] In display device systems, media player upgrades are inevitable to meet diverse user needs. Currently, media player upgrades typically involve the display device receiving a pop-up notification of a new version, prompting the user to trigger an OTA (Over-The-Air) update. However, this method requires manual user intervention, failing to achieve a seamless upgrade experience and negatively impacting the viewing experience.
[0043] To address the aforementioned issues, this disclosure proposes a novel player upgrade method. The display device controller first determines that the player version has been updated, downloads the upgrade package corresponding to the updated player version, and installs the upgrade package. Then, if the version number of the first library file of the player in the data directory is lower than the version number of the second library file of the player carried in the upgrade package, and the second library file is complete, the second library file is stored in the data directory. Finally, the version numbers of the third library files corresponding to the player in the system directory and the data directory are compared, and the third library file with the largest version number is loaded. Through the above process, the required library files of the player can be accurately upgraded without manual operation by the user or a full package upgrade, achieving a seamless upgrade for the user and improving the user's viewing experience.
[0044] It should be noted that when a new version of the media player or a new version of the display device's operating system is available, the user authorizes the background system to automatically trigger an upgrade process. This means either allowing the background system to download and install the update package for the newer version of the media player, or allowing the background system to update the display device. The media player on the display device can be the system media player; therefore, upgrading or updating the display device's system will simultaneously upgrade or update the media player.
[0045] Figure 1 This is a schematic diagram illustrating an operational scenario between a display device and a control device according to one or more embodiments of this disclosure. Figure 1 As shown, users can operate the display device 200 through the smart device 300 or the control device 100 to achieve corresponding control. The display device 200 is equipped with a corresponding player to play relevant programs, such as TV series, movies, variety shows, and live broadcasts.
[0046] In some embodiments, the control device 100 may be a remote control. Communication between the remote control and the display device 200 may include infrared protocol communication, Bluetooth protocol communication, wireless or other wired methods, etc., through which the display device 200 can be controlled. Users can control the display device 200 by inputting user commands through buttons on the remote control, voice input, and control panel input.
[0047] In some embodiments, mobile terminals, tablet computers, computers, laptops and other smart devices may also be used to control the display device 200.
[0048] In some embodiments, the display device 200 may receive instructions not through the aforementioned smart device 300 or control device 100, but through touch or gestures.
[0049] In some embodiments, the display device 200 can also be controlled in ways other than the control device 100 and the smart device 300. For example, it can be controlled by directly receiving the user's voice commands through a module configured inside the display device 200 for acquiring voice commands, or it can be controlled by receiving the user's voice commands through a voice control device set outside the display device 200.
[0050] In some embodiments, the mobile terminal can install software applications with the display device 200 to connect and communicate via network communication protocols, achieving one-to-one control operations and data communication. Audio and video content displayed on the mobile terminal can also be transmitted to the display device 200 for synchronized display. The display device 200 can also communicate with the server 400 via various communication methods, allowing the display device 200 to connect via a local area network (LAN), wireless local area network (WLAN), and other networks. The server 400 can be a cluster or multiple clusters, and may include one or more types of servers. The server 400 can provide various content and interactive features to the display device 200. The display device 200 can be a liquid crystal display, an OLED display, or a projection display device, etc. In addition to providing broadcast television reception functions, the display device 200 can also be equipped with intelligent network television functions that provide computer support.
[0051] Figure 2 This is a hardware configuration block diagram of a control device 100 according to one or more embodiments of the present disclosure. Figure 2 As shown, the control device 100 includes a controller 110, a communication interface 130, a user input / output interface 140, a memory, and a power supply. The control device 100 can receive user input commands and convert them into commands that the display device 200 can recognize and respond to, acting as an intermediary for interaction between the user and the display device 200. The communication interface 130 is used for external communication and includes at least one of a Wi-Fi chip, a Bluetooth module, NFC, or a replacement module. The user input / output interface 140 includes at least one of a microphone, a touchpad, a sensor, buttons, or a replacement module.
[0052] Figure 3A This is a hardware configuration block diagram of a display device 200 according to one or more embodiments of the present disclosure. Figure 3A The display device 200 shown includes at least one of a tuner / demodulator 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface (i.e., a user input interface) 280. The controller 250 includes a central processing unit, a video processor, an audio processor, a graphics processor, RAM, ROM, and a first to nth interface for input / output. The display 260 may be at least one of a liquid crystal display, an OLED display, a touch display, and a projection display, and may also be a projection device and a projection screen. The tuner / demodulator 210 receives broadcast television signals via wired or wireless means, and demodulates audio and video signals, such as EPG data signals, from multiple wireless or wired broadcast television signals. The communicator 220 is a component used to communicate with external devices or servers according to various communication protocol types. For example, the communicator may include at least one of a Wi-Fi module, a Bluetooth module, a wired Ethernet module, other network communication protocol chips or near-field communication protocol chips, and an infrared receiver. Display device 200 can establish the transmission and reception of control signals and data signals with control device 100 or server 400 via communicator 220. Detector 230 is used to collect signals from the external environment or signals interacting with the outside world. Controller 250 and tuner 210 can be located in different separate devices; that is, tuner 210 can also be located in an external device of the main device containing controller 250, such as an external set-top box. User interface 280 can be used to receive control signals from control devices (such as infrared remote controls).
[0053] In some embodiments, the controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in memory. The controller 250 controls the overall operation of the display device 200. The user can input user commands through a graphical user interface (GUI) displayed on the monitor 260, and the user input interface receives the user input commands through the GUI. Alternatively, the user can input user commands by inputting specific sounds or gestures, and the user input interface receives the user input commands by recognizing the sounds or gestures through sensors.
[0054] In some embodiments, a "user interface" is the medium through which an application or operating system interacts and exchanges information with a user, enabling the conversion between the internal form of information and a form acceptable to the user. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be interface elements such as icons, windows, and controls displayed on the screen of an electronic device. Controls can include at least one of the visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.
[0055] Figure 3B This is a schematic diagram of the software configuration in a display device 200 according to one or more embodiments of the present disclosure, such as... Figure 3B As shown, the system is divided into four layers, from top to bottom: the Applications layer (referred to as the "Application Layer"), the Application Framework layer (referred to as the "Framework Layer"), the Android runtime and system library layer (referred to as the "System Runtime Library Layer"), and the kernel layer.
[0056] In some embodiments, at least one application runs in the application layer. These applications may be Windows programs, system settings programs, or clock programs that come with the operating system; they may also be applications developed by third-party developers. In specific implementations, the applications in the application layer include, but are not limited to, the examples above.
[0057] In some embodiments, the system runtime library layer provides support for the upper layer, namely the framework layer. When the framework layer is used, the Android operating system runs the C / C++ libraries contained in the system runtime library layer to implement the functions that the framework layer needs to perform.
[0058] In some embodiments, the kernel layer is a layer between hardware and software, and includes at least one of the following drivers: audio driver, display driver, Bluetooth driver, camera driver, WIFI driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver, etc.
[0059] Figure 3C This is a schematic diagram showing the icon control interface of an application in a display device 200 according to one or more embodiments of the present disclosure, such as... Figure 3CAs shown, the application layer contains at least one application whose corresponding icon control can be displayed on the screen, such as: live TV application icon control, video-on-demand application icon control, media center application icon control, application center icon control, game application icon control, etc. Live TV applications can provide live television from different signal sources. Video-on-demand applications can provide video from different storage sources. Unlike live TV applications, video-on-demand provides video display from certain storage sources. Media center applications can provide applications for playing various multimedia content. The application center can provide storage for various applications.
[0060] In some embodiments, the display device described above is a terminal device with display functionality, such as a television, mobile phone, computer, or educational device. In this display device:
[0061] The output interface (display 260, and / or audio output interface 270) is configured to output user interaction information;
[0062] Communicator 220 is used to communicate with server 400;
[0063] Controller 250 is configured to: determine when the player version has been updated, download the upgrade package corresponding to the updated version of the player, and install the upgrade package;
[0064] If the version number of the first library file of the player in the data directory is lower than the version number of the second library file of the player carried in the upgrade package, and the second library file is complete, then the second library file will be stored in the data directory.
[0065] Compare the version numbers of the third-party library files corresponding to the player in the system directory and the data directory, and load the third-party library file with the largest version number.
[0066] In some embodiments, the controller 250 is specifically configured to:
[0067] If the version number of the third-party library file in the system directory is greater than or equal to the version number of the third-party library file in the data directory, then the third-party library file in the system directory will be loaded.
[0068] In some embodiments, the data directory includes a first sub-data directory and a second sub-data directory;
[0069] Controller 250 is specifically configured as follows:
[0070] If the version number of the third library file in the data directory is greater than the version number of the third library file in the system directory, then the corresponding third library file is loaded based on the size of the first version number of the third library file in the first sub-data directory and the second version number of the third library file in the second sub-data directory.
[0071] In some embodiments, the controller 250 is specifically configured to:
[0072] If the first version number is greater than or equal to the second version number, then load the third library file in the first sub-data directory;
[0073] If the second version number is greater than the first version number, then copy the third library file from the second sub-data directory to the first sub-data directory and load the copied third library file from the first sub-data directory.
[0074] In some embodiments, the data directory includes a second sub-data directory;
[0075] Controller 250 is specifically configured as follows:
[0076] If the version number of the first library file of the player in the data directory is lower than the version number of the second library file of the player carried in the upgrade package, and the second library file is complete, then the second library file will be stored in the second sub-data directory.
[0077] In some embodiments, if the version number of the first library file of the player in the data directory is lower than the version number of the second library file of the player carried in the upgrade package, and the second library file is complete, then the thread that stores the second library file in the data directory is determined as the parent thread, and the thread that stores the second library file in the data directory is determined as the child thread.
[0078] Controller 250 is also configured as follows:
[0079] Obtain the first CPU utilization rate of the system corresponding to the display device;
[0080] Based on the relationship between the first occupancy rate and different occupancy rate ranges, the priority of the parent thread is reduced by a first preset number of levels;
[0081] If the second utilization rate of the CPU corresponding to the parent thread is greater than or equal to the first preset utilization rate, the priority of the child thread will be reduced by the second preset number of levels.
[0082] In some embodiments, the controller 250 is further configured to:
[0083] If the storage rate corresponding to the child thread is less than the preset rate, and the sum of the first occupancy rate and the second occupancy rate is greater than or equal to the second preset occupancy rate, then the priority of the child thread will be reduced by a third preset number of levels until the priority of the child thread is reduced to the lowest level, or the sum of the first occupancy rate and the second occupancy rate is less than the second preset occupancy rate.
[0084] If the storage rate corresponding to the child thread is equal to the preset rate, the second occupancy rate is less than the first preset occupancy rate, and the sum of the first occupancy rate and the second occupancy rate is greater than or equal to the third preset occupancy rate, then the priority of the child thread will be reduced by the third preset number of levels until the priority of the child thread is reduced to the lowest level, or the sum of the first occupancy rate and the second occupancy rate is less than the third preset occupancy rate, wherein the first preset occupancy rate is less than the third preset occupancy rate, and the third preset occupancy rate is less than the second preset occupancy rate.
[0085] In some embodiments, the controller 250 is further configured to:
[0086] Send a request to the server to check if the player version has been updated, so that the server can check the player version based on the request, and send a message to the controller that the player version has been updated when the player version has been updated;
[0087] Receive a message from the server indicating that the player version has been updated, and determine that the player version has been updated based on the message.
[0088] In summary, this disclosure, by executing the aforementioned player upgrade method on a display device, involves the display device controller first determining that the player version has been updated, downloading the upgrade package corresponding to the updated version of the player, and installing the upgrade package. Then, if the version number of the first library file of the player in the data directory is lower than the version number of the second library file of the player carried in the upgrade package, and the second library file is complete, the second library file is stored in the data directory. Finally, the version numbers of the third library files corresponding to the player in the system directory and the data directory are compared, and the third library file with the largest version number is loaded. Through the above process, the required library files of the player can be accurately upgraded without manual operation by the user or a full package upgrade, reducing the operational complexity brought by OTA upgrades, achieving a seamless upgrade for the user, and improving the user's viewing experience.
[0089] Figure 4A This is a system framework diagram for upgrading a player according to one or more embodiments of this disclosure, such as... Figure 4AAs shown, the system may include a download and installation module 401, a storage module 402, and a loading module 403. When the system determines that the player version has been updated, the download and installation module 401 first downloads the upgrade package corresponding to the updated version of the player, decompresses the upgrade package, and installs it. After installation, the storage module 402 compares the version number of the first library file of the player in the data directory with the version number of the second library file of the player carried in the upgrade package. If the version number of the first library file is lower than the version number of the second library file, it means that the current version of the player's library file is not the latest. At this time, the integrity of the second library file is checked. If the second library file is intact, it is stored in the data directory. Finally, the loading module 403 loads the third library file corresponding to the player in the system directory and the data directory, compares the version numbers of the third library files in the system directory and the data directory, and loads the third library file with the largest version number, thereby completing the player upgrade. In the above technical solution, by loading the third library file with the largest version number, the required library files of the player can be accurately upgraded without the need for manual operation and full package upgrade, reducing the operational complexity brought by OTA upgrades, achieving a seamless upgrade for the user, and improving the user's viewing experience.
[0090] Figure 4B This is an architecture diagram for upgrading a media player according to one or more embodiments of this disclosure. Based on the above system framework, the implementation of this disclosure in the Android system is as follows: Figure 4B As shown, the Android system mainly includes the application layer, framework layer, system runtime library layer, and kernel layer. The implementation logic is mainly reflected in the application layer, which includes the download and installation module, storage module 402, and loading module. The functions of each module have been described in detail in the above embodiments, and will not be repeated here to avoid repetition.
[0091] The player upgrade method provided in this embodiment first determines that the player version has been updated, downloads the upgrade package corresponding to the updated player version, and installs the upgrade package. Then, if the version number of the first library file of the player in the data directory is lower than the version number of the second library file of the player carried in the upgrade package, and the second library file is complete, the second library file is stored in the data directory. Finally, the version numbers of the third library files corresponding to the player in the system directory and the data directory are compared, and the third library file with the largest version number is loaded. Through the above process, the required library files of the player can be accurately upgraded without manual operation by the user or full package upgrade, reducing the operational complexity brought by OTA upgrades, achieving a seamless upgrade for the user, and improving the user's viewing experience. To illustrate this solution in more detail, the following will be combined with an exemplary approach. Figure 5A To explain, it is understandable that Figure 5AThe steps involved may include more or fewer steps in actual implementation, and the order of these steps may also be different, as long as the player upgrade method provided in the embodiments of this disclosure can be implemented. The embodiments of this disclosure do not limit the steps.
[0092] Figure 5A This is a flowchart illustrating a player upgrade method provided in an embodiment of this disclosure. Figure 5B This is a schematic diagram illustrating the principle of a player upgrade method provided in an embodiment of this disclosure. This embodiment is applicable to situations where the player in a display device is automatically upgraded. Figure 5A As shown, the player upgrade method specifically includes the following steps:
[0093] S510: Confirm that the player version has been updated, download the upgrade package corresponding to the updated version of the player, and install the upgrade package.
[0094] After startup, the display device can detect the player version using its own detector, determine if the player version has been updated, and send an update message to the controller. The controller can also determine the player version update through interaction with a server, or use other methods; this embodiment does not limit this method. After determining that the player version has been updated, the controller can download the update package corresponding to the updated player version from the server or the corresponding update package platform. After downloading the update package, it will decompress and install it.
[0095] S520: If the version number of the first library file of the player in the data directory is lower than the version number of the second library file of the player carried in the upgrade package, and the second library file is complete, then the second library file is stored in the data directory.
[0096] Specifically, after installing the upgrade package, the version number of the player's first library file in the data directory is compared with the version number of the player's second library file included in the upgrade package. If the version number of the first library file is lower than that of the second library file, it means that the current version of the player's library file is not the latest. In this case, the integrity of the second library file needs to be verified. Specifically, the integrity of the second library file can be checked using algorithms such as MD5 Message-Digest Algorithm or Cyclic Redundancy Check (CRC). If the second library file is intact, it is stored in the data directory for later use.
[0097] In some embodiments, if the version number of the first library file of the player in the data directory is equal to the version number of the second library file of the player carried in the upgrade package, it indicates that the player has been updated.
[0098] In some embodiments, if the second library file is incomplete, the second library file is deleted. In this case, the player upgrade fails and needs to be re-executed in S510.
[0099] S530: Compare the version numbers of the third-party library files corresponding to the players in the system directory and data directory, and load the third-party library file with the largest version number.
[0100] The system directory can be / system / lib, and the data directory can be / data / gstLib.
[0101] Specifically, the third-party library files corresponding to the player are loaded from the system directory and the data directory. The version numbers of the third-party library files in the system directory and the data directory are compared. The third-party library file with the largest version number is the latest version library file. Therefore, by loading the third-party library file with the largest version number, the player can be upgraded.
[0102] In some embodiments, comparing the version numbers of the third-party library files corresponding to the player in the system directory and the data directory, and loading the third-party library file with the largest version number, may specifically include:
[0103] If the version number of the third-party library file in the system directory is greater than or equal to the version number of the third-party library file in the data directory, then the third-party library file in the system directory will be loaded.
[0104] Specifically, if the version number of the third-party library file in the system directory is greater than the version number of the third-party library file in the data directory, it means that the version number of the third-party library file in the system directory is newer. In this case, the third-party library file in the system directory is loaded to complete the player upgrade. If the version number of the third-party library file in the system directory is equal to the version number of the third-party library file in the data directory, since the data directory includes a first sub-data directory and a second sub-data directory, it is also necessary to compare the first version number of the third-party library file in the first sub-data directory and the second version number of the third-party library file in the second sub-data directory to determine the third-party library file to be loaded. Therefore, in this case, the third-party library file in the system directory is loaded first.
[0105] In some embodiments, if the third-party library file corresponding to the player is not found in the data directory, it may indicate that the entire system of the display device has been upgraded. In this case, the third-party library file in the system directory can be loaded directly.
[0106] In this embodiment, by loading third-party library files in the system directory, the library files required by the player can be accurately upgraded without requiring manual operation by the user or a full package upgrade. This reduces the operational complexity of OTA upgrades, achieves upgrades that are imperceptible to the user, and improves the user's viewing experience.
[0107] In some embodiments, the data directory includes a first sub-data directory and a second sub-data directory;
[0108] Correspondingly, comparing the version numbers of the third-party library files corresponding to the player in the system directory and data directory, and loading the third-party library file with the largest version number, may further include:
[0109] If the version number of the third library file in the data directory is greater than the version number of the third library file in the system directory, then the corresponding third library file is loaded based on the size of the first version number of the third library file in the first sub-data directory and the second version number of the third library file in the second sub-data directory.
[0110] The first sub-data directory can be / data / gstLib / master, the second sub-data directory can be / data / gstLib / salver, and the second sub-data directory is the backup directory.
[0111] In this embodiment, if the version number of the third library file in the data directory is greater than the version number of the third library file in the system directory, it means that the version number of the third library file in the data directory is newer. At this time, the first version number of the third library file in the first sub-data directory and the second version number of the third library file in the second sub-data directory are compared, and the corresponding third library file is loaded. This can accurately upgrade the library files required by the player without requiring manual operation and full package upgrade by the user.
[0112] In some embodiments, the third library file is loaded according to the size of the first version number of the third library file in the first sub-data directory and the second version number of the third library file in the second sub-data directory:
[0113] If the first version number is greater than or equal to the second version number, then load the third library file in the first sub-data directory;
[0114] If the second version number is greater than the first version number, then copy the third library file from the second sub-data directory to the first sub-data directory and load the copied third library file from the first sub-data directory.
[0115] Specifically, if the version number of the third library file in the data directory is newer, and the first version number is greater than or equal to the second version number, it means that the version number of the third library file in the first sub-data directory is newer, and the third library file in the first sub-data directory is loaded. If the second version number is greater than the first version number, it means that the version number of the third library file in the second sub-data directory is newer, and the third library file in the second sub-data directory is copied to the first sub-data directory first, and then the copied third library file in the first sub-data directory is loaded.
[0116] Correspondingly, after copying the third library file from the second sub-data directory to the first sub-data directory, you can also delete the third library file in the second sub-data directory and the lower version of the third library file in the first sub-data directory, thereby saving memory space and avoiding resource waste.
[0117] In this embodiment, by comparing the size of the first version number and the second version number, the corresponding third library file is loaded, which can accurately upgrade the library files required by the player and avoid upgrade failure.
[0118] In some embodiments, the data directory includes a second sub-data directory;
[0119] If the version number of the first library file of the player in the data directory is lower than the version number of the second library file of the player carried in the upgrade package, and the second library file is complete, then storing the second library file in the data directory may specifically include:
[0120] If the version number of the first library file of the player in the data directory is lower than the version number of the second library file of the player carried in the upgrade package, and the second library file is complete, then the second library file will be stored in the second sub-data directory.
[0121] In this embodiment, by storing the second library file in the second sub-data directory, backup can be performed, which facilitates subsequent comparison of the first version number of the third library file in the first sub-data directory and the second version number of the third library file in the second sub-data directory, thereby loading the corresponding third library file.
[0122] For example, Figure 6A This is a schematic diagram illustrating a player upgrade process provided in an embodiment of this disclosure. Figure 6A As shown, taking the Android system as an example, the player upgrade process includes three modules: the UpdateService module, the Player Update module, and the MediaServer module. These three modules can be deployed in the controller.
[0123] The upgrade service module (S510) is responsible for updating the management components, primarily updating the upgrade packages required by the player upgrade module. Specifically, it downloads, decompresses, installs the upgrade packages, and activates the player upgrade module. The player upgrade module (S520) is responsible for upgrading the player, specifically: 1) comparing the version numbers of the player's library files and decompressing the library files; 2) copying the library files; 3) deleting the library files; and 4) disabling the Suspend to Random Access Memory (STR) service. The media server module (S530) is responsible for starting the player and loading the player's library files, specifically: 1) loading all library files; 2) comparing the versions of the library files; and 3) loading the library file with the highest version number.
[0124] It should be noted that when the STR service is running, if the device is displayed as powered off, all modules except the memory module will be powered off and shut down. The memory module will retain its working state information. When the device is restarted, the system startup process can skip the process of loading the data from flash memory into memory, and most peripherals do not need to be reconfigured, directly returning to the state before the last shutdown. When the STR service is shut down, if the device is displayed as powered off, all modules will be powered off and shut down, requiring the memory to be reloaded accordingly.
[0125] For example, Figure 6B This is a schematic diagram illustrating the structure of an upgrade service module during a player upgrade process, as provided in an embodiment of this disclosure. Figure 6B As shown, the upgrade service module consists of four parts: version detection, upgrade, installation, and wake-up. The version detection part is used to periodically update the Android application package (APK) in the configuration list after the upgrade service module starts, thereby determining whether the player version has been updated. The upgrade part is used to download the corresponding upgrade package when a new player version is available. The installation part is used to decompress the upgrade package and install it. The wake-up part is used to wake up the player upgrade module and enable it to function.
[0126] For example, Figure 6C This is a schematic diagram illustrating the processing flow of the upgrade service module during a player upgrade process, as provided in an embodiment of this disclosure. Figure 6C The processing flow shown has been described in the above embodiments, and will not be repeated here to avoid repetition.
[0127] For example, Figure 6D This is a schematic diagram illustrating the structure of a player upgrade module during a player upgrade process, as provided in an embodiment of this disclosure. Figure 6DAs shown, the player upgrade module consists of four parts: version management, library file checking, library file decompression, and disabling the STR service. The version management part determines whether the version number of the first library file in the data directory matches the version number of the second library file carried in the upgrade package. The library file checking part checks the integrity of the second library file if its version number is lower than the second. The library file decompression part clears the second sub-data directory, decompresses the second library file, and stores the decompressed files in the second sub-data directory when the second library file is complete. The STR service disabling part disables the STR service so that the media server module can reload the accurate library file the next time the display device starts.
[0128] For example, Figure 6E This is a schematic diagram illustrating the processing flow of the player upgrade module during a player upgrade process, provided in an embodiment of this disclosure. Figure 6E The processing flow shown has been described in the above embodiments, and will not be repeated here to avoid repetition.
[0129] For example, Figure 6F This is a schematic diagram of the structure of a media server module during a player upgrade process, provided as an embodiment of this disclosure. Figure 6F As shown, the media server module comprises four parts: library file version number comparison, library file copying, library file deletion, and library file loading. The library file version number comparison part loads the third-party library files corresponding to the player in the system directory and data directory, comparing the version numbers of each third-party library file. The library file copying part copies the third-party library files from the second sub-data directory to the first sub-data directory if the version number of the third-party library file in the data directory is greater than that in the system directory, and the first version number of the third-party library file in the first sub-data directory is less than the second version number of the third-party library file in the second sub-data directory. The library file deletion part deletes the third-party library files in the second sub-data directory. The library file loading part loads the third-party library files from the system directory if their version number is greater than or equal to that in the data directory; if their first version number is greater than or equal to their second version number, they load the third-party library files from the first sub-data directory; and if their first version number is less than their second version number, they load the copied third-party library files from the first sub-data directory.
[0130] For example, Figure 6G This is a schematic diagram illustrating the processing flow of the media server module during a player upgrade process, provided as an embodiment of this disclosure. Figure 6G The processing flow shown has been described in the above embodiments, and will not be repeated here to avoid repetition.
[0131] In some embodiments, determining that the player version has been updated may specifically include:
[0132] Send a request to the server to check if the player version has been updated, so that the server can check the player version based on the request, and send a message to the controller that the player version has been updated when the player version has been updated;
[0133] Receive a message from the server indicating that the player version has been updated, and determine that the player version has been updated based on the message.
[0134] Specifically, the display device can interact with the server. Therefore, the controller sends a request to the server to check if the player version has been updated. After receiving this request, the server can check the player version based on the request and, if the player version has been updated, send an update message to the controller. Correspondingly, after receiving this update message from the server, the controller can determine that the player version has been updated.
[0135] In this embodiment, the method described above is used to determine when the player version has been updated, which is less prone to errors and improves accuracy.
[0136] For example, Figure 7A This diagram illustrates the interaction between a server and a display device during a player upgrade process, as provided in an embodiment of this disclosure. Figure 7A The interaction process shown has been described in the above embodiments, and will not be repeated here to avoid repetition.
[0137] Figure 7B This is an overall timing diagram of a player upgrade process provided in an embodiment of this disclosure. (See diagram below.) Figure 7B The player upgrade process shown includes a server, an upgrade service module, a player upgrade module, and a media server module. The functions of each part have been described in the above embodiments, and will not be repeated here to avoid repetition.
[0138] During the player upgrade process on a display device, in order to ensure that the process consumes as few system resources as possible and to prevent the impact on the system and playback, it is necessary to optimize the multi-process Central Processing Unit (CPU) to control the system CPU usage.
[0139] In the Android system, the system categorizes currently running applications into visible foreground and invisible background processes. Foreground application threads typically consume about 90% of the CPU time slice, while background application threads consume about 10%. This design aims to ensure that foreground applications have higher priority and receive more execution time.
[0140] For example, Figure 8A This is a schematic diagram illustrating the CPU time slices occupied by a foreground program and a background program, provided as an embodiment of this disclosure. Figure 8A As shown, assume the foreground process includes thread 1 and thread 2, each containing 5 sub-threads, and the background process includes thread 3 and thread 4, each containing 5 sub-threads. The foreground process occupies 90% of the CPU time slice, and the background process occupies 10% of the CPU time slice.
[0141] By default, newly created child threads have the same priority as their parent threads. If a foreground application creates dozens of child threads, some of which may not execute immediately or have low priority, their default priority will be the same as their parent threads. This can lead to CPU resource contention, causing stuttering in media players. Therefore, a precise CPU calculation strategy is needed to lower the priority of these child threads, helping the CPU determine their execution order and ensuring efficient use of system resources.
[0142] In this embodiment, during the player upgrade process, the player upgrade module, after being woken up, performs a series of actions, including version management, checking library files, decompressing library files, and shutting down the STR service. Particularly during the library file decompression process, which includes storing the decompressed files in the second sub-data directory (i.e., a copying operation), without optimization strategies, these actions of the player upgrade module will consume a significant amount of CPU, causing system lag and affecting normal video playback, resulting in stuttering or pixelation issues for users. Therefore, it is necessary to lower the priority of the parent thread corresponding to the player upgrade module, allowing the CPU to be scheduled to that parent thread as slowly as possible, thus not affecting the user's playback.
[0143] In some embodiments, if the version number of the first library file of the player in the data directory is lower than the version number of the second library file of the player carried in the upgrade package, and the second library file is complete, then the thread that stores the second library file in the data directory is determined as the parent thread, and the thread that stores the second library file in the data directory is determined as the child thread.
[0144] The above methods may also specifically include:
[0145] Obtain the first CPU utilization rate of the system corresponding to the display device;
[0146] Based on the relationship between the first occupancy rate and different occupancy rate ranges, the priority of the parent thread is reduced by a first preset number of levels;
[0147] If the second utilization rate of the CPU corresponding to the parent thread is greater than or equal to the first preset utilization rate, the priority of the child thread will be reduced by the second preset number of levels.
[0148] The occupancy rate range can be preset or determined according to specific circumstances; this embodiment does not impose any limitations. The first preset number and the second preset number can be preset or determined according to specific circumstances; their values can be the same or different; this embodiment does not impose any limitations. The first preset occupancy rate can be preset, for example, 10%, or determined according to specific circumstances; this embodiment does not impose any limitations.
[0149] Specifically, if the thread corresponding to the player upgrade module is determined as the parent thread, then all other parts included in the player upgrade module are child threads included in this parent thread. However, since the copying work will occupy the CPU, this embodiment mainly considers the part of decompressing library files, and determines the thread that executes the storage of the second library file to the data directory as the child thread.
[0150] During the player upgrade process, after the player upgrade module starts, it can use the top command to obtain the first CPU utilization rate of the display device's system, and then compare the relationship between the first utilization rate and different utilization rate ranges to determine the strategy of reducing the priority of the parent thread.
[0151] For example, the following priority reduction strategy can be adopted:
[0152] (1) If the first occupancy rate is in the range of (50%, 65%), reduce the priority of the parent thread by 1 level;
[0153] (2) If the second occupancy rate is in the range of (65%, 70%), reduce the priority of the parent thread by 2 levels;
[0154] (3) If the second occupancy rate is in the range of (65%, 100%), reduce the priority of the parent thread by 3 levels.
[0155] The `strace-cp pid` command can monitor the CPU utilization rate of the parent thread and the utilization rate of the child thread corresponding to the parent thread in real time. If the second utilization rate is greater than or equal to the first preset utilization rate, the priority of the child thread will be reduced by the second preset number of levels, for example, by 1 level.
[0156] In this embodiment, by reducing the priority of the parent thread, it is possible to avoid preempting CPU resources and ensure that each thread can run normally.
[0157] In some embodiments, the above method may further include:
[0158] If the storage rate corresponding to the child thread is less than the preset rate, and the sum of the first occupancy rate and the second occupancy rate is greater than or equal to the second preset occupancy rate, then the priority of the child thread will be reduced by a third preset number of levels until the priority of the child thread is reduced to the lowest level, or the sum of the first occupancy rate and the second occupancy rate is less than the second preset occupancy rate.
[0159] If the storage rate corresponding to the child thread is equal to the preset rate, the second occupancy rate is less than the first preset occupancy rate, and the sum of the first occupancy rate and the second occupancy rate is greater than or equal to the third preset occupancy rate, then the priority of the child thread will be reduced by the third preset number of levels until the priority of the child thread is reduced to the lowest level, or the sum of the first occupancy rate and the second occupancy rate is less than the third preset occupancy rate, wherein the first preset occupancy rate is less than the third preset occupancy rate, and the third preset occupancy rate is less than the second preset occupancy rate.
[0160] The preset speed can be pre-set, for example, 10Mbps, or it can be determined according to specific circumstances; this embodiment does not impose any limitation. The second and third preset occupancy rates can also be pre-set, for example, the second preset occupancy rate is 95% and the third preset occupancy rate is 80%, or it can be determined according to specific circumstances; this embodiment does not impose any limitation. The number of preset third occupancy rates can also be pre-set, or it can be determined according to specific circumstances. The values corresponding to the third preset number, the first preset number, and the second preset number can be the same or different; this embodiment does not impose any limitation.
[0161] In this embodiment, the sub-thread includes a copy operation. Therefore, the completion of the sub-thread's operation and the corresponding storage rate can be detected at preset intervals (e.g., five seconds), and the sub-thread's priority can be adjusted in real time. Specifically, this can include:
[0162] 1) When the storage rate corresponding to the child thread is less than the preset rate (the storage rate is usually 10Mbps when the child thread is not disturbed), check the CPU utilization rate at this time, that is: the sum of the first utilization rate and the second utilization rate. If the sum of the first utilization rate and the second utilization rate is greater than or equal to the second preset utilization rate, then reduce the priority of the child thread by 1 level, and continue to monitor the sum of the first utilization rate and the second utilization rate until the priority of the child thread is reduced to the lowest level, or the sum of the first utilization rate and the second utilization rate is less than the second preset utilization rate.
[0163] (2) If the storage rate corresponding to the child thread is equal to the preset rate, the second occupancy rate is less than the first preset occupancy rate, and the sum of the first occupancy rate and the second occupancy rate is greater than or equal to the third preset occupancy rate, in order not to affect the stable operation of other applications in the system, the priority of the child thread will be reduced by 1 level until the priority of the child thread is reduced to the lowest level, or the sum of the first occupancy rate and the second occupancy rate is less than the third preset occupancy rate.
[0164] In this embodiment, by adopting this scheme when there are a large number of threads through the above optimization process, the CPU utilization of low-priority threads can be effectively reduced, preventing resource shortages caused by CPU preemption. Through CPU optimization, the normal operation of each thread can be effectively guaranteed, especially in display devices with poor CPU performance, the effect is particularly obvious.
[0165] For example, Figure 8B This diagram illustrates the CPU usage of the player thread and its parent thread before and after optimization of the parent thread corresponding to the player upgrade module during a player upgrade process, as provided in this embodiment of the disclosure. Figure 8B It can be seen that without multi-threaded CPU optimization, the CPU utilization rate of the parent thread corresponding to the player upgrade module is 53%, while after adopting the CPU optimization scheme, the CPU utilization rate of the parent thread corresponding to the player upgrade module is 18%. This demonstrates that the optimization scheme effectively ensures the normal operation of each thread and prevents resource shortages caused by CPU preemption.
[0166] In summary, this disclosure, by executing the aforementioned player upgrade method on a display device, involves the display device controller first determining that the player version has been updated, downloading the upgrade package corresponding to the updated version of the player, and installing the upgrade package. Then, if the version number of the first library file of the player in the data directory is lower than the version number of the second library file of the player carried in the upgrade package, and the second library file is complete, the second library file is stored in the data directory. Finally, the version numbers of the third library files corresponding to the player in the system directory and the data directory are compared, and the third library file with the largest version number is loaded. Through the above process, the required library files of the player can be accurately upgraded without manual operation by the user or a full package upgrade, reducing the operational complexity brought by OTA upgrades, achieving a seamless upgrade for the user, and improving the user's viewing experience.
[0167] This disclosure provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the aforementioned player upgrade method and achieves the same technical effect. To avoid repetition, further details are omitted here.
[0168] The computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0169] This disclosure provides a computer program product, including: when the computer program product is run on a computer, causing the computer to implement the above-described player upgrade method.
[0170] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the discussion in some embodiments above is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better utilize the embodiments and various different variations of the embodiments suitable for specific application considerations.
Claims
1. A display device, characterized in that, include: The controller is configured to: determine when the player version is updated, download the upgrade package corresponding to the updated version of the player, and install the upgrade package; If the version number of the first library file of the player in the data directory is lower than the version number of the second library file of the player carried in the upgrade package, and the second library file is complete, then the second library file is stored in the data directory. The version numbers of the third-party library files corresponding to the player in the system directory and the data directory are compared, and the third-party library file with the largest version number is loaded; wherein, the data directory includes a first sub-data directory and a second sub-data directory; If the version number of the third library file in the system directory is greater than or equal to the version number of the third library file in the data directory, then the third library file in the system directory is loaded. If the version number of the third library file in the data directory is greater than the version number of the third library file in the system directory, then the corresponding third library file is loaded according to the size of the first version number of the third library file in the first sub-data directory and the second version number of the third library file in the second sub-data directory; The display device is further characterized in that the thread executing the statement "If the version number of the first library file of the player in the data directory is lower than the version number of the second library file of the player carried in the upgrade package, and the second library file is complete, then the thread executing the statement "to store the second library file in the data directory" is determined as the parent thread, and the thread executing the statement "to store the second library file in the data directory" is determined as the child thread. The controller is also configured to: Obtain the first utilization rate of the central processing unit corresponding to the system of the display device; Based on the relationship between the first occupancy rate and different occupancy rate ranges, the priority of the parent thread is reduced by a first preset number of levels; If the second utilization rate of the central processing unit corresponding to the parent thread is greater than or equal to the first preset utilization rate, the priority of the child thread will be reduced by a second preset number of levels.
2. The display device according to claim 1, characterized in that, The controller is specifically configured as follows: If the first version number is greater than or equal to the second version number, then load the third library file in the first sub-data directory; If the second version number is greater than the first version number, then the third library file in the second sub-data directory is copied to the first sub-data directory, and the copied third library file in the first sub-data directory is loaded.
3. The display device according to claim 1, characterized in that, The data directory includes a second sub-data directory; The controller is specifically configured as follows: If the version number of the first library file of the player in the data directory is lower than the version number of the second library file of the player carried in the upgrade package, and the second library file is complete, then the second library file will be stored in the second sub-data directory.
4. The display device according to claim 1, characterized in that, The controller is also configured to: If the storage rate corresponding to the sub-thread is less than the preset rate, and the sum of the first occupancy rate and the second occupancy rate is greater than or equal to the second preset occupancy rate, then the priority of the sub-thread will be reduced by a third preset number of levels until the priority of the sub-thread is reduced to the lowest level, or the sum of the first occupancy rate and the second occupancy rate is less than the second preset occupancy rate. If the storage rate corresponding to the sub-thread is equal to the preset rate, the second occupancy rate is less than the first preset occupancy rate, and the sum of the first occupancy rate and the second occupancy rate is greater than or equal to the third preset occupancy rate, then the priority of the sub-thread is reduced by the third preset number of levels until the priority of the sub-thread is reduced to the lowest level, or the sum of the first occupancy rate and the second occupancy rate is less than the third preset occupancy rate, wherein the first preset occupancy rate is less than the third preset occupancy rate, and the third preset occupancy rate is less than the second preset occupancy rate.
5. The display device according to any one of claims 1-4, characterized in that, The controller is also configured to: A request to the server is sent to check whether the player version has been updated, so that the server checks the player version based on the request, and sends a message to the controller that the player version has been updated when the player version has been updated. Receive a message from the server indicating that the player version has been updated, and determine that the player version has been updated based on the message.
6. A method for upgrading a media player, characterized in that, include: Once it is determined that the player version has been updated, download the upgrade package corresponding to the updated version of the player and install the upgrade package; If the version number of the first library file of the player in the data directory is lower than the version number of the second library file of the player carried in the upgrade package, and the second library file is complete, then the second library file is stored in the data directory. The version numbers of the third-party library files corresponding to the player in the system directory and the data directory are compared, and the third-party library file with the largest version number is loaded; wherein, the data directory includes a first sub-data directory and a second sub-data directory; If the version number of the third library file in the system directory is greater than or equal to the version number of the third library file in the data directory, then the third library file in the system directory is loaded. If the version number of the third library file in the data directory is greater than the version number of the third library file in the system directory, then the corresponding third library file is loaded according to the size of the first version number of the third library file in the first sub-data directory and the second version number of the third library file in the second sub-data directory; The method further includes: The thread that executes the statement that if the version number of the first library file of the player in the data directory is lower than the version number of the second library file of the player carried in the upgrade package, and the second library file is complete, then the thread that stores the second library file in the data directory is determined as the parent thread, and the thread that executes the statement that stores the second library file in the data directory is determined as the child thread. Obtain the first CPU utilization rate of the system corresponding to the display device; Based on the relationship between the first occupancy rate and different occupancy rate ranges, the priority of the parent thread is reduced by a first preset number of levels; If the second utilization rate of the central processing unit corresponding to the parent thread is greater than or equal to the first preset utilization rate, the priority of the child thread will be reduced by a second preset number of levels.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in claim 6.