A view generation method, device, electronic equipment and computer storage medium

By distributing functional resource data packages through the client's built-in management platform, parsing configuration files and business code files, and using multi-threaded processing technology to generate views, the problem of slow view update speed in existing technologies is solved, and product iteration efficiency is improved.

CN114090924BActive Publication Date: 2025-11-18JINGDONG TECH HLDG CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111375718.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-19
Publication Date
2025-11-18
Estimated Expiration
2041-11-19

AI Technical Summary

Technical Problem

In existing technologies, when generating views by rendering them using a pre-agreed protocol and loading Hypertext Markup Language into web page views, the update speed is slow, resulting in low product iteration efficiency.

Method used

Functional resource data packages are distributed through the client-side built-in or View management platform, configuration files and business code files are parsed, views are generated, and multi-threaded processing technology is used for rendering and display, including JS thread processing, Render thread processing, and UI thread processing, reducing dependence on application releases.

Benefits of technology

It improved product iteration efficiency, reduced network dependencies, and enhanced the speed and flexibility of view updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114090924B_ABST
    Figure CN114090924B_ABST
Patent Text Reader

Abstract

The application provides a view generation method and device, electronic equipment and computer storage medium, the method comprises the following steps: obtaining a function resource data packet distributed by a built-in client or a management platform of a View, the function resource data packet comprises a configuration file and a service code file; based on the configuration file and the service code file, the function resource data packet is parsed and processed, a view corresponding to the function resource data packet is generated, and the view is displayed for use by the client. In the embodiment of the application, the function resource data packet is distributed by the built-in client or the management platform of the View without depending on the release of an application property (app), the function resource data packet is parsed and processed, and the view is rendered and displayed. Through the above-mentioned mode, the product iteration efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a view generation method, apparatus, electronic device, and computer storage medium. Background Technology

[0002] Currently, dynamic layouts often render corresponding views using pre-agreed protocols or generate views by loading pre-written HTML5 code into a web view. The methods described above, such as rendering native views using pre-agreed protocols, are slow and dependent on application releases, requiring continuous protocol expansion to meet demands. Furthermore, the method of loading pre-written HTML5 code into a web view is also slow and requires a certain network connection. Therefore, these methods are prone to slow product iteration efficiency. Summary of the Invention

[0003] In view of this, embodiments of the present invention provide a view generation method, apparatus, electronic device, and computer storage medium to solve the problem of slow product iteration efficiency in the prior art.

[0004] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0005] A first aspect of the present invention illustrates a view generation method, the method comprising:

[0006] Obtain the functional resource data package issued by the management platform built into the client or View, wherein the functional resource data package includes configuration files and business code files;

[0007] The configuration file and business code file are parsed and processed to generate a view corresponding to the functional resource data package, which is then displayed for client use.

[0008] Optionally, based on the configuration file and business code file, a view corresponding to the functional resource data package is generated through parsing, including:

[0009] The configuration file and business code file are processed by a JavaScript thread to obtain the node information corresponding to the configuration file and business code file.

[0010] The Render thread processes the Node information corresponding to the configuration file and the business code file to obtain the Node Tree corresponding to the configuration file and the business code file.

[0011] The UI thread processes the data based on the Node Tree corresponding to the configuration file and business code file to obtain and display the completed view.

[0012] Optionally, the step of performing UI thread processing based on the Node Tree corresponding to the configuration file and business code file to obtain the drawn view includes:

[0013] Calculate the number of nodes in the Node Tree, specifically the DOM tags for each document object model.

[0014] The DOM tags of each document object model are parsed to obtain and display the completed view.

[0015] Optionally, after each document object model DOM tag in the Node Tree, the following is also included:

[0016] Determine whether the DOM tags of each document object model have changed;

[0017] If it exists, after the document object model DOM tags are changed, return to the step of parsing each document object model DOM tag to obtain the drawn view and display it;

[0018] If it does not exist, directly execute the step of parsing each document object model DOM tag to obtain the drawn view and display it.

[0019] A second aspect of the present invention discloses a view generation apparatus, the apparatus comprising:

[0020] The acquisition unit is used to acquire the functional resource data package issued by the management platform built into the client or View. The functional resource data package includes configuration files and business code files.

[0021] The generation unit is used to parse and process the configuration file and business code file to generate a view corresponding to the functional resource data package, and display it for client use.

[0022] Optionally, the generation unit includes:

[0023] The first processing subunit is used to perform JavaScript thread processing on the configuration file and business code file to obtain node information corresponding to the configuration file and business code file.

[0024] The second processing subunit is used to perform rendering thread processing on the Node information corresponding to the configuration file and the business code file to obtain the number of nodes NodeTree corresponding to the configuration file and the business code file.

[0025] The third processing subunit is used to perform UI thread processing based on the Node Tree corresponding to the configuration file and business code file, to obtain and display the drawn view.

[0026] Optionally, the third processing subunit is specifically used for: calculating the DOM tags of each Document Object Model (DOM) in the Node Tree; parsing each DOM tag to obtain and display the drawn view.

[0027] Optionally, the third processing subunit is further configured to: after calculating the DOM tags of each Document Object Model (DOM) in the Node Tree, determine whether each DOM tag has been changed; if it has, after the DOM tag has been changed, parse each DOM tag to obtain a drawn view and display it; if it has not, directly parse each DOM tag to obtain a drawn view and display it.

[0028] A third aspect of the present invention discloses an electronic device for running a program, wherein the program executes a view generation method as shown in the first aspect of the present invention.

[0029] A fourth aspect of the present invention discloses a computer storage medium including a stored program, wherein, when the program is executed, it controls the device where the storage medium is located to perform a view generation method as shown in the first aspect of the present invention.

[0030] Based on the above embodiments of the present invention, a view generation method, apparatus, electronic device, and computer storage medium are provided. The method includes: obtaining a functional resource data package issued by a client-embedded or View management platform, the functional resource data package including a configuration file and a business code file; parsing and processing the configuration file and business code file to generate a view corresponding to the functional resource data package, and displaying it for client use. In this embodiment of the present invention, the release of the application does not depend on the release of the proprietary app. The functional resource data package is issued by a client-embedded or View management platform, and the functional resource data package is parsed and processed to render and display the view. This method can improve product iteration efficiency. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0032] Figure 1 A flowchart illustrating a view generation method provided in an embodiment of the present invention;

[0033] Figure 2 This is a schematic diagram illustrating the process of loading functional resource data packages and processing them to obtain a view for use by the client in an application product SDK provided in this embodiment of the invention.

[0034] Figure 3 A schematic diagram illustrating the process of generating a view according to an embodiment of the present invention;

[0035] Figure 4 This is a schematic diagram illustrating the process of loading functional resource data packages and processing them to obtain a view for use by the client in an embodiment of the present invention.

[0036] Figure 5 This is a schematic diagram of the structure of a view generation device according to an embodiment of the present invention. Detailed Implementation

[0037] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0038] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0039] In this embodiment of the invention, without relying on the release of the application's proprietary version, functional resource data packages are distributed through the client's built-in or View management platform. These data packages are then parsed and processed to render and display the view. This method improves product iteration efficiency.

[0040] See Figure 1 The above is a flowchart illustrating a view generation method according to an embodiment of the present invention. The method includes:

[0041] Step S101: Obtain the functional resource data package built into the client or issued by the server.

[0042] In step S101, the functional resource data package includes configuration files and business code files.

[0043] Optionally, before obtaining the feature resource data package, the following may be included:

[0044] After researchers log in to the Dynamic View management platform, the platform obtains the new feature resource data package that the researchers have uploaded and generates online links based on the new feature resource data package so that clients can access them.

[0045] Alternatively, during the application development process, new feature resource data packages can be placed in the assets directory of the application product's app folder so that clients can access them via a built-in method.

[0046] It should be noted that the assets folder is used to store some files. These files will not be compiled when the application installation package (APK) is generated; they will be saved in their original form.

[0047] In the specific implementation step S101, when the application product starts, the gateway interface on the client is started. When the SDK is initialized, the built-in functional resource files in the client or the resource files issued by the dynamic view management platform are loaded into memory. That is to say, new functional resource data packages are obtained from the dynamic view management platform or the assets directory of the application product app folder.

[0048] It should be noted that the functional resource data package refers to new logical functions developed for application products.

[0049] The functional resource package is generated by packaging configuration files and business code files using a graphical transformer.

[0050] Specifically, the engine core.js generates a configuration file for new functional data, and then the new functional data is developed using JS and CSS styles, the computer language for presenting file styles. The business layer then packages the developed data into a business code file (JS code).

[0051] The engine core.js is mainly developed using the compiled programming language JS and is used to complete the instance of jue files and manage the entire lifecycle process.

[0052] The business layer jue uses a syntax similar to Vue, and is mainly developed using js and CSS, a computer language for presenting file styles. Ultimately, jue will package and generate the js files for the application product.

[0053] It should be further noted that the new feature resource data package can be stored as a zip file.

[0054] Step S102: Based on the engine file and business code file, perform parsing and processing to generate a view corresponding to the functional resource data package, and display it for client use.

[0055] In the specific implementation step S102, the SDK in the client loads the functional resource data package to import the configuration file and the business code file. The SDK layer in the client provides a js loading environment. When the application service SDK is started, the configuration file of engine core.js is loaded first. When the business is used later, the business code file is loaded. The engine core.js file and the business code file are parsed to process them into a native View and display it.

[0056] It should be noted that the business code files are compressed JS files, specifically generated by bundling the business code files using the Webpack network package and scaffolding.

[0057] In this embodiment of the invention, based on Figure 1 The illustrated flowchart shows a view generation method. Correspondingly, this embodiment of the invention also discloses a flowchart of the application product SDK loading functional resource data packages and processing them to obtain a view for client use, such as... Figure 2 As shown.

[0058] Optionally, the generated view can be used not only on the client side, but also on the web side when the SDK is set up on a computer or other device.

[0059] Optionally, the application service SDK, based on the generated View, allows the insertion of dynamic containers such as DynamicView or DynamicInstance into the page. It also provides page encapsulation for the View, and offers page lifecycle, page routing, navigation, and other module functions, enabling the client to develop pages.

[0060] In this embodiment of the invention, without relying on the release of the application's proprietary app, functional resource data packages are distributed through the client's built-in or View's management platform. The system then obtains the functional resource data packages distributed by the client's built-in or View's management platform. Based on the configuration file and business code file, parsing and processing are performed to generate a view corresponding to the functional resource data package. This view is then rendered and displayed for client use. This method improves product iteration efficiency.

[0061] Optionally, based on the view generation method shown in the above embodiments of the present invention, during the execution of step S102, which involves parsing the engine file and business code file to generate a view corresponding to the functional resource data package, as follows: Figure 3 As shown, it includes the following steps:

[0062] Step S301: Perform JavaScript thread processing on the configuration file and business code file to obtain the node information corresponding to the configuration file and business code file.

[0063] In this embodiment of the invention, the functional resource data package adopts a layout also known as Flexbox layout. That is, it's a CSS (Cascading Style Sheets) rapid layout method, using Flexbox box layout for layout development. In the specific implementation step S301, the application product SDK uses the v8 engine, specifically the v8 architecture VM in JS Engine, to execute the JavaScript programming language in the functional resource data package, completing the injection of business code files (JS files) and configuration files (JS methods and properties).

[0064] Step S302: Render thread processes the Node information corresponding to the configuration file and business code file to generate a Node Tree corresponding to the configuration file and business code file.

[0065] In the specific implementation step S302, the parser is used to parse the attributes from the Node information corresponding to the configuration file and the business code file, and generate the Node Tree corresponding to the configuration file and the business code file.

[0066] Step S303: Perform UI thread processing based on the Node Tree corresponding to the configuration file and business code file to obtain the drawn view.

[0067] It should be noted that the specific implementation of step S303 includes the following steps:

[0068] Step S11: Calculate the number of nodes for each document object model dom tag in the Node Tree.

[0069] In the specific implementation step S11, the application product SDK uses the TreeParser engine, the cross-platform layout library yoga library & property settings to calculate the number of nodes for each document object model dom tag of the Node Tree, so as to draw and generate the interface UI through the built-in document object model DomNode component.

[0070] It should be noted that tags include tag node attributes and style data.

[0071] Step S12: Parse the DOM tags of each document object model to obtain the drawn view and display it.

[0072] In the specific implementation step S12, after the SDK executes the resource js, it parses each document object model dom tag through the document object model DOM to generate a document object model tree DOM Tree, and generates the corresponding view and style, i.e. the interface UI. The SDK process then calls the previously obtained view and style to display it on the client screen.

[0073] It should be noted that DOM Tree refers to a tree-like structure of tags and corresponding access methods.

[0074] In this embodiment of the invention, based on Figure 3 The illustrated flowchart shows a view generation method. Correspondingly, this embodiment of the invention also discloses a flowchart of the application product SDK loading functional resource data packages and processing them to obtain a view for client use, such as... Figure 4 As shown.

[0075] In this embodiment of the invention, a functional resource data package is distributed through the client-side built-in or View management platform to obtain the functional resource data package distributed by the client-side built-in or View management platform. This allows the SDK to use multi-threading to complete the entire process of execution and page layout rendering. Specifically, the JS thread processes and receives the JS files in the functional resource data package, the Render thread processes, parses, and calculates the node information obtained by the JS thread to determine the number of nodes (Node Tree) corresponding to the configuration file and business code file, and then the UI thread processes the data to obtain the drawn view and display the UI effect. This method can improve product iteration efficiency.

[0076] Optionally, based on the view generation method of the above embodiments of the present invention, after performing step S11 to calculate the number of nodes in each document object model dom tag of NodeTree, the method includes:

[0077] Step S21: Determine whether the DOM tags of each document object model have changed. If they have, proceed to step S22. If they have not, return to step S12.

[0078] In this embodiment of the invention, since the view is rendered using a holistic rendering method, to reduce the performance issues caused by multiple rendering operations during attribute changes each time a label changes, the view needs to be rendered uniformly after all label changes are completed, i.e., after the entire process is finished.

[0079] In the specific implementation of step S21, before drawing the rendering view, the node attributes of each tag are subjected to a diff algorithm to calculate the attributes and nodes that need to be changed. That is, it is to detect whether each document object model DOM tag has been changed. If it has, step S22 is executed; if it does not, step S12 is returned.

[0080] In this embodiment of the invention, the diff algorithm enables the view, i.e. UI drawing operation, to be performed with the smallest granularity.

[0081] It should be noted that the diff algorithm, as an accelerator for Virtual DOM, is fundamental to React's overall UI rendering and performance.

[0082] Step S22: Determine that the changes to the document object model (DOM) tags are complete, and return to step S12.

[0083] In the specific implementation of step S22, after all the label changes are completed, that is, after the entire process of change is completed, the view is drawn and rendered uniformly, that is, the process returns to step S12.

[0084] In this embodiment of the invention, to reduce the performance issues caused by multiple rendering operations during attribute changes corresponding to each label change, the view needs to be rendered uniformly after all label changes are completed, i.e., after the entire process is finished. This improves product iteration efficiency.

[0085] Optionally, based on the view generation method of the above embodiments of the present invention, after generating the view, the method further includes: after the client generates the view using the SDK, the client can use the generated view through the SDK.

[0086] It is understandable that the client uses the view in the following way: the functional resource data package is initialized through the DynamicView container class, and the DynamicView is initialized with data to determine whether the functional resource data package is loaded. If not, the DynamicView loading process is initiated to load the functional resource data package; if so, the DynamicView loading process is initiated to create an instance corresponding to the functional resource data package, and a view document object model (viewdom) is created through the engine; then, it is processed through the above embodiment to generate the corresponding view.

[0087] Optionally, when data changes, the diff algorithm can be used to calculate the attributes and nodes that need to be changed, thereby obtaining a new view.

[0088] It should be noted that the DynamicView container class is a container that can be used in layout / code.

[0089] Alternatively, in addition to the DynamicView container class provided above, you can also use the DynamicInstance class to develop and encapsulate according to your own needs through instance.

[0090] In this embodiment of the invention, the client can insert a dynamic container DynamicView or DynamicInstance into the page, and at the same time provides page encapsulation for the View, which can provide page lifecycle and page routing, navigation and other module functions, enabling the client to have page development capabilities.

[0091] Corresponding to the view generation method shown in the above embodiments of the present invention, the present invention also discloses a view generation apparatus, such as... Figure 5 The diagram shown is a structural schematic of a view generation device according to an embodiment of the present invention. The device includes:

[0092] The acquisition unit 501 is used to acquire the functional resource data package issued by the management platform built into the client or View. The functional resource data package includes configuration files and business code files.

[0093] The generation unit 502 is used to parse and process the configuration file and business code file to generate a view corresponding to the functional resource data package and display it for use by the client.

[0094] The specific working process of each module and unit in the view generation device disclosed in the above embodiments of the present invention can be found in the corresponding content of the view generation method disclosed in the above embodiments of the present invention, and will not be repeated here.

[0095] In this embodiment of the invention, without relying on the release of the application's proprietary app, functional resource data packages are distributed through the client's built-in or View's management platform. The system then obtains the functional resource data packages distributed by the client's built-in or View's management platform. Based on the configuration file and business code file, parsing and processing are performed to generate a view corresponding to the functional resource data package. This view is then rendered and displayed for client use. This method improves product iteration efficiency.

[0096] Optionally, based on the view generation apparatus shown in the above embodiments of the present invention, the generation unit 502 includes:

[0097] The first processing subunit is used to perform JavaScript thread processing on the configuration file and business code file to obtain node information corresponding to the configuration file and business code file.

[0098] The second processing subunit is used to perform rendering thread processing on the Node information corresponding to the configuration file and the business code file to obtain the number of nodes NodeTree corresponding to the configuration file and the business code file.

[0099] The third processing subunit is used to perform UI thread processing based on the Node Tree corresponding to the configuration file and business code file, to obtain and display the drawn view.

[0100] Optionally, the third processing subunit is specifically used for: calculating the DOM tags of each Document Object Model (DOM) in the Node Tree; parsing each DOM tag to obtain and display the drawn view.

[0101] In this embodiment, a functional resource data package is distributed via the client-side built-in or View management platform to obtain the functional resource data package distributed by the client-side built-in or View management platform. This allows the SDK to use multi-threading to complete the entire process of execution and page layout rendering. Specifically, the JS thread processes and receives the JS files in the functional resource data package, the Render thread processes, parses, and calculates the node information obtained by the JS thread to determine the number of nodes (Node Tree) corresponding to the configuration file and business code file, and then the UI thread processes the data to obtain the drawn view and display the UI effect. This method can improve product iteration efficiency.

[0102] Optionally, based on the view generation apparatus shown in the above embodiments of the present invention, the third processing subunit is further configured to: after calculating the DOM tags of each Document Object Model (DOM) in the Node Tree, determine whether the DOM tags of each DOM have changed; if they have changed, after the DOM tags of the DOM have changed, parse the DOM tags of each DOM to obtain a drawn view and display it; if they do not change, directly parse the DOM tags of each DOM to obtain a drawn view and display it.

[0103] In this embodiment of the invention, the client can insert a dynamic container DynamicView or DynamicInstance into the page, and at the same time provides page encapsulation for the View, which can provide page lifecycle and page routing, navigation and other module functions, enabling the client to have page development capabilities.

[0104] This invention also discloses an electronic device for running database stored procedures, wherein running the database stored procedures involves executing the above-described... Figures 1-4 Publicly available view generation methods.

[0105] This invention also discloses a computer storage medium, the storage medium including a stored database procedure, wherein, during the execution of the stored database procedure, the device where the storage medium is located is controlled to execute the above-mentioned... Figures 1-4 Publicly available view generation methods.

[0106] In the context of this disclosure, a computer storage medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0107] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0108] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0109] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A view generation method, characterized in that, The method includes: Obtain the functional resource data package issued by the management platform (either built into the client or viewed). The functional resource data package includes configuration files and business code files. The functional resource data package represents new logical functions developed for the application product. The functional resource data package is generated as follows: a configuration file for the new functional data is generated through the engine core.js; the new functional data is developed using js and CSS styles, the computer language used to style presentation files; and the business layer packages the developed data to generate business code files (js code). Based on the configuration file and business code file, a view corresponding to the functional resource data package is generated and displayed for client use; The step of parsing and processing the configuration file and business code file to generate a view corresponding to the functional resource data package includes: The configuration file and business code file are processed by a JavaScript thread to obtain the node information corresponding to the configuration file and business code file. The node information corresponding to the configuration file and business code file is processed by the rendering thread to obtain the node tree corresponding to the configuration file and business code file; Each document object model tag in the node tree is computed, and the document object model tag includes tag node attributes and styles; The document object model tags are parsed to obtain and display the completed view; Specifically, the client uses the view as follows: the functional resource data package is initialized through the DynamicView container class, and the DynamicView is initialized with data to determine whether the functional resource data package is loaded. If not, the DynamicView loading process is initiated to load the functional resource data package; if so, the DynamicView loading process is initiated to create an instance corresponding to the functional resource data package, and the view document object model is created through the engine to generate the corresponding view.

2. The method according to claim 1, characterized in that, Following each document object model tag in the computed node tree, the following is also included: Determine whether the tags of each document object model have changed; If present, after the document object model label changes are completed, return to the step of parsing each document object model label to obtain the drawn view and display it; If it does not exist, directly execute the step of parsing each document object model tag to obtain the drawn view and display it.

3. A view generation apparatus, characterized in that, The device includes: The acquisition unit is used to acquire functional resource data packages issued by the management platform built into the client or in the view. The functional resource data packages include configuration files and business code files. The functional resource data packages are new logical functions developed for the application product. The functional resource data packages are generated as follows: the configuration file for the new functional data is generated through the engine core.js; the new functional data is developed through js and the computer language CSS style for the presentation file style; and the business layer packages the developed data to generate business code files (js code). The generation unit is used to parse and process the configuration file and business code file to generate a view corresponding to the functional resource data package, and display it for the client to use; The generation unit includes: The first processing unit is used to perform JavaScript thread processing on the configuration file and business code file to obtain node information corresponding to the configuration file and business code file. The second processing unit is used to perform rendering thread processing on the node information corresponding to the configuration file and the business code file to obtain a node tree corresponding to the configuration file and the business code file. The third processing unit is used to calculate each document object model tag of the node tree, wherein the document object model tag includes tag node attributes and styles; parse each document object model tag to obtain and display the drawn view; Specifically, the client uses the view as follows: the functional resource data package is initialized through the DynamicView container class, and the DynamicView is initialized with data to determine whether the functional resource data package is loaded. If not, the DynamicView loading process is initiated to load the functional resource data package; if so, the DynamicView loading process is initiated to create an instance corresponding to the functional resource data package, and the view document object model is created through the engine to generate the corresponding view.

4. The apparatus according to claim 3, characterized in that, The third processing subunit is further configured to: determine whether each document object model tag has been changed after each document object model tag in the compute node tree; if it has been changed, parse each document object model tag after the document object model tag has been changed to obtain and display the drawn view; if it has not been changed, directly parse each document object model tag to obtain and display the drawn view.

5. An electronic device, characterized in that, The electronic device is used to run a program, wherein the program executes the view generation method as described in any one of claims 1-2.

6. A computer storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, it controls the device where the storage medium is located to perform the view generation method as described in any one of claims 1-2.

Citation Information

Patent Citations

  • Application dynamic updating method and device base on Flutter, storage medium and electronic equipment

    CN111381852A

  • Small program running method and device, electronic equipment and computer storage medium

    CN111580879A

  • Rendering method and device based on mobile terminal and storage medium

    CN112306594A