Interface rendering method, lightweight equipment and server

The server processes the target resource data to generate render files, and performs interface layout rendering in lightweight devices, solving the problem of lag caused by large amount of data during interface rendering, and improving rendering efficiency and fluency.

CN119536613APending Publication Date: 2025-02-28MIDEA GROUP WUHAN REFRIGERATION EQUIPMENT CO LTD +1
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202311092000.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-28
Publication Date
2025-02-28

Smart Images

  • Figure CN119536613A_ABST
    Figure CN119536613A_ABST
Patent Text Reader

Abstract

The invention discloses an interface rendering method, lightweight equipment and a server. The method comprises the steps that a rendering file of target resource data is obtained, and the rendering file is obtained by processing the target resource data through a server; and rendering the rendering file to a display interface according to the target interface layout. The invention aims to improve the smoothness of the interface rendering process of the lightweight equipment, so that the lightweight equipment can meet diversified interface rendering requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent devices, and in particular to an interface rendering method, a lightweight device and a server. Background Art

[0002] Many smart devices require interface display. Resources related to interface display (such as pictures or text, etc.) are generally stored on the server. When interface rendering is required, the server processes and integrates all resources involved according to the layout required for interface display to obtain the rendering result corresponding to the overall display interface. After the device downloads the entire rendering file from the server, it directly uses it to realize interface display. That is, the server is responsible for rendering and the terminal is responsible for display.

[0003] However, this interface rendering method requires a large amount of data to be transmitted between the server and the smart device. When the smart device is a lightweight device, it cannot process a large amount of data concurrently due to hardware limitations, which can easily cause the lightweight device to freeze and fail to render the interface normally, limiting the types of interfaces allowed to be rendered by lightweight devices. Summary of the invention

[0004] The main purpose of the present invention is to provide an interface rendering method, a lightweight device and a server, aiming to improve the fluency of the lightweight device interface rendering process so that the lightweight device can meet the diverse interface rendering requirements.

[0005] To achieve the above object, the present invention provides an interface rendering method, which is applied to a lightweight device. The interface rendering method comprises the following steps:

[0006] Acquire a rendering file of target resource data, wherein the rendering file is obtained by processing the target resource data by the server;

[0007] The rendering file is rendered to a display interface according to the target interface layout.

[0008] Optionally, the step of obtaining a rendering file of the target resource data includes:

[0009] Obtaining compressed data corresponding to the rendering file, where the compressed data is obtained by compressing the rendering file by the server;

[0010] The compressed data is decompressed to obtain the rendering file.

[0011] Optionally, the step of decompressing the compressed data to obtain the rendering file includes:

[0012] Decompressing the compressed data to the local memory of the lightweight device to obtain the rendering file;

[0013] Or, decompress the compressed data into the memory of the lightweight device to obtain the rendering file.

[0014] Optionally, the step of decompressing the compressed data to obtain the rendering file includes:

[0015] When the usage frequency of the target resource data is greater than a preset frequency, decompressing the compressed data to a local memory of the lightweight device to obtain the rendering file;

[0016] When the usage frequency of the target resource data is less than or equal to the preset frequency, and / or when the available storage capacity of the local memory is less than the preset capacity, the compressed data is decompressed to the memory of the lightweight device to obtain the rendering file.

[0017] Optionally, the step of rendering the rendering file to a display interface according to the target interface layout includes:

[0018] When the rendering file is located in the local memory, copying the rendering file to the memory, and loading the rendering file in the memory according to the target interface layout to display the target resource data on the display interface;

[0019] When the rendering file is located in the memory, the rendering file in the memory is loaded according to the target interface layout to display the target resource data on the display interface.

[0020] Optionally, the step of obtaining compressed data corresponding to the rendering file includes:

[0021] Determining whether the compressed data exists in the lightweight device;

[0022] When the compressed data is stored in the lightweight device, reading the compressed data stored locally in the lightweight device, where the compressed data stored locally in the lightweight device is downloaded from the server before the current moment;

[0023] When the compressed data does not exist in the lightweight device, the compressed data is downloaded from the server.

[0024] Optionally, the step of determining whether the compressed data exists in the lightweight device includes:

[0025] Acquire resource directory information, the resource directory information including first identification information corresponding to the compressed data stored by the server, second identification information corresponding to the compressed data stored locally by the lightweight device, and an association relationship between the first identification information and the second identification information;

[0026] When the resource directory information contains second identification information that satisfies a preset condition, determining that the compressed data exists in the lightweight device;

[0027] When the resource directory information does not contain the second identification information satisfying the preset condition, determining that the compressed data does not exist in the lightweight device;

[0028] The preset condition includes that the second identification information matches the target resource data, and the second identification information is consistent with the first identification information associated therewith.

[0029] Optionally, the interface rendering method further includes:

[0030] When the lightweight device is connected to the server, updating the resource directory information;

[0031] Or, when the identification information of the compressed data in the server changes, the resource directory information is updated.

[0032] Optionally, the interface rendering method further includes:

[0033] When the current interface layout of the display interface is changed to the target interface layout, the resource data in the target interface layout that has changed compared to the current interface layout is determined to be the target resource data, and the step of obtaining the rendering file of the target resource data is performed.

[0034] Optionally, the step of rendering the rendering file to a display interface according to the target interface layout includes:

[0035] Determining a target display area of ​​the target resource data on the display interface according to the target interface layout;

[0036] The rendering file is loaded into the target display area.

[0037] In addition, in order to achieve the above purpose, the present application also proposes an interface rendering method, which is applied to a server, and the interface rendering method includes:

[0038] Get original resource data;

[0039] Processing the original resource data to obtain a rendering file;

[0040] The rendering file is sent to the lightweight device, so that the lightweight device renders the rendering file to a display interface.

[0041] Optionally, the step of processing the original resource data to obtain a rendering file includes:

[0042] Adjusting the original resource data according to the target display parameters to obtain a target resource file;

[0043] The target resource file is decoded and converted into the rendering file.

[0044] Optionally, the rendering file includes a binary file; and / or,

[0045] The step of adjusting the original resource data according to the target display parameters to obtain the target resource file includes: performing a target processing operation on the original resource data according to the target display parameters to obtain the target resource file; wherein the target processing operation includes at least one of the following operations: a rotation operation, a scaling operation, a color adjustment operation, a character style adjustment operation, and a special effect processing operation.

[0046] Optionally, after the step of processing the original resource data to obtain a rendering file, the step further includes:

[0047] Compressing the rendering file into compressed data and storing the compressed data;

[0048] The step of sending the rendering file to the lightweight device includes:

[0049] When a download request corresponding to the compressed data is received, the compressed data is sent to the lightweight device.

[0050] In addition, in order to achieve the above-mentioned purpose, the present application also proposes a lightweight device, which includes: a memory, a processor, and an interface rendering program stored in the memory and runnable on the processor, and when the interface rendering program is executed by the processor, the steps of the interface rendering method described in any one of the above items are implemented.

[0051] In addition, in order to achieve the above-mentioned purpose, the present application also proposes a server, which includes: a memory, a processor, and an interface rendering program stored on the memory and runnable on the processor, and when the interface rendering program is executed by the processor, the steps of the interface rendering method described in any one of the above items are implemented.

[0052] The present invention proposes an interface rendering method, which processes target resource data through a server to obtain a rendering file. After receiving the rendering file, the lightweight device can render the rendering file to a display interface according to the target interface layout. In this process, the page layout is completed locally on the lightweight device, and the server does not need to integrate resources according to the layout, but only needs to process the resource data. Only the rendering file of the resource data required for display needs to be transmitted between the server and the lightweight device, which greatly reduces the amount of data that the lightweight device needs to receive during the interface rendering process, reduces the jamming of the lightweight device during the interface rendering process, improves the interface rendering efficiency of the lightweight device, thereby improving the fluency of the interface rendering process of the lightweight device, and enables the lightweight device to meet diverse interface rendering needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 A schematic diagram of the hardware structure involved in the operation of an embodiment of the interface rendering method of the present invention;

[0054] Figure 2 It is a flow chart of an embodiment of an interface rendering method applied to a lightweight device according to the present invention;

[0055] Figure 3 It is a flowchart of another embodiment of the interface rendering method applied to a lightweight device according to the present invention;

[0056] Figure 4 A flowchart of another embodiment of the interface rendering method of the present invention applied to a lightweight device;

[0057] Figure 5 The figure is a flow chart of an embodiment of an interface rendering method applied to a server according to the present invention.

[0058] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0059] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0060] An embodiment of the present invention provides a lightweight device.

[0061] In this embodiment, the lightweight device 100 satisfies at least one of the following conditions: the main frequency of the processor is less than or equal to 1 gigabit; the capacity of the memory is less than or equal to 1 gigabit; the installed software system is a lightweight operating system (such as a Linux system or an RTOS system, etc.).

[0062] In this embodiment, the lightweight device 100 is a central control device, which can be used to control the operation of one or more smart appliances connected thereto. For example, the lightweight device 100 can be a wire controller in a smart home system, etc. In other embodiments, the lightweight device 100 can also be a smart device with other functions.

[0063] In the embodiment of the present invention, refer to Figure 1 , the lightweight device 100 includes: a processor 1001, such as a CPU, a memory 1002, and a network interface 1003. Among them, these components are connected and communicated through a communication bus. The network interface 1003 can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). The memory 1002 can be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a local memory memory. The memory 1002 can also be a storage device independent of the aforementioned processor 1001.

[0064] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation of the device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0065] like Figure 1 As shown, the memory 1002 as a computer storage medium may include an operating system, a network communication module, and an interface rendering program.

[0066] exist Figure 1 In the device shown, the network interface 1003 is mainly used to connect to the server 200 and communicate data with the server 200; and the processor 1001 can be used to call the interface rendering program stored in the memory 1002 and execute the relevant steps of the interface rendering method applied to lightweight devices in the following embodiments.

[0067] The embodiment of the present invention further provides a server 200 .

[0068] In this embodiment, the server 200 is a cloud server, and the cloud server is connected to the above-mentioned lightweight device through network communication. In other embodiments, the server 200 may also be a local server.

[0069] In the embodiment of the present invention, refer to Figure 1, the server 200 includes: a processor 2001, such as a CPU, a memory 2002, and a network interface 2003. Among them, these components are connected and communicated through a communication bus. The network interface 2003 can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). The memory 2002 can be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a local memory memory. The memory 2002 can also be a storage device independent of the aforementioned processor 2001.

[0070] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation of the device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0071] like Figure 1 As shown, the memory 2002 as a computer storage medium may include an operating system, a network communication module, and an interface rendering program.

[0072] exist Figure 1 In the device shown, the network interface 2003 is mainly used to connect the lightweight device 100 and communicate data with the lightweight device 100; and the processor 2001 can be used to call the interface rendering program stored in the memory 2002 and execute the relevant steps of the interface rendering method applied to the server in the following embodiments.

[0073] The embodiment of the present invention also provides an interface rendering method applied to the above-mentioned lightweight device.

[0074] Reference Figure 2 , an embodiment of the interface rendering method of the present application is proposed. In this embodiment, the interface rendering method includes:

[0075] Step S10, obtaining a rendering file of the target resource data, wherein the rendering file is obtained by processing the target resource data by the server;

[0076] The target resource data is the resource data required for rendering the current interface of the lightweight device. The target resource data here can be one or more, and different target resource data correspond to different rendering files. The target resource data includes but is not limited to: pictures, text, audio, dynamic elements, etc.

[0077] The rendering file may be downloaded from the server by the lightweight device at the current moment, and the rendering file here may be obtained by extracting data transmitted through the real-time transmission channel between the servers. The rendering file may also be downloaded from the server by the lightweight device before the current moment and saved locally, and the rendering file here may be obtained by reading data in the local storage.

[0078] The rendering file is a file that can be directly rendered without processing. In this embodiment, the rendering file is a binary file. In other embodiments, the rendering file can also be a file in other formats that can be directly rendered. The rendering file includes identification information of resource data and pixel information required for rendering.

[0079] The process of the server processing the target resource data to obtain the rendering file can be specifically referred to the relevant schemes mentioned in the embodiment of the interface rendering method applied to the server later, which will not be described in detail here.

[0080] Step S20, rendering the rendering file to a display interface according to the target interface layout.

[0081] The target interface layout is the corresponding relationship between each resource data and the display position during the display interface display process. The target interface layout can be a pre-set layout or a layout determined according to the user input instruction.

[0082] The target display position where the target resource data needs to be displayed is determined according to the target interface layout, and the rendering file is rendered to the target display position.

[0083] An interface rendering method proposed in an embodiment of the present invention processes the target resource data through a server to obtain a rendering file. After receiving the rendering file, the lightweight device can render the rendering file to the display interface according to the target interface layout. In this process, the page layout is completed locally on the lightweight device. The server does not need to integrate the resources according to the layout, but only needs to process the resource data. The server and the lightweight device only need to transmit the rendering file of the resource data required for display, which greatly reduces the amount of data required to be received by the lightweight device during the interface rendering process, reduces the jamming of the lightweight device during the interface rendering process, and improves the interface rendering efficiency of the lightweight device, thereby improving the fluency of the interface rendering process of the lightweight device, so that the lightweight device can meet the diverse interface rendering requirements. In addition, when the display resources of the display interface change, the lightweight device only needs to update the rendering file corresponding to the resource from the server, without the need for the server to re-layout the resources, thereby improving the flexibility of the interface rendering. Among them, when the lightweight device is the above-mentioned central control device, the application of the interface rendering method in this embodiment is conducive to improving the intelligent level of home appliance control, expanding the control capability of the central control device, and improving the user experience.

[0084] Further, based on the above embodiment, another embodiment of the interface rendering method of the present application applied to the above lightweight device is proposed. Figure 3 , the step S10 comprises:

[0085] Step S11, obtaining compressed data corresponding to the rendering file, wherein the compressed data is obtained by compressing the rendering file by the server;

[0086] The compressed data may be downloaded from the server by the lightweight device at the current moment, and the rendering file here may be obtained by extracting the data transmitted through the real-time transmission channel between the servers. The compressed data may also be downloaded from the server by the lightweight device before the current moment and stored locally, and the compressed data here may be obtained by reading the data in the local storage.

[0087] The specific process of the server compressing the rendering file to obtain compressed data can be found in the relevant schemes mentioned in the embodiment of the interface rendering method applied to the server later, which will not be described in detail here.

[0088] Step S12, decompressing the compressed data to obtain the rendering file.

[0089] The compressed data is decompressed into the target area in the lightweight device to obtain a rendering file. The target space here can be the running area loaded when the interface is rendered, or it can be a storage area outside the running area loaded when the interface is rendered. The target area here can be determined according to the configuration file of the lightweight device, and the configuration file includes the selection conditions of the decompression area of ​​the compressed data.

[0090] In one implementation of this embodiment, the compressed data is decompressed to the local memory of the lightweight device to obtain the rendering file. The local memory is an area in the lightweight device for long-term storage of data and instructions, and the data in the local memory will not be lost after the lightweight device is powered off. The local memory in the lightweight device can be a storage chip.

[0091] In another implementation of this embodiment, the compressed data is decompressed into the memory of the lightweight device to obtain the rendering file. The memory is an area in the lightweight device for temporarily storing data and instructions, and the data in the memory will be lost when the lightweight device is powered off.

[0092] In this embodiment, the server processes the rendering file into compressed data, which is beneficial for reducing the requirements for network performance when the lightweight device needs to obtain the rendering file from the server and reducing the operating performance occupied by the lightweight device when receiving large-capacity data, thereby effectively improving data transmission efficiency and improving the operating performance of the lightweight device.

[0093] Furthermore, in this embodiment, step S12 includes: when the usage frequency of the target resource data is greater than a preset frequency, decompressing the compressed data to the local memory of the lightweight device to obtain the rendering file; when the usage frequency of the target resource data is less than or equal to the preset frequency, and / or when the available storage capacity of the local memory is less than a preset capacity, decompressing the compressed data to the memory of the lightweight device to obtain the rendering file.

[0094] The usage frequency status of the target resource data can be determined based on the parameters input by the user, or based on the historical monitoring data of the interface rendering process before the current moment by the lightweight device, or based on the resource type of the target resource data. The usage frequency status includes whether the usage frequency of the target resource data is greater than the preset frequency. Furthermore, the first usage frequency can be determined based on the historical monitoring data, the second usage frequency can be determined based on the resource type, the first weight corresponding to the first usage frequency and the second weight corresponding to the second usage frequency can be determined according to the display position of the target resource data in the target interface layout, and the first usage frequency and the second usage frequency can be weighted averaged according to the first weight and the second weight to obtain the usage frequency of the target resource data.

[0095] The preset frequency can be used as a critical value to distinguish whether the target resource data is frequently used. If the usage frequency is greater than the preset frequency, it indicates that the target resource data is frequently used, and if the usage frequency is less than or equal to the preset frequency, it indicates that the target resource data is not frequently used.

[0096] The preset capacity may specifically be a pre-set fixed capacity, or may be determined according to the actual operation of the lightweight device. For example, the preset capacity may be determined according to the target layout interface.

[0097] In this embodiment, when the target resource data needs to be used frequently, the rendering file is decompressed to the local memory. When the target resource data does not need to be used frequently and / or the available capacity of the local memory is insufficient, the rendering file is decompressed to the memory, thereby improving the interface rendering efficiency while reducing unnecessary storage space occupation of the lightweight device and improving the performance of the lightweight device.

[0098] Furthermore, in the present embodiment, the step of rendering the rendering file to the display interface according to the target interface layout includes: when the rendering file is located in the local memory, copying the rendering file to the memory, and loading the rendering file in the memory according to the target interface layout to display the target resource data on the display interface; when the rendering file is located in the memory, loading the rendering file in the memory according to the target interface layout to display the target resource data on the display interface.

[0099] In this embodiment, through the above method, it can be ensured that the rendering file is decompressed in the local storage or the memory, and the rendering file can be loaded from the memory for interface display. Among them, loading the rendering file from the memory for interface rendering is beneficial to improving the efficiency of interface rendering.

[0100] Further, based on any of the above embodiments, another embodiment of the interface rendering method of the present application applied to the above lightweight device is proposed. Figure 4 , the step S11 comprises:

[0101] Step S111, determining whether the compressed data exists in the lightweight device;

[0102] The compressed data may include identification information of the corresponding resource data, and the data in the lightweight device may be searched according to the target identification information of the target resource data to determine whether there is data whose identification information matches the target identification information as the compressed data corresponding to the target resource data.

[0103] Specifically, it may be determined whether compressed data exists in the local memory of the lightweight device.

[0104] Step S112, when the compressed data is stored in the lightweight device, reading the compressed data stored locally in the lightweight device, where the compressed data stored locally in the lightweight device is downloaded from the server before the current moment;

[0105] The lightweight device may download the compressed data of the rendering file corresponding to the resource data from the server before the current moment and store it in the local storage.

[0106] Step S113: when the compressed data does not exist in the lightweight device, download the compressed data from the server.

[0107] In this embodiment, when compressed data exists in the lightweight device, the compressed data is directly read from the local device. When the compressed data does not exist in the lightweight device, the compressed data is downloaded from the server, thereby effectively reducing the data transmission between the lightweight device and the server and further improving the efficiency of the lightweight device in interface rendering.

[0108] Further, in this embodiment, step S111 includes: obtaining resource directory information, the resource directory information including first identification information corresponding to the compressed data stored in the server, second identification information corresponding to the compressed data stored locally in the lightweight device, and an association relationship between the first identification information and the second identification information; when there is second identification information that meets a preset condition in the resource directory information, determining that the compressed data exists in the lightweight device; when there is no second identification information that meets the preset condition in the resource directory information, determining that the compressed data does not exist in the lightweight device; wherein the preset condition includes that the second identification information matches the target resource data, and the second identification information is consistent with the first identification information associated with it.

[0109] The resource directory information includes all first identification information corresponding to all compressed data stored in the server, all second identification information corresponding to the compressed data stored locally in the lightweight device, and the above-mentioned association relationship.

[0110] The first identification information and the second identification information are both used to identify resource data corresponding to the compressed data. Different resource data corresponds to different first identification information and second identification information.

[0111] The first identification information is the information sent by the server, and the second identification information is formed when the lightweight device downloads the compressed data from the server and saves it in the local storage and then saves the corresponding first identification information into the resource directory information. The association relationship is the relationship obtained by associating the second identification information with the first identification information of the compressed data in the corresponding server after it is formed.

[0112] When the compressed data is deleted in the lightweight device, the corresponding second identification information and the corresponding association relationship will be deleted in the resource directory information.

[0113] When the compressed data stored in the server changes, the corresponding first identification information will change, and the corresponding first identification information in the resource directory information will also change accordingly.

[0114] The second identification information matches the target resource data, indicating that the lightweight device has compressed data corresponding to the target resource data. The second identification information is consistent with the first identification information associated with it, indicating that the compressed data corresponding to the target resource data in the lightweight device type is consistent with the compressed data corresponding to the target resource data in the server, indicating that the compressed data corresponding to the target resource data currently existing in the current lightweight device is accurate. Only then is it determined that the compressed data exists in the lightweight device. Otherwise, it is considered that the lightweight device does not have compressed data corresponding to the target resource data, thereby improving the efficiency of the lightweight device interface rendering while improving the accuracy of the interface rendering.

[0115] Furthermore, in this embodiment, the interface rendering method also includes: when the lightweight device is connected to the server, updating the resource directory information; or, when the identification information of the compressed data in the server changes, updating the resource directory information.

[0116] When the lightweight device is connected to a server, the lightweight device can receive the first identification information of all compressed data stored by the server. When the received first identification information is consistent with the corresponding first identification information in the resource directory information, the corresponding first identification information in the resource directory information remains unchanged. When the received first identification information is inconsistent with the corresponding first identification information in the resource directory information, the corresponding first identification information in the resource directory information is replaced with the received first identification information, wherein the above-mentioned association relationship before and after the first identification information in the resource directory information is updated remains unchanged.

[0117] When the identification information of the compressed data in the server changes, it indicates that the corresponding original resource data has changed. At this time, the server can send the identification information before and after the compressed data changes to the lightweight device, and the lightweight device can update the first identification information in the resource target information that is consistent with the received identification information before the change to the received identification information after the change.

[0118] In this embodiment, the above method is helpful to ensure that the resource directory information can accurately reflect the resources currently allowed to be provided by the server, the resources currently existing on the lightweight device, and the consistency between the two, and ensure that based on the resource directory information, it can be accurately determined whether it is necessary to download resources from the server for rendering, thereby improving the efficiency of lightweight device interface rendering while further improving the accuracy of interface rendering.

[0119] Further, based on any of the above embodiments, another embodiment of the interface rendering method of the present application applied to the above lightweight device is proposed. In this embodiment, when the current interface layout of the display interface is changed to the target interface layout, the resource data in the target interface layout that has changed compared to the current interface layout is determined to be the target resource data, and the step of obtaining the rendering file of the target resource data is performed.

[0120] In this embodiment, when the page layout changes, the changed resource data is rendered in a timely manner, which is beneficial to improving the accuracy of the timeliness of interface rendering.

[0121] Furthermore, in this embodiment, the step of rendering the rendering file to the display interface according to the target interface layout includes: determining a target display area of ​​the target resource data on the display interface according to the target interface layout; and loading the rendering file to the target display area.

[0122] In this embodiment, only the changed resource data needs to be re-rendered according to the target interface layout, and the server does not need to reintegrate all resources according to the layout to obtain a new rendering file, which effectively improves the flexibility and efficiency of interface rendering.

[0123] The embodiment of the present invention also provides an interface rendering method applied to the above server.

[0124] Reference Figure 5 , an embodiment of the interface rendering method of the present application applied to the above-mentioned server is proposed. In this embodiment, the interface rendering method includes:

[0125] Step S100, obtaining original resource data;

[0126] The original resource data is the alternative resource data provided by the interface display of the lightweight device. The data type of the original resource data is the same as the data type of the above-mentioned target resource data, which will not be described in detail here. The number of original resource data is multiple.

[0127] The original resource data required for rendering the current interface of the lightweight device is the above-mentioned target resource data.

[0128] The original resource data can be obtained by the server through the network, can be input by the server based on human-computer interaction, or can be read by the server from an external storage device connected to the server.

[0129] Step S200, processing the original resource data to obtain a rendering file;

[0130] The target processing method can be determined according to the type of the original resource data, the display requirements of the lightweight device and the type of the lightweight device, and the original resource data is processed according to the currently determined processing method to obtain a rendering file.

[0131] Step S300: sending the rendering file to a lightweight device, so that the lightweight device renders the rendering file to a display interface.

[0132] In this embodiment, when the rendering file is the rendering file corresponding to the target resource data, the rendering file can be sent to the lightweight device upon receiving a request from the lightweight device.

[0133] In this embodiment, the server only processes the original resource data to obtain the rendering file and then sends it to the lightweight device. There is no need to integrate the rendering file according to the layout required by the lightweight to obtain the rendering result corresponding to the overall display interface. Only the resource data needs to be processed. Only the rendering file of the resource data required for display needs to be transmitted between the server and the lightweight device, which greatly reduces the amount of data that the lightweight device needs to receive during the interface rendering process, reduces the freeze of the lightweight device during the interface rendering process, improves the interface rendering efficiency of the lightweight device, and thus improves the smoothness of the interface rendering process of the lightweight device, so that the lightweight device can meet the diverse interface rendering needs.

[0134] Furthermore, in this embodiment, the step of processing the original resource data to obtain a rendering file includes: adjusting the original resource data according to target display parameters to obtain a target resource file; decoding the target resource file and converting it into the rendering file.

[0135] The target display parameters specifically represent the display requirements of the lightweight device. The target display parameters may include but are not limited to: target display color, target display size, target display direction, target dynamic effect, etc.

[0136] In this embodiment, the step of adjusting the original resource data according to the target display parameters to obtain the target resource file includes: performing a target processing operation on the original resource data according to the target display parameters to obtain the target resource file; wherein the target processing operation includes at least one of the following operations: a rotation operation, a scaling operation, a color adjustment operation, a character style adjustment operation, and a special effect processing operation.

[0137] In this embodiment, the rendering file is a file that can be directly rendered without processing. In this embodiment, the rendering file is a binary file. In other embodiments, the rendering file can also be a file in other formats that can be directly rendered. The rendering file includes identification information of resource data and pixel information required for rendering.

[0138] In this embodiment, the relevant preprocessing, decoding and other data processing processes before the resource data is formed into a rendering file require a large amount of processor resources. These processes with high requirements on processor performance are all executed in the server, thereby effectively solving the defect of lightweight devices that are incompatible with diverse resources due to hardware performance limitations, allowing the display interface of lightweight devices to use more different types of resources, thereby improving the diversity of lightweight device interface rendering.

[0139] In other embodiments, the original resource file without decoding can also be directly converted into a rendering file.

[0140] Furthermore, in this embodiment, after the step of processing the original resource data to obtain the rendering file, the step further includes: compressing the rendering file into compressed data and storing it. The step of sending the rendering file to the lightweight device includes: when receiving a download request corresponding to the compressed data, sending the compressed data to the lightweight device.

[0141] Among them, when the compressed data is the compressed data corresponding to the above-mentioned target resource data, the lightweight device can send a download request here to the server.

[0142] In this embodiment, the server processes the rendering file into compressed data and stores it, which helps to save the server's storage space and enables the server to store more diverse resources for interface rendering of lightweight devices. The compressed data is sent to the lightweight device instead of directly sending the rendering file to the lightweight device. This helps to reduce the requirements for network performance when the lightweight device needs to obtain the rendering file from the server and reduce the operating performance occupied by the lightweight device when receiving large-capacity data, thereby effectively improving data transmission efficiency and improving the operating performance of the lightweight device.

[0143] In other embodiments, the rendering file may be directly stored, and when a download request is received, the rendering file is sent to the lightweight device.

[0144] In addition, an embodiment of the present invention further provides a storage medium, on which an interface rendering program is stored. When the interface rendering program is executed by a processor, the relevant steps of any embodiment of the above interface rendering method are implemented.

[0145] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0146] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0147] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0148] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. An interface rendering method, characterized in that: Applied to lightweight devices, the interface rendering method includes the following steps: Acquire a rendering file of target resource data, wherein the rendering file is obtained by processing the target resource data by the server; The rendering file is rendered to a display interface according to the target interface layout.

2. The interface rendering method according to claim 1, characterized in that: The step of obtaining the rendering file of the target resource data comprises: Obtaining compressed data corresponding to the rendering file, where the compressed data is obtained by compressing the rendering file by the server; The compressed data is decompressed to obtain the rendering file.

3. The interface rendering method according to claim 2, characterized in that: The step of decompressing the compressed data to obtain the rendering file comprises: Decompressing the compressed data to the local memory of the lightweight device to obtain the rendering file; Or, decompress the compressed data into the memory of the lightweight device to obtain the rendering file.

4. The interface rendering method according to claim 3, characterized in that: The step of decompressing the compressed data to obtain the rendering file comprises: When the usage frequency of the target resource data is greater than a preset frequency, decompressing the compressed data to a local memory of the lightweight device to obtain the rendering file; When the usage frequency of the target resource data is less than or equal to the preset frequency, and / or when the available storage capacity of the local memory is less than the preset capacity, the compressed data is decompressed to the memory of the lightweight device to obtain the rendering file.

5. The interface rendering method according to claim 3, characterized in that: The step of rendering the rendering file to the display interface according to the target interface layout comprises: When the rendering file is located in the local memory, copying the rendering file to the memory, and loading the rendering file in the memory according to the target interface layout to display the target resource data on the display interface; When the rendering file is located in the memory, the rendering file in the memory is loaded according to the target interface layout to display the target resource data on the display interface.

6. The interface rendering method according to claim 2, characterized in that: The step of obtaining the compressed data corresponding to the rendering file comprises: Determining whether the compressed data exists in the lightweight device; When the compressed data is stored in the lightweight device, reading the compressed data stored locally in the lightweight device, where the compressed data stored locally in the lightweight device is downloaded from the server before the current moment; When the compressed data does not exist in the lightweight device, the compressed data is downloaded from the server.

7. The interface rendering method according to claim 6, characterized in that: The step of determining whether the compressed data exists in the lightweight device comprises: Acquire resource directory information, the resource directory information including first identification information corresponding to the compressed data stored by the server, second identification information corresponding to the compressed data stored locally by the lightweight device, and an association relationship between the first identification information and the second identification information; When the resource directory information contains second identification information that satisfies a preset condition, determining that the compressed data exists in the lightweight device; When the resource directory information does not contain the second identification information satisfying the preset condition, determining that the compressed data does not exist in the lightweight device; The preset condition includes that the second identification information matches the target resource data, and the second identification information is consistent with the first identification information associated therewith.

8. The interface rendering method according to claim 7, characterized in that: The interface rendering method further includes: When the lightweight device is connected to the server, updating the resource directory information; Or, when the identification information of the compressed data in the server changes, the resource directory information is updated.

9. The interface rendering method according to any one of claims 1 to 8, characterized in that: The interface rendering method also includes: When the current interface layout of the display interface is changed to the target interface layout, the resource data in the target interface layout that has changed compared to the current interface layout is determined to be the target resource data, and the step of obtaining the rendering file of the target resource data is performed.

10. The interface rendering method according to claim 9, characterized in that: The step of rendering the rendering file to the display interface according to the target interface layout comprises: Determining a target display area of ​​the target resource data on the display interface according to the target interface layout; The rendering file is loaded into the target display area.

11. An interface rendering method, characterized in that: Applied to the server, the interface rendering method includes: Get original resource data; Processing the original resource data to obtain a rendering file; The rendering file is sent to the lightweight device, so that the lightweight device renders the rendering file to a display interface.

12. The interface rendering method according to claim 11, characterized in that: The step of processing the original resource data to obtain a rendering file comprises: Adjusting the original resource data according to the target display parameters to obtain a target resource file; The target resource file is decoded and converted into the rendering file.

13. The interface rendering method according to claim 11, characterized in that: The rendering file includes a binary file; and / or, The step of adjusting the original resource data according to the target display parameters to obtain the target resource file includes: performing a target processing operation on the original resource data according to the target display parameters to obtain the target resource file; wherein the target processing operation includes at least one of the following operations: a rotation operation, a scaling operation, a color adjustment operation, a character style adjustment operation, and a special effect processing operation.

14. The interface rendering method according to any one of claims 11 to 13, characterized in that: After the step of processing the original resource data to obtain a rendering file, the method further includes: Compressing the rendering file into compressed data and storing the compressed data; The step of sending the rendering file to the lightweight device includes: When a download request corresponding to the compressed data is received, the compressed data is sent to the lightweight device.

15. A lightweight device, characterized in that: The lightweight device comprises: a memory, a processor, and an interface rendering program stored in the memory and executable on the processor, wherein the interface rendering program implements the steps of the interface rendering method according to any one of claims 1 to 10 when executed by the processor.

16. A server, characterized in that: The server comprises: a memory, a processor, and an interface rendering program stored in the memory and executable on the processor, wherein the interface rendering program implements the steps of the interface rendering method according to any one of claims 11 to 14 when executed by the processor.

Citation Information

Cited By

  • QuickJS multi-interface collaborative optimization method and system of embedded device

    CN120973458A

  • Multi-interface collaborative optimization method and system for quickjs of embedded device

    CN120973458B

  • Image detection interaction method, device and equipment for application interface in local area network based on YTS engine

    CN121000932A