Memory optimization method, device and equipment for running transplanted applications on Android smart TV
By optimizing the memory space in Android smart TV devices, creating a memory area dedicated to resident resources, and splitting and storing temporary resources, the problem of insufficient memory and computing power when running high-quality applications on smart TV devices is solved and achieved Applications run stably and smoothly, reducing costs.
Patent Information
- Application Number
- CN202411525967.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-10-30
AI Technical Summary
Existing smart TV devices cannot fully and smoothly run high-quality applications from the mobile phone or cloud in hardware configuration, which has problems such as insufficient memory and insufficient CPU computing power, resulting in unstable operation and high cost.
After starting the transplanted application in the TV system, obtain the program data resources that need to be stored in the TV system memory, estimate the overall space requirements when the application is running, create the first memory space for storing resident resources, and store temporary resources. Carry out split processing and store it in the dynamically calculated second memory space.
It effectively reduces the unreasonable memory footprint of Android smart TV devices when running transplanted applications, reduces the computing power requirements of the device, ensures the stable and smooth operation of the application, improves the success rate of program operation, and reduces the cost of running the application. Transplantation costs.
Smart Images

Figure CN119045886B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart TV compatible transplanted application programs, and in particular to a memory optimization method, device and equipment for running transplanted application programs on an Android smart TV. Background Art
[0002] With the rapid development of mobile and cloud applications (APPs, such as cloud games) and the intelligence of TV devices, a large amount of high-quality application content (usually with large resources and high computing power requirements) has been ported from mobile phones or the cloud to smart TV devices running the Android system. However, the reality is that the current smart TV devices are not able to fully and smoothly run these high-quality APPs on mobile phones or the cloud in terms of hardware configuration, and have specific problems such as insufficient running memory and insufficient CPU computing power.
[0003] According to industry statistics, it takes at least one year on average to develop a high-quality APP. After it is ported to smart TVs, it is also necessary to debug the operation of each manufacturer's models to achieve compatibility. For example, but not limited to, in order to achieve smooth operation of the APP on smart TVs, the developer must also reduce the color value of the APP's overall resources, reduce its size, or prepare multiple sets of resources. In addition, all smart TV manufacturers currently use a customized Android system without unified rules. If mobile APP or cloud games are to be compatible with most Android smart TVs, a lot of debugging of the operating environment is required, which is almost equivalent to redevelopment of the APP. According to industry estimates, the overall R&D time and manpower costs will be increased by at least one-third.
[0004] It can be seen that the industry is in urgent need of an effective solution for smoothly running transplanted mobile phone or cloud-based high-quality applications on Android smart TVs. Summary of the invention
[0005] In view of the above, the present invention aims to provide a memory optimization method, device and equipment for running transplanted applications on Android smart TVs to solve the specific problems mentioned above.
[0006] The technical solution adopted by the present invention is as follows:
[0007] In a first aspect, the present invention provides a memory optimization method for running a transplanted application on an Android smart TV, comprising:
[0008] After starting the transplanted application in the television system, obtaining program data resources to be stored in the television system memory;
[0009] Based on the program data resources, estimating the overall required space of the application program when it is running;
[0010] Creating a first memory space according to the overall required space, where the first memory space is only used to store resident resources of the application;
[0011] The temporary resources of the application are split and stored in the dynamically calculated second memory space.
[0012] In at least one possible implementation, the splitting of the temporary resources of the application and storing them in the dynamically calculated second memory space includes: splitting the temporary resources by dimensionality reduction and storing them in the second memory space respectively according to established rules.
[0013] In at least one possible implementation manner, the predetermined rule includes adding an index identifier for a restoration operation to each split data resource unit when splitting the temporary resource.
[0014] In at least one possible implementation manner, the method of creating the first memory space includes: organizing the current remaining memory of the television system based on the overall demand space, and uniformly creating the first memory space.
[0015] In at least one possible implementation manner, the acquiring of program data resources to be stored in the memory of the television system at least includes: reading a program resource table to be loaded into the memory of the television system.
[0016] In at least one possible implementation manner, the memory optimization method further includes: storing the resident resources of the application program continuously into the first memory space according to the resource identifiers in the program resource table.
[0017] In a second aspect, the present invention provides a memory optimization device for running a transplanted application on an Android smart TV, comprising:
[0018] A storage demand acquisition module is used to acquire program data resources that need to be stored in the memory of the television system after starting the transplanted application in the television system;
[0019] A space estimation module, used for estimating the overall required space of the application program when it is running based on the program data resources;
[0020] A memory centralized creation module, used to create a first memory space according to the overall required space, wherein the first memory space is only used to store the resident resources of the application program;
[0021] The resource splitting and storing module is used to split the temporary resources of the application program and store them into the dynamically calculated second memory space.
[0022] In a third aspect, the present invention provides an electronic device, comprising: one or more processors, a memory and one or more computer programs, wherein the memory may adopt a non-volatile storage medium, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, and when the instructions are executed by the device, the electronic device performs the method as described in the first aspect or any possible implementation manner of the first aspect.
[0023] In a fourth aspect, the present invention provides a computer-readable storage medium, which stores a computer program, which, when executed on a computer, enables the computer to execute the method as described in the first aspect or any possible implementation of the first aspect.
[0024] In a fifth aspect, the present invention further provides a computer program product, which, when executed by a computer, is used to execute the method in the first aspect or any possible implementation of the first aspect. In a possible design of the fifth aspect, the relevant programs involved in the product may be stored in whole or in part on a memory packaged with the processor, or may be stored in whole or in part on a storage medium not packaged with the processor.
[0025] The main design concept of the present invention is to provide a memory optimization solution for Android smart TV devices in view of the situation that high-quality application resources are large and the required running memory is high. In actual operation, it can be implemented based on C++ core source code, and the solution can also be packaged into a program package for convenient use, so as to complete the previously complex transplantation work in simple steps. While improving efficiency, it can also take into account more TV device models.
[0026] Specifically, by analyzing and planning the loaded transplanted program data resources, a complete space for storing the resident resources of the application is first sorted out in the TV system. After that, when the application loads temporary resources, only the temporary resources are decomposed and stored in the currently remaining fragment space. It can be seen that the memory optimization concept of the present invention actually adopts two different technical routes. One is to plan a non-random mixed memory space for the resident resources of the program, and the other is to adopt a mechanism of coordinating with the dynamic available space after decomposition for the storage of temporary resources of the program. Therefore, the present invention can greatly reduce the unreasonable memory occupied space of the Android smart TV device when running the transplanted mobile phone APP or cloud game, and significantly reduce the computing power requirements of the Android smart TV device, thereby ensuring that the transplanted high-quality application can run stably and smoothly on the TV side, improving the program running success rate of various models of Android smart TVs, and effectively solving the problem of extremely high cost investment in transplanting mobile phone APP or cloud game APP to Android smart TV. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be further described below with reference to the accompanying drawings, in which:
[0028] Figure 1 A flowchart of a method for optimizing memory for running a transplanted application on an Android smart TV provided by an embodiment of the present invention;
[0029] Figure 2 A schematic diagram of a memory optimization device for running a transplanted application on an Android smart TV provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0030] Embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.
[0031] The present invention proposes an embodiment of a memory optimization method for running a transplanted application on an Android smart TV. Specifically, Figure 1 shown, including:
[0032] Step S1, after starting the transplanted application in the television system, obtaining program data resources to be stored in the memory of the television system;
[0033] In actual operation, for example but not limited to, it includes reading a program resource table to be loaded into the memory of the television system.
[0034] Step S2: estimating the overall required space of the application program when it is running based on the program data resources;
[0035] Step S3: creating a first memory space according to the overall required space, wherein the first memory space is only used to store the resident resources of the application;
[0036] Specifically, on the one hand, the method of creating the first memory space may include: sorting the current remaining memory of the TV based on the overall required space, and then uniformly creating the first memory space. On the other hand, the preset resident resources such as pictures and images of the application program may be continuously stored in the first memory space according to the resource identifier in the program resource table mentioned above.
[0037] Step S4: split the temporary resources of the application and store them in the dynamically calculated second memory space.
[0038] The temporary resource splitting process mentioned here may refer to dimensionality reduction splitting. For example, if a picture is stored in the memory as a 2-dimensional array, such as 100*100 grids, the array can be split into 100 1*100 grids, that is, split from 2 dimensions into 1 dimension, and then stored in the second memory space according to the established rules. The established rules may refer to adding index identifiers to each split resource unit when splitting temporary resources.
[0039] In addition, those skilled in the art can understand that the second memory space refers to the current available memory (fragmented space) of the television system after the first memory space is divided. Since the fragmented space changes in real time according to the current system operation status, in actual operation, the second memory space can be calculated in real time first, and then the temporary resources can be split so that the split resource units match the size of the second memory space.
[0040] Based on the above embodiments, the following exemplary embodiments are provided here:
[0041] Assume that a transplanted APP is estimated to require 900M of memory (data and resources, etc.) when running on the TV system, and the TV system still has 1000M of memory space. According to the traditional method, the TV system will randomly and mixedly create the memory space occupied by the data and resources of the APP. This will cause an error to occur when the TV system loads the APP after the APP is started, if 800M of memory has been used, then when loading 100M of resources later. On the one hand, the random and mixed creation of storage space will cause the remaining memory of the TV system to be scattered and insufficient; on the other hand, if the 100M resources to be loaded later are complete resources, the remaining scattered memory of the TV system cannot complete the complete storage of the resources. Therefore, since there is no space for the currently loaded resources, the APP fails to run.
[0042] The RAM memory optimization solution provided by the present invention, on the one hand, can first centrally and regularly organize the space used for storing APP resident resources, so as to achieve the effect of reducing the memory usage when the APP is running, which can ensure that the memory space can be fully and continuously used when the program is loaded, thereby optimizing a more sufficient memory margin; on the other hand, when loading temporary resources, this part of the resource data is split, and using the dynamically calculated remaining fragment space, the split data resource units can be stored in the remaining fragment space according to established rules (such as index identifiers, etc.), and when the system uses this part of the resource data, it only needs to perform restoration processing according to the above rules.
[0043] Through the above-mentioned organization, unified creation and classification of the memory of smart TV devices when running transplanted APPs, many problems such as lag and crash when high-quality APPs run on Android smart TVs with insufficient memory and computing power can be effectively solved.
[0044] To sum up, the main design concept of the present invention is to provide a memory optimization solution for Android smart TV devices in view of the situation that high-quality application resources are large and the required running memory is high. In actual operation, it can be implemented based on C++ core source code, and the solution can also be packaged into a program package for convenient use, so as to complete the previously complex porting work in simple steps, while improving efficiency and taking into account more TV device models.
[0045] Specifically, by analyzing and planning the loaded transplanted program data resources, a complete space for storing the resident resources of the application is first sorted out in the TV system. After that, when the application loads temporary resources, only the temporary resources are decomposed and stored in the currently remaining fragment space. It can be seen that the memory optimization concept of the present invention actually adopts two different technical routes. One is to plan a non-random mixed memory space for the resident resources of the program, and the other is to adopt a mechanism of coordinating with the dynamic available space after decomposition for the storage of temporary resources of the program. Therefore, the present invention can greatly reduce the unreasonable memory occupied space of the Android smart TV device when running the transplanted mobile phone APP or cloud game, and significantly reduce the computing power requirements of the Android smart TV device, thereby ensuring that the transplanted high-quality application can run stably and smoothly on the TV side, improving the program running success rate of various models of Android smart TVs, and effectively solving the problem of extremely high cost investment in transplanting mobile phone APP or cloud game APP to Android smart TV.
[0046] Corresponding to the above-mentioned embodiments and preferred solutions, the present invention also provides an embodiment of a memory optimization device 200 for running a transplanted application on an Android smart TV, such as Figure 2 As shown, it may specifically include the following components:
[0047] The storage requirement acquisition module 201 is used to acquire program data resources to be stored in the memory of the television system after starting the transplanted application in the television system;
[0048] A space estimation module 202, used to estimate the overall space required when the application is running based on the program data resources;
[0049] A memory centralized creation module 203, used to create a first memory space according to the overall required space, wherein the first memory space is only used to store the resident resources of the application program;
[0050] The resource splitting and storing module 204 is used to split the temporary resources of the application program and store them into the dynamically calculated second memory space.
[0051] It should be understood that the above Figure 2 The division of the various components in the memory optimization device for running transplanted applications on Android smart TVs shown is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these components can all be implemented in the form of software calling through processing elements; some components can also be implemented in the form of software calling through processing elements, and some components can be implemented in the form of hardware. For example, one of the above modules can be a separately established processing element, or it can be integrated in a chip of an electronic device. The implementation of other components is similar. In addition, all or part of these components can be integrated together, or they can be implemented independently. In the implementation process, each step of the above method or the above components can be completed by an integrated logic circuit of hardware in the processor element or instructions in software form.
[0052] For example, the above components may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (DSP), or one or more field programmable gate arrays (FPGA). For another example, these components may be integrated together to be implemented in the form of a system-on-a-chip (SOC).
[0053] Based on the above embodiments and their preferred solutions, those skilled in the art can understand that, in actual operation, the technical concept involved in the present invention can be applied to a variety of implementations. The present invention uses the following carrier as a schematic illustration:
[0054] (1) An electronic device. The device may specifically include: one or more processors, a memory, and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, and when the instructions are executed by the device, the device performs the steps / functions of the aforementioned embodiment or equivalent implementation.
[0055] The electronic device may specifically be electronic device related to computers, such as but not limited to various computing terminals and electronic products.
[0056] Specifically, the processor, communication interface, and memory can all communicate with each other through a communication bus. Among them, the processor may be a central processing unit CPU, DSP, microcontroller or digital signal processor, and may also include GPU, embedded neural network processor (Neural-network Process Units; hereinafter referred to as: NPU) and image signal processor (Image Signal Processor; hereinafter referred to as: ISP). The processor may also include a specific integrated circuit ASIC, or one or more integrated circuits configured to implement the embodiment of the present invention, etc. In addition, the processor may have the function of operating one or more software programs, and the software programs may be stored in a storage medium such as a memory; and the aforementioned memory / storage medium may include: non-volatile memory (Non-Volatile Memory), such as a non-removable disk, U disk, mobile hard disk, optical disk, etc., as well as read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (RandomAccess Memory; hereinafter referred to as: RAM), etc.
[0057] Even though the present invention does not limit the specific form of the electronic device, it can be seen from the introduction of the aforementioned invention scheme that the electronic device here preferably refers to an Android smart TV or a similar device.
[0058] (2) A computer data storage medium on which a computer program or the above-mentioned device is stored, which, when the computer program or the above-mentioned device is executed, enables a computer to execute the steps / functions of the aforementioned embodiment or equivalent implementation.
[0059] In several embodiments provided by the present invention, any function, if implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a computer data storage medium. Based on this understanding, some technical solutions of the present invention are essentially or part of the technical solution that contributes to the prior art or part of the technical solution can be embodied in the form of the software product described below.
[0060] It is particularly important to point out that the storage medium may refer to a server or a similar computer device, specifically, a storage device in a server or a similar computer device storing the aforementioned computer program or the aforementioned apparatus.
[0061] (3) A computer program product (which may include the above-mentioned apparatus), which, when running on a terminal device, enables the terminal device to execute the memory optimization method for running a transplanted application on an Android smart TV according to the above-mentioned embodiment or an equivalent implementation.
[0062] Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above implementation method can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the above computer program product may include but is not limited to an optimization program library and a program package.
[0063] In the embodiments of the present invention, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. A and B may be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c may represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c may be single or multiple.
[0064] Those skilled in the art will appreciate that the various modules, units, and method steps described in the embodiments disclosed in this specification can be implemented by a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0065] In addition, each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. In particular, for embodiments such as devices and equipment, since they are basically similar to method embodiments, the relevant parts can refer to the partial description of the method embodiments. The embodiments of the devices and equipment described above are merely schematic, wherein the modules, units, etc. described as separate components may or may not be physically separated, that is, they may be located in one place, or they may be distributed in multiple places, such as nodes of a system network. Specifically, some or all of the modules and units may be selected according to actual needs to achieve the purpose of the above-mentioned embodiment scheme. Those skilled in the art can understand and implement it without paying creative labor.
[0066] The above describes in detail the structure, features and effects of the present invention based on the embodiments shown in the drawings, but the above is only a preferred embodiment of the present invention. It should be noted that the technical features involved in the above embodiments and their preferred methods can be reasonably combined and matched into a variety of equivalent schemes by those skilled in the art without departing from or changing the design ideas and technical effects of the present invention; therefore, the present invention is not limited to the scope of implementation shown in the drawings, and all changes made in accordance with the concept of the present invention, or modifications to equivalent embodiments with equivalent changes, which still do not exceed the spirit covered by the specification and drawings, should be within the protection scope of the present invention.
Claims
1. A memory optimization method for running a transplanted application on an Android smart TV, characterized in that: include: After starting the transplanted application in the television system, obtaining program data resources to be stored in the television system memory; Based on the program data resources, estimating the overall required space of the application program when it is running; Creating a first memory space according to the overall required space, where the first memory space is only used to store resident resources of the application; The temporary resources of the application are split and stored in the dynamically calculated second memory space, including: splitting the temporary resources by dimensionality reduction and storing them in the second memory space respectively according to the established rules, wherein the established rules include adding an index identifier for a restoration operation to each split data resource unit when splitting the temporary resources; The second memory space refers to the currently available memory of the television system after the first memory space is divided.
2. The memory optimization method for running a transplanted application on an Android smart TV according to claim 1, characterized in that: The method of creating the first memory space includes: organizing the current remaining memory of the television system based on the overall required space, and uniformly creating the first memory space.
3. The memory optimization method for running a transplanted application on an Android smart TV according to any one of claims 1 to 2, characterized in that: The obtaining of program data resources to be stored in the TV system memory at least includes: reading a program resource table to be loaded into the TV system memory.
4. The memory optimization method for running a transplanted application on an Android smart TV according to claim 3, characterized in that: The memory optimization method further includes: storing the resident resources of the application program in the first memory space continuously according to the resource identifiers in the program resource table.
5. A memory optimization device for running transplanted applications on an Android smart TV, characterized in that: include: A storage demand acquisition module is used to acquire program data resources that need to be stored in the memory of the television system after starting the transplanted application in the television system; A space estimation module, used for estimating the overall required space of the application program when it is running based on the program data resources; A memory centralized creation module, used to create a first memory space according to the overall required space, wherein the first memory space is only used to store the resident resources of the application program; The resource splitting and storing module is used to split the temporary resources of the application program and store them in the second memory space calculated dynamically, including: splitting the temporary resources by dimensionality reduction and storing them in the second memory space respectively according to the established rules, wherein the established rules include adding an index identifier for the recovery operation to each split data resource unit when splitting the temporary resources; The second memory space refers to the currently available memory of the television system after the first memory space is divided.
6. An electronic device, characterized in that: include: One or more processors, a memory, and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the electronic device, enable the electronic device to execute the memory optimization method for running a transplanted application on an Android smart TV as described in any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the memory optimization method for running a transplanted application on an Android smart TV as described in any one of claims 1 to 4 is implemented.
8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the memory optimization method for running a transplanted application on an Android smart TV as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Internal storage cleaning method and system
CN102984580A
Multimedia data processing method and device, electronic equipment and storage medium
CN118626238A
Method and apparatus for managing memory, and terminal device
WO2020227902A1