Container engine-based rendering method, device, equipment and storage medium

By using the container engine to build container views and generate display pages on the device side, the problem of data transmission on the cloud and device side affecting the rendering effect is solved, and efficient rendering effect optimization is achieved.

CN112835582BActive Publication Date: 2025-01-10BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110262279.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-10
Publication Date
2025-01-10
Estimated Expiration
2041-03-10

AI Technical Summary

Technical Problem

During the rendering process, the data transmission speed and network factors between the cloud and the device side affect the rendering effect, and the large amount of computing on the device side leads to poor rendering effect.

Method used

The rendering method based on the container engine is adopted. By obtaining the container engine on the device side, the container view is built and the display page is generated, and the container engine is multiplexed to reduce the calculation amount and improve the rendering speed and effect.

Benefits of technology

By reusing the container engine, the rendering calculation amount on the device side is reduced, the rendering speed and effect are improved, and the rendering process is optimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112835582B_ABST
    Figure CN112835582B_ABST
Patent Text Reader

Abstract

The present disclosure provides a rendering method, apparatus, device and storage medium based on a container engine, which relates to computer technology fields such as smart devices, cloud services, and rendering. The specific implementation scheme is: obtaining a container engine on the device side based on rendered data; using the container engine to construct a container view based on the rendered data; using the container view to generate a display page on the device side based on the rendered data. The embodiment of the present disclosure utilizes a container engine on the device side to construct a container view based on the rendered data, and then generates a display page on the device side to display the required rendering effect. Since the container engine on the device side can be reused, the amount of calculation required for rendering can be reduced, the rendering speed can be increased, and the rendering effect can be optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to the fields of smart devices, cloud services, and rendering. Background Art

[0002] In related technologies, the rendering process mainly includes compiling the files to be rendered and converting them into user-visible results. The files can be compiled in the cloud, and then the compiled code is sent to the device to display the rendering effect. In this process, a large amount of data needs to be transmitted between the cloud and the device. Factors such as network, transmission speed, and data loss will affect the rendering effect. The large amount of calculation required for rendering on the device side may also affect the rendering effect. Summary of the invention

[0003] The present disclosure provides a rendering method, apparatus, device and storage medium based on a container engine.

[0004] According to one aspect of the present disclosure, a rendering method based on a container engine is provided, comprising: obtaining a container engine on a device side based on rendered data; using the container engine to construct a container view based on the rendered data; and using the container view to generate a display page on the device side based on the rendered data.

[0005] According to another aspect of the present disclosure, a rendering device based on a container engine is provided, comprising: an engine acquisition unit, used to acquire a container engine on a device side based on rendered data; a view construction unit, using the container engine to construct a container view based on the rendered data; and a page generation unit, using the container view to generate a display page on the device side based on the rendered data.

[0006] According to another aspect of the present disclosure, there is provided an electronic device, comprising:

[0007] at least one processor; and

[0008] a memory communicatively connected to the at least one processor; wherein,

[0009] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method in any embodiment of the present disclosure.

[0010] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided. The computer instructions are used to enable a computer to execute the method in any embodiment of the present disclosure.

[0011] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method in any embodiment of the present disclosure is implemented.

[0012] According to the technology disclosed in the present invention, a container view can be constructed based on the rendered data using a container engine on the device side, thereby generating a display page on the device side to display the required rendering effect. Since the container engine on the device side can be reused, the amount of calculation required for rendering can be reduced, the rendering speed can be increased, and the rendering effect can be optimized.

[0013] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0015] Figure 1 is a flowchart of a rendering method based on a container engine according to an embodiment of the present disclosure;

[0016] Figure 2 is a flowchart of a rendering method based on a container engine according to another embodiment of the present disclosure;

[0017] Figure 3 is a block diagram of a rendering device based on a container engine according to an embodiment of the present disclosure;

[0018] Figure 4 is a block diagram of a rendering device based on a container engine according to another embodiment of the present disclosure.

[0019] Figure 5 is a schematic diagram of an ACE system according to an embodiment of the present disclosure being arranged on a smart device;

[0020] Figure 6 is a schematic diagram of the workflow of a page container engine according to an embodiment of the present disclosure;

[0021] Figure 7 is another schematic diagram of the workflow of the page container engine according to an embodiment of the present disclosure;

[0022] Figure 8 is a schematic diagram of the workflow of a dialog container engine according to an embodiment of the present disclosure;

[0023] Fig. 9 is a schematic diagram of the workflow of the mini-program container engine according to an embodiment of the present disclosure;

[0024] Fig.10is a schematic diagram of components of an embodiment of the present disclosure;

[0025] Fig.11 is a schematic block diagram of an example electronic device for implementing an embodiment of the present disclosure. DETAILED DESCRIPTION

[0026] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0027] Figure 1 : is a flowchart of a rendering method based on a container engine according to an embodiment of the present disclosure. The method may include:

[0028] S101, obtaining a container engine on a device based on rendered data;

[0029] S102, using the container engine to construct a container view based on the rendered data;

[0030] S103: Generate a display page on the device side based on the rendered data using the container view.

[0031] Exemplarily, the device side may include an intelligent device capable of display. For example, various voice intelligent devices with screens. The operating system of the device side may include a container engine system, which may include a cross-process processing module, a rendering module, a container module, a device-side capability module, etc. The communication module of the system may be called a cross-process processing module, which can communicate with the client. The container module can obtain various types of container engines. For example, a page container engine, a dialog container engine, a mini-app container engine, etc. The container engine can provide a script runtime environment, etc. The container engine can also be called an application container engine, an application container, a container instance, an application container instance, an engine instance, a container, an engine, etc. The client may include an application program, a mini-program, etc. The client may include a communication module, a collection of component description information, etc. The device side may include a communication module, a rendering module, a container module, etc. The device-side capability module may provide various end capabilities (also referred to as skills) to support various end-capability calls on the device side during the rendering process. For example, microphones, speakers, cameras, face recognition, speech recognition, gesture recognition, gaze recognition, cloud services, etc.

[0032] The method of this embodiment can be used in a container engine system, for example, it can be specifically applied to a container module. The container module can obtain rendered data (or pre-rendered data) in a variety of ways, as shown below:

[0033] For example, the cross-process processing module can send the script that needs to be rendered to the rendering module through the instruction processing module. The rendering module runs the script to obtain rendered data, and then sends the rendered data to the container module.

[0034] For another example, the instruction processing module can parse the rendering instruction in the cloud to obtain the rendered data, and then send it to the rendering module. Then, the rendering module sends the rendered data to the container module. The instruction processing module can also directly send the rendered data to the container module.

[0035] After the container module obtains the rendered data from the instruction processing module, the rendering module, etc., it can obtain the container engine required for rendering from various container engines supported by the device based on the rendered data. The container engine can build the container view required for rendering based on the rendered data, and load the executable code of the components required for rendering in the container view based on the rendered data, and generate a display page that can show the rendering effect on the screen of the device.

[0036] In the disclosed embodiment, a container engine on the device side can be used to construct a container view based on the rendered data, thereby generating a display page on the device side to display the desired rendering effect. Since the container engine on the device side can be reused, the amount of calculation required for rendering can be reduced, the rendering speed can be increased, and the rendering effect can be optimized.

[0037] Figure 2 1 is a flowchart of a rendering method based on a container engine according to another embodiment of the present disclosure. The method of this embodiment may include the steps of the above embodiment. In one implementation, the rendered data includes an engine identifier, container view information, and component information.

[0038] In one implementation, obtaining a container engine on a device based on rendered data includes: S201, searching for a corresponding container engine based on the engine identifier;

[0039] Using the container engine to construct a container view based on the rendered data includes: S202, using the container engine to construct a container view based on the container view information;

[0040] The display page of the device is generated based on the rendered data using the container view, including: S203, executing the executable code corresponding to the component information to load the graphic component corresponding to the component information in the container view to generate a display page.

[0041] In this embodiment, the required container engine can be found using the engine identifier included in the rendered data, and the container engine can construct a container view using the container view information, execute the executable code corresponding to each component information, and load the graphic component corresponding to each component information in the container view, thereby forming a display page with the required component. Since the container engine, container view, components, etc. can be reused, the amount of calculation required for device-side rendering can be significantly reduced, the rendering speed can be improved, and the rendering effect can be optimized.

[0042] The following describes the rendering process according to different types of container engines.

[0043] In one implementation, the container engine is a page container engine, and obtaining the container engine based on the rendered data includes at least one of the following:

[0044] Acquire an already opened page container engine based on the rendered data;

[0045] When it is determined based on the rendered data that there is no opened page container engine, a new page container engine corresponding to the rendered data is started.

[0046] For example, based on the engine identifier in the rendered data, find out whether there is an already opened page container engine corresponding to the engine identifier. If an already opened page container engine corresponding to the engine identifier is not found, a new page container engine corresponding to the engine identifier in the rendered data can be started. If an already opened page container engine corresponding to the engine identifier is found, the already opened page container engine corresponding to the engine identifier can be used to perform subsequent steps without starting a new page container engine.

[0047] After obtaining the page container engine based on the engine identifier in the rendered data, the page container view is constructed based on the container view information using the page container engine. The executable code corresponding to the component information is executed to load the graphic component corresponding to the component information in the page container view to generate a website page that can be displayed on the screen.

[0048] By determining whether there is an already opened page container engine, the already opened page container engine is used to build a container view and generate a website page that can be displayed on the screen, thereby saving the computing resources of the operating system, further reducing the amount of computing required for device-side rendering, improving the rendering speed, and optimizing the rendering effect.

[0049] In one implementation, the method further includes: stacking the original page.

[0050] For example, the previously displayed website page can be pushed into the stack and saved. The newly generated website page can be displayed at present. If you need to return to the previously displayed website page, you can close the currently displayed website page or push the currently displayed website page into the stack and control the previously displayed website page to be popped out of the stack. The original page can be saved in the stack by pushing the stack and can be popped out as needed. The stack can be used to reuse some pages, further reducing the amount of calculation required for device-side rendering, improving rendering speed, and optimizing rendering effects.

[0051] In one embodiment, the method further includes: comparing whether the background attributes of the page container engine to be started in the rendered data are consistent with the background attributes of the current page container engine; if they are inconsistent, starting a new page container engine.

[0052] Determine whether to start a new page container engine based on background properties. If the background properties of the rendering instructions or rendered data are consistent with the background properties of the currently opened page container engine, for example, both are transparent properties, use the currently opened page container engine. Otherwise, start a new page container engine. Therefore, based on the background properties, the already opened page container engine can be reasonably reused, saving the computing resources of the operating system, further reducing the amount of computing required for device-side rendering, improving the rendering speed of website pages, and optimizing the rendering effect.

[0053] In one implementation, the container engine is a dialog container engine, and obtaining the container engine based on the rendered data includes at least one of the following:

[0054] If it is determined based on the rendered data that there is an already opened dialog container engine, closing the already opened dialog container engine, and starting a new dialog container engine based on the rendered data;

[0055] If it is determined based on the rendered data that there is no already opened page container engine, a new dialog container engine is started based on the rendered data.

[0056] For example, based on the engine identifier in the rendered data, find out whether there is an already opened dialog container engine corresponding to the engine identifier. If the dialog container engine corresponding to the engine identifier is not found to open the dialog box, the new dialog container engine corresponding to the engine identifier can be directly started. If the already opened dialog container engine corresponding to the engine identifier is found, the already opened dialog container engine corresponding to the engine identifier is first closed, and then the new dialog container engine is started. Closing the previous dialog container engine can reduce the interference of other dialog boxes on the dialog page displayed on the screen. Without closing the previous dialog container engine, the display effect of multiple dialog pages can also be supported.

[0057] After obtaining the dialog container engine based on the engine identifier in the rendered data, the dialog container view is constructed based on the container view information using the dialog container engine. The executable code corresponding to the component information is executed to load the graphic component corresponding to the component information in the dialog container view to generate a dialog page that can be displayed on the screen.

[0058] In one embodiment, the method further includes: adding a dialog container view constructed by a dialog container engine to a window management module; registering a component set corresponding to the dialog container view to obtain description information of each graphic component that needs to be displayed in the dialog container view; and loading each of the graphic components in the dialog container view based on the description information of the graphic components that need to be displayed in the dialog container view.

[0059] In this embodiment, the dialog box (Dialog) may also be referred to as a pop-up window, a pop-up box, etc. The window management module may manage various dialog container views. Each dialog container view may need to display one or more graphic components. For example, a selection type dialog container view needs to include button components for various options. For another example, an input type dialog container view needs to include one or more input box components. For another example, an interactive type dialog container view needs to include one or more video or dynamic image components. The dialog container views can be centrally managed through the window management module, and the registered component set can obtain the description information of each graphic component that needs to be displayed in the dialog container view, so that the dialog page displayed on the screen can have a rich rendering effect.

[0060] In one implementation, the container engine is a mini-program container engine, and obtaining the container engine based on the rendered data includes at least one of the following:

[0061] If it is determined based on the rendered data that there is an already opened mini-program container engine, jump to the already opened mini-program container engine;

[0062] If it is determined based on the rendered data that there is no opened applet container engine, a new applet container engine is opened.

[0063] For example, based on the engine identifier in the rendered data, find out whether there is an already opened mini-program container engine corresponding to the engine identifier. If an already opened mini-program container engine corresponding to the engine identifier is not found, a new mini-program container engine corresponding to the engine identifier in the rendered data can be started. If an already opened page container engine corresponding to the engine identifier is found, the already opened page container engine corresponding to the engine identifier can be used for subsequent steps without creating a new page container engine.

[0064] After obtaining the mini-program container engine based on the engine identifier in the rendered data, the mini-program container view is constructed based on the container view information using the mini-program container engine. The executable code corresponding to the component information is executed to load the graphic component corresponding to the component information in the mini-program container view to generate a mini-program page that can be displayed on the screen.

[0065] By determining whether there is an already opened mini-program container engine, it is possible to use the already opened mini-program container engine to build a mini-program view and generate a mini-program page that can be displayed on the screen, without having to repeatedly start a new mini-program container engine, saving the computing resources of the operating system, further reducing the amount of computing required for device-side rendering, improving the rendering speed of the mini-program page, and optimizing the rendering effect.

[0066] In one embodiment, the method further comprises at least one of the following:

[0067] When the mini-program container engine determines that there is a cached mini-program page, obtaining the cached mini-program page;

[0068] When the mini-program container engine determines that there is no cached mini-program page, the mini-program framework is used to load the rendered code corresponding to the mini-program script.

[0069] For example, if the mini-program page that needs to be displayed is cached in the rendered code corresponding to the mini-program script, the mini-program container engine can load the mini-program page to display it on the device screen. If the mini-program page that needs to be displayed is not cached, the script page code included in the rendered code can be passed in through the mini-program framework, and the mini-program page corresponding to the script page code can be loaded to display it on the device screen. If there is a cached mini-program page, the cached mini-program page can be displayed directly without repeated calculations, which can save the computing resources of the operating system, further reduce the amount of computing required for device-side rendering, increase the rendering speed of the mini-program page, and optimize the rendering effect.

[0070] Figure 3 : is a block diagram of a rendering device based on a container engine according to an embodiment of the present disclosure. The device may include:

[0071] The engine acquisition unit 301 is used to acquire the container engine of the device based on the rendered data;

[0072] A view construction unit 302 constructs a container view based on the rendered data using the container engine;

[0073] The page generating unit 303 generates a display page on the device side based on the rendered data by using the container view.

[0074] Figure 4 is a block diagram of a rendering device based on a container engine according to another embodiment of the present disclosure. The device of this embodiment may include the components of the above-mentioned device embodiment. In one implementation, the rendered data includes an engine identifier, container view information, and component information;

[0075] The engine acquisition unit 301 is specifically used to search for a corresponding container engine based on the engine identifier;

[0076] The view building unit 302 is specifically configured to build a container view based on the container view information;

[0077] The page generating unit 303 is specifically used to execute the executable code corresponding to the component information, so as to load the graphic component corresponding to the component information in the container view and generate a display page.

[0078] In one implementation, the container engine is a page container engine, and the engine acquisition unit 301 includes:

[0079] The page container engine obtains a subunit 3011, which is used to perform at least one of the following steps:

[0080] Acquire an already opened page container engine based on the rendered data;

[0081] When it is determined based on the rendered data that there is no opened page container engine, a new page container engine corresponding to the rendered data is started.

[0082] In one implementation, the device further includes: a stacking unit 401, configured to perform stacking processing on the original page.

[0083] In one implementation, the page container engine acquisition subunit is further used to compare whether the background attributes of the page container engine to be started in the rendered data are consistent with the background attributes of the current page container engine; if they are inconsistent, start a new page container engine.

[0084] In one implementation, the container engine is a dialog container engine, and the engine acquisition unit 301 includes:

[0085] The dialog container engine obtains a subunit 3012, which is used to perform at least one of the following steps:

[0086] If it is determined based on the rendered data that there is an already opened dialog container engine, closing the already opened dialog container engine, and starting a new dialog container engine based on the rendered data;

[0087] If it is determined based on the rendered data that there is no already opened page container engine, a new dialog container engine is started based on the rendered data.

[0088] In one embodiment, the device further comprises:

[0089] An adding unit 402, configured to add the dialog container view constructed by the dialog container engine to the window management module;

[0090] A registration unit 403 is used to register a component set corresponding to the dialog container view, and obtain description information of each graphic component that needs to be displayed in the dialog container view;

[0091] The loading unit 404 is configured to load each of the graphic components in the dialog container view based on the description information of the graphic components that need to be displayed in the dialog container view.

[0092] In one implementation, the container engine is a mini-program container engine, and the engine acquisition unit 301 includes:

[0093] The applet container engine obtains a subunit 3013, which is used to perform at least one of the following steps:

[0094] If it is determined based on the rendered data that there is an already opened mini-program container engine, jump to the already opened mini-program container engine;

[0095] If it is determined based on the rendered data that there is no opened applet container engine, a new applet container engine is opened.

[0096] In one embodiment, the device further comprises at least one of the following:

[0097] A cache unit 405 is used to obtain a cached mini-program page if the mini-program container engine determines that there is a cached mini-program page;

[0098] The code unit 406 is used to use the mini-program framework to load the rendered code corresponding to the mini-program script when the mini-program container engine determines that there is no cached mini-program page.

[0099] The functions of each unit and sub-unit in each device of the embodiments of the present disclosure can be found in the corresponding description in the above method embodiments, and will not be repeated here.

[0100] In an application example, a smart device with a screen, such as a voice-activated smart device such as a smart speaker, may include an Application Container Engine (ACE) system. The ACE system may be an embedded application system. Figure 5 As shown, the system mainly includes the following parts:

[0101] 1. Client communication management module. For example Figure 5 In the screen voice intelligent device, the client communication management module may be a cross-process rendering management module (which may also be referred to as a client rendering management module, a client management module, a cross-process management module, etc., which is an example of a cross-process processing module in the above method embodiment). The cross-process rendering management module may communicate with the client.

[0102] Optionally, the ACE system may also include a client (which may be referred to as an ACE system client, a client plug-in, a client module, etc.). The ACE system client may be set in other applications that require dynamic rendering of content. For example, the installation package of a third-party access application (APP), such as APK, may integrate the ACE system client, which may be installed or downloaded to the device to run. The client may interact with other modules through the cross-process rendering management module of the ACE system. The client may include a communication module (such as an instruction receiving end), a component set (a collection of component description information), an instruction execution module (such as an instruction executor), etc.

[0103] 2. An instruction parsing and distribution module (or an instruction parsing and distribution subsystem, a protocol parsing and distribution subsystem, etc., which is an example of an instruction processing module in the above method embodiment) is used to parse and distribute instructions based on the system protocol. For example, the instruction transceiver service module can receive rendering instructions from the cloud (also known as cloud service, cloud service, etc.) or the client. After the instruction parsing and distribution module parses the rendering instruction to obtain the rendered data, it can distribute the rendered data to the container module for processing. The instruction parsing and distribution module can also transmit the rendered data to the container module through the rendering module.

[0104] For example, the cloud can compile the content to be rendered into various rendering instructions and send them to the instruction transceiver service module on the device side. The instruction transceiver service module can communicate with the cloud and receive rendering instructions from the cloud. The rendering instructions may be compiled code, mainly including layout-related information, etc., with a small amount of data. The instruction transceiver service module sends the rendering instructions from the cloud to the instruction processing module. After receiving the rendering instructions, the instruction processing module can parse the rendering instructions to obtain the rendered data. In this way, the rendering effect is achieved between the cloud and the device side through rendering instructions, without the need to transmit a large amount of data content. The required rendering effect can be achieved by transmitting a small amount of data through rendering instructions. Similarly, the client can also achieve the required rendering effect on the device side by transmitting a small amount of data through rendering instructions.

[0105] 3. Device-side capability module (or called end capability module, device-side capability subsystem, end capability subsystem, etc.). During the rendering process, it may be necessary to call various capabilities of the device (also called skills). The end capability module can receive the end capability call instruction from the instruction parsing and distribution module, and send the corresponding call instruction to the device-side system service module according to the end capability call instruction. For example, the instruction to turn on the microphone, the instruction to turn on the camera, etc. End capabilities can include many types, such as hardware capabilities, intelligent services, and cloud services.

[0106] Furthermore, if the device-side service capability called by the device-side capability calling instruction based on the device-side capability has a specific rendering effect, at least one of the information such as the script, rendering instruction or rendered data corresponding to the called device-side service capability can be returned to the rendering module. The rendering module can process the received information accordingly and send it to the container module. The container module obtains the container engine of the called service capability based on the rendered data, uses the container engine to build a container view of the called service capability, and generates a display page of the called service capability. For example, the rendering effect of the calling instruction to turn on the microphone includes an animation with a partial display of a microphone image, and the device-side capability module can send the rendered data corresponding to the animation to the rendering module. The rendering module can obtain the container engine required for the animation, such as a dialog container engine. In the dialog container engine, a container view can be constructed based on the view information in the rendered data, and the executable code of the component can be run based on the component information to obtain a display page.

[0107] In addition, when the device-side capability module calls the device-side system service, the device-side system service can perform corresponding operations according to the calling instructions. The device-side system service can report to the cloud through the device-side capability module the status and / or events that occur after the called service capability performs the corresponding operation. For example, in response to the calling instruction, the music player starts and plays music. The music player can return the music playback record to the device-side capability module, which is reported to the cloud by the device-side capability module.

[0108] Fourth, the container module (or container subsystem) is used to manage various container engines. The container engine may include a page container engine, a dialog container engine, a mini-program container engine, etc. The container module may obtain the required container engine based on the rendered data from the rendering module, the instruction parsing and distribution module, or the cross-process rendering management module. For example, if there is an already opened page container engine, the page container engine may be used to build a container page. If there is no already opened container engine, a new page container engine may be started and the container page may be built using the new page container engine. For another example, if there is an already opened dialog container engine, the dialog container engine may be closed first, and then a new dialog container engine may be started based on the rendered data to build a container page. If there is no already opened dialog container engine, a new dialog container engine may be started directly. The container page may be built using the new dialog container engine. For another example, if there is an already opened mini-program container engine, the mini-program container engine may be used to build a container page. If there is no already opened mini-program container engine, a new mini-program container engine may be started and the container page may be built using the new mini-program container engine.

[0109] The container module of this embodiment may include various units and sub-units of the embodiment of the rendering device based on the container engine, and implement various functions of the rendering device based on the container engine.

[0110] After the container page is constructed using the container engine, the executable code of the components required for rendering is loaded into the container page to generate a display page that can display the rendering effect on the screen of the device. Then, the display page can be displayed on the screen of the device.

[0111] 5. Rendering module (or rendering subsystem), used to implement screen rendering of the device.

[0112] The rendering module can execute the script to obtain the rendered data, or receive the rendered data from the instruction parsing and distribution module. Then, the rendering module can send the rendered data to the container module.

[0113] In addition, the rendering module can also parse the rendered data to determine whether the end capability needs to be called. If the end capability needs to be called, an end capability call instruction can be sent to the device-side capability module to call the service capability of the device. If the device-side capability module returns the rendered data corresponding to the service capability called based on the end capability call instruction to the rendering module, the device-side capability module can send the rendered data to the container module for processing.

[0114] In addition, the ACE system may include a component set. The component set of the ACE system may include a set of executable codes for each component. The ACE system client may also include a component set, and the component set of the client may include a set of description information of some custom components. The script that the client needs to render may include the identifier of the container engine, container component information, component description information, etc. If a custom component needs to be registered in the ACE system, the script that the client needs to render may include the description information of each custom component. For example, in the APP of a certain video website, in addition to its own various components and layouts, it may also include custom components for displaying rendering effects of "Happy New Year" and "Happy Mid-Autumn Festival".

[0115] In one example, the ACE system can be applied to voice-activated smart devices with screens to provide an efficient processing method for the content presentation of the device's system applications and third-party applications. As a beneficial supplement to intelligent voice interaction, it can improve the expressiveness of voice-activated smart devices and achieve a better user experience.

[0116] The ACE system can provide services in multiple communication modes: 1) third-party communication services based on client plug-ins; 2) cloud service communication based on registration protocols; 3) service communication based on the local system on the device side. With the agreed communication content, the application container engine system allocates the corresponding container, organizes the relevant content in the container through component sets and related instructions, completes the rendering of the screen content, and thus completes the service goals of each caller (caller). In addition, the ACE system can also manage the life cycle of the corresponding service.

[0117] The ACE system can complete rendering in voice intelligent devices, reducing the amount of data that needs to be transmitted to the outside world such as the cloud; by reusing containers, it can improve rendering processing speed and display effects.

[0118] Currently, the ACE system can support the following types of container views: Page, Dialog, and Mini-Program. Among them, the container views of Page and Dialog are similar, and can be full-screen, partial-screen, and floating window views. The container view of Mini-Program is similar to the display effect of widgets or other types of Mini-Programs. For example, Mini-Programs can include clocks, notepads, weather forecasts, maps, games, etc.

[0119] like Figure 6As shown, an example of the workflow of a page container engine may include: determining whether there is an already opened page container engine such as an Activity. If so, the already opened page container engine is used to build a container view. If not, the page container engine such as an Activity is started before building the container view. After building the container view, a page stack may be executed to save the previously displayed page to the stack. Then, the page container engine may load the rendered data and build the page. The rendered data may include the business logic of the script (such as JS), etc.

[0120] In addition, see Figure 7 In the workflow of the page container engine, the judgment of the background attributes can be added. For example, after determining that there is an already opened page container engine, it is determined whether the transparent attribute in the background attributes of the currently opened page container engine is consistent with the transparent attribute in the received instruction (such as a rendering instruction or the rendered data obtained based on the rendering instruction). If they are inconsistent, a new page container engine such as an Activity needs to be started. If they are consistent, the page container view can be built using the already opened page container engine. After the page container view is built, the page stack can be executed to save the previously displayed page to the stack. Then, the page container engine can load the rendered data and build the website page. The rendered data can include the business logic of the script (such as JS), etc.

[0121] like Figure 8 As shown, an example of the workflow of a dialog container engine may include: determining whether there is an already opened dialog container engine. If yes, use the already opened dialog container engine to build a container view. If not, close the previous dialog container engine, and then start a new dialog container engine to build a container view. Add the constructed container view to a window management module such as WindowManager. Register a component set (or component library). The dialog container engine loads the compiled rendering data and scripts (such as JS) to build a dialog page.

[0122] like Fig. 9 As shown, an example of the workflow of the mini-program container engine may include: the device may respond to a click on the mini-program, a voice query such as a DCS directive, navigation, etc., to determine whether the mini-program to be displayed is the mini-program container engine that is currently open. Among them, DCS (DuerOS Conversation System) is a subsystem for communication between the device and the DuerOS (DuerOS) cloud service.

[0123] If the mini program that needs to be displayed is the mini program container engine that is currently open, you can jump to the currently opened mini program container engine and send a routing message to the mini program framework to pass in the URL corresponding to the page and obtain the compiled script (such as JS) page code. The script page code can be included in the rendered data. Then, you can also determine whether there is a corresponding cached page in the script page code. If so, the mini program page is displayed. If not, enter the page resource loading state, and you can send a page loading request to the cloud. Determine whether the corresponding page that needs to be loaded is already cached locally. If there is a cache, send a loading completion message (such as onLoadComplete) to the mini program framework to pass in the script page code and display the mini program page. If there is no cache, download the script page code, and then send a loading completion message to the mini program framework to pass in the script page code and display the mini program page.

[0124] If the mini program to be displayed is not the mini program container engine that is currently open, open a new mini program container engine and enter the mini program loading state. Use the new mini program container engine to obtain mini program information such as m1. Then, determine whether there is a cached mini program locally based on the mini program information. The mini program can be a package that packages script code and data in a specific format. If a package of a mini program exists locally, it means that there is a cached mini program locally. If there is a cached mini program locally, the mini program page can be displayed. It can also be determined whether it needs to be updated. If it does not need to be updated, the mini program page can be displayed. If there is no mini program cached locally or the mini program needs to be updated, download the mini program (for example, download the mini program package from the cloud), load the mini program (for example, process the mini program package through the rendering module and load it into the container engine), and display the mini program page.

[0125] The above website page, dialog page or applet page may include various components. Fig.10 is an example of a component. Each component may include attribute information such as the name, type, meaning, and necessity of its own attributes. For example, a list component (List) may include attribute names such as direction, item(s), firstitem, lastitem, numbered (whether to set the index), and data (data source). For another example, a page component (List) may include attribute names such as width, height, direction, item(s), and display items. The code (target code) of the components included in the script may be run to compile and obtain rendered data (execution code).

[0126] The embodiments of the present disclosure provide different types of container views, and provide functions such as stacking logic and lifecycle management, which can realize functions such as unified scheduling and multi-task collaboration.

[0127] An example of lifecycle management may include: displaying a dialog box after pushing the stack, and controlling the dialog box to disappear after a certain period of time. The time range for displaying the dialog box can be understood as the lifecycle of the dialog box.

[0128] In addition, based on different types of container engines and container views, multiple tasks can be processed collaboratively to achieve unified scheduling and multi-task collaboration.

[0129] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0130] Fig.11 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0131] like Fig.11 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0132] Multiple components in the electronic device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0133] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as a rendering method. For example, in some embodiments, the rendering method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the rendering method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the rendering method in any other appropriate manner (e.g., by means of firmware).

[0134] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0135] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0136] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0137] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0138] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0139] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

[0140] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0141] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A rendering method based on a container engine, comprising: Acquire a container engine corresponding to the device end based on the rendered data, wherein the device end includes a page container engine, a dialog container engine, and a mini-program container engine; constructing a container view based on the rendered data using the container engine; Generate a display page on the device side based on the rendered data using the container view; The rendered data includes engine identification, container view information and component information; Acquiring a container engine corresponding to the device end based on the rendered data, including: searching for a corresponding container engine based on the engine identifier; Using the container engine to construct a container view based on the rendered data includes: using the container engine to construct a container view based on the container view information; Generating a display page on the device side based on the rendered data using the container view, including: executing executable code corresponding to the component information to load a graphic component corresponding to the component information in the container view to generate a display page; The container engine is a page container engine, and the container engine corresponding to the device end is obtained based on the rendered data, including: Acquire an already opened page container engine based on the rendered data; In a case where it is determined based on the rendered data that there is no opened page container engine, starting a new page container engine corresponding to the rendered data; The method further comprises: The original page is pushed onto a stack, so that when the original page needs to be displayed, the original page is controlled to be popped off the stack.

2. The method according to claim 1, characterized in that The method further comprises: Compare the background attributes of the page container engine to be started in the rendered data with the background attributes of the current page container engine to see whether they are consistent; In case of inconsistency, a new page container engine is started.

3. The method according to claim 1, characterized in that The container engine is a dialog container engine, and obtaining the container engine based on the rendered data includes at least one of the following: If it is determined based on the rendered data that there is an already opened dialog container engine, closing the already opened dialog container engine, and starting a new dialog container engine based on the rendered data; If it is determined based on the rendered data that there is no already opened page container engine, a new dialog container engine is started based on the rendered data.

4. The method according to claim 3, characterized in that The method further comprises: Add the dialog container view built by the dialog container engine to the window management module; Register the component set corresponding to the dialog container view, and obtain description information of each graphic component that needs to be displayed in the dialog container view; Based on the description information of the graphic components that need to be displayed in the dialog container view, each of the graphic components is loaded in the dialog container view.

5. The method according to claim 1, characterized in that The container engine is a mini-program container engine, and obtaining the container engine based on the rendered data includes at least one of the following: If it is determined based on the rendered data that there is an already opened mini-program container engine, jump to the already opened mini-program container engine; If it is determined based on the rendered data that there is no opened applet container engine, a new applet container engine is opened.

6. The method according to claim 5, characterized in that The method further comprises at least one of the following: When the mini-program container engine determines that there is a cached mini-program page, obtaining the cached mini-program page; When the mini-program container engine determines that there is no cached mini-program page, the mini-program framework is used to load the rendered code corresponding to the mini-program script.

7. A rendering device based on a container engine, comprising: An engine acquisition unit, used to acquire a container engine corresponding to a device end based on rendered data, wherein the device end includes a page container engine, a dialog container engine, and a mini-program container engine; A view construction unit, using the container engine to construct a container view based on the rendered data; A page generation unit, using the container view to generate a display page on the device based on the rendered data; The rendered data includes engine identification, container view information and component information; The engine acquisition unit is specifically used to search for a corresponding container engine based on the engine identifier; The view construction unit is specifically configured to construct a container view based on the container view information; The page generation unit is specifically used to execute the executable code corresponding to the component information, so as to load the graphic component corresponding to the component information in the container view and generate a display page; The container engine is a page container engine, and the engine acquisition unit includes: The page container engine obtains the subunit and performs the following steps: Acquire an already opened page container engine based on the rendered data; In a case where it is determined based on the rendered data that there is no opened page container engine, starting a new page container engine corresponding to the rendered data; The device also includes: The stacking unit is used to perform stacking processing on the original page, so as to control the original page to be popped out of the stack when the original page needs to be displayed.

8. The device according to claim 7, characterized in that The page container engine acquisition subunit is further used to compare whether the background attribute of the page container engine to be started in the rendered data is consistent with the background attribute of the current page container engine; In case of inconsistency, a new page container engine is started.

9. The device according to claim 7, characterized in that The container engine is a dialog container engine, and the engine acquisition unit includes: The dialog container engine obtains a subunit for performing at least one of the following steps: If it is determined based on the rendered data that there is an already opened dialog container engine, closing the already opened dialog container engine, and starting a new dialog container engine based on the rendered data; If it is determined based on the rendered data that there is no already opened page container engine, a new dialog container engine is started based on the rendered data.

10. The device according to claim 9, characterized in that The device also includes: An adding unit, used for adding the dialog container view built by the dialog container engine to the window management module; A registration unit, used to register a component set corresponding to the dialog container view, and obtain description information of each graphic component to be displayed in the dialog container view; The loading unit is used to load each of the graphic components in the dialog container view based on the description information of the graphic components that need to be displayed in the dialog container view.

11. The device according to claim 7, characterized in that The container engine is a mini-program container engine, and the engine acquisition unit includes: The applet container engine obtains a subunit, which is used to perform at least one of the following steps: If it is determined based on the rendered data that there is an already opened mini-program container engine, jump to the already opened mini-program container engine; If it is determined based on the rendered data that there is no opened applet container engine, a new applet container engine is opened.

12. The device according to claim 11, characterized in that The device further comprises at least one of the following: a cache unit, configured to obtain a cached mini-program page if the mini-program container engine determines that there is a cached mini-program page; The code unit is used to load the rendered code corresponding to the mini-program script using the mini-program framework when the mini-program container engine determines that there is no cached mini-program page.

13. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

14. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 6.

15. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Page processing method and system

    CN107479861A