A page display method and device
By converting the xml data of the page to be displayed into Flutter page code and using the Flutter engine to display the page, the problem of complex and poor consistency of page development in the existing technology is solved, and the high uniformity and diversity of cross-platform pages are achieved.
Patent Information
- Application Number
- CN201910859607.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-11
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2039-09-11
AI Technical Summary
In the prior art, when page display is implemented through frameworks such as ReactNative and Weex, there are problems such as large system resource consumption, complex page development, and poor page consistency on iOS and Android.
The Flutter framework is used to combine xml data, and page display is realized by receiving xml data, converting it into Flutter page code, and sending it to the Flutter engine.
It achieves high consistency between iOS, Android and web pages, reduces development costs, improves Flutter's universality, and supports diversified page design.
Smart Images

Figure CN112486482B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a page display method and device. Background Art
[0002] With the development of mobile terminal technologies such as smartphones and tablets, users have an increasing demand for fast iteration and dynamic update of display pages, which has given rise to JavaScript-based ReactNative and Weex frameworks, which use JavaScriptCore as an intermediate layer to achieve iteration or update of display pages on iOS and Android. In addition, there are also frameworks that define a set of DSL (Domain Specific Language) to parse data on the client side and dynamically create Views to achieve dynamic display pages, such as Tangram and DinamicX.
[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art: the process of converting to native View through ReactNative and Weex through JavascriptCore as the intermediate layer will consume system resources, require a lot of page development, and is complicated to use, and the consistency of pages displayed on iOS and Android is poor; the defined set of DSL uses the native View as a template, the page styles that can be displayed are limited, and the dynamic update capability is relatively weak. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a page display method and device, which can not only realize page display based on Flutter, but also well ensure the consistency of page display on iOS, Android and web ends.
[0005] To achieve the above-mentioned purpose, according to a first aspect of the present invention, a page display method is provided, including: receiving XML data corresponding to a page to be displayed; converting the XML data into a corresponding Flutter page code; and sending the Flutter page code to a Flutter engine, so that the Flutter engine displays the page to be displayed according to the Flutter page code.
[0006] Optionally, converting the xml data into the corresponding Flutter page code includes: recursively parsing the xml tags of the xml data to obtain a tree data model, the nodes of the tree data model indicating the attributes of the corresponding xml tags; converting the tree data model into a tree view, the page layout of the tree view is consistent with the layout of the page to be displayed; obtaining data required by the tree view, and generating the Flutter page code according to the tree view and the obtained data.
[0007] Optionally, the xml data is obtained by converting a Flutter page control corresponding to the page to be displayed.
[0008] Optionally, the xml data is obtained by converting the Flutter page control corresponding to the page to be displayed, including: converting the Flutter page control into an xml tag, the attributes of the xml tag indicating the attributes of the corresponding page control; according to the page to be displayed, combining the page controls and setting the attributes of the page controls; according to the attributes of the page controls, determining the data required for the page to be displayed to generate the page to be displayed; according to the xml tag, converting the page to be displayed into xml data.
[0009] To achieve the above-mentioned purpose, according to a second aspect of the present invention, a page display device is provided, including: a data receiving module, a data conversion module, and a page display module; wherein the data receiving module is used to receive xml data corresponding to a page to be displayed; the data conversion module is used to convert the xml data into a corresponding Flutter page code; the page display module is used to send the Flutter page code to a Flutter engine, so that the Flutter engine displays the page to be displayed according to the Flutter page code.
[0010] Optionally, converting the xml data into the corresponding Flutter page code includes: recursively parsing the xml tags of the xml data to obtain a tree data model, the nodes of the tree data model indicating the attributes of the corresponding xml tags; converting the tree data model into a tree view, the page layout of the tree view is consistent with the layout of the page to be displayed; obtaining data required by the tree view, and generating the Flutter page code according to the tree view and the obtained data.
[0011] Optionally, the xml data is obtained by converting a Flutter page control corresponding to the page to be displayed.
[0012] Optionally, the xml data is obtained by converting the Flutter page control corresponding to the page to be displayed, including: converting the Flutter page control into an xml tag, the attributes of the xml tag indicating the attributes of the corresponding page control; according to the page to be displayed, combining the page controls and setting the attributes of the page controls; according to the attributes of the page controls, determining the data required for the page to be displayed to generate the page to be displayed; according to the xml tag, converting the page to be displayed into xml data.
[0013] To achieve the above-mentioned purpose, according to the third aspect of the present invention, a server for page display is provided, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement any of the methods described in the above-mentioned page display method.
[0014] To achieve the above-mentioned purpose, according to a fourth aspect of the present invention, a computer-readable medium is provided, on which a computer program is stored, characterized in that when the program is executed by a processor, any method described in the page display method is implemented.
[0015] An embodiment of the above invention has the following advantages or beneficial effects: by converting the xml data corresponding to the page to be displayed into the Flutter page code, the processing of the xml data by Flutter is realized, and a high degree of unification of the display pages on the iOS, Android, and web ends is also realized; at the same time, since the xml data has many advantages such as simple syntax, easy learning, and easy use, the cost of developers learning or using Flutter is reduced, making Flutter more versatile; in addition, in the process of obtaining xml data, the Flutter page controls can be dragged or combined through the visual configuration platform to realize the configuration or design of different pages, and the diversity of display pages is realized.
[0016] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0018] Figure 1 is a schematic diagram of the main process of the method for page display according to an embodiment of the present invention;
[0019] Figure 2 is a schematic diagram of the main process of the method for acquiring XML data according to an embodiment of the present invention;
[0020] Figure 3 is a schematic diagram of main modules of a device for page display according to an embodiment of the present invention;
[0021] Figure 4 is a schematic diagram of an application method of a page display device according to an embodiment of the present invention;
[0022] Figure 5 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0023] Figure 6 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention 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 invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0025] like Figure 1 As shown, an embodiment of the present invention provides a method for displaying a page, which may specifically include the following steps:
[0026] Step S101, receiving XML data corresponding to the page to be displayed.
[0027] XML refers to Extensible Markup Language, which is used to transmit and store data. XML does not have predefined tags, and users can customize XML tags and corresponding attributes according to actual needs. Therefore, XML has many advantages such as simple syntax, easy to learn, and easy to use, and has become a common information transmission tool independent of software and hardware. For the same page to be displayed, due to the differences in performance of various clients, such as iOS, Android, and web, the displayed pages are often different, and the visual effects are less consistent and not uniform. Using XML data that only focuses on data content to store and transmit the page to be displayed allows different clients that display the page to parse XML data according to their own performance and generate the page to be displayed, thereby ensuring the uniformity of the displayed page.
[0028] It is understandable that the XML data corresponding to the page to be displayed can be actively obtained and received according to the page display needs of the client, or the XML data corresponding to the page to be displayed can be passively received when the page needs to be iterated or updated.
[0029] In an optional implementation, the xml data is obtained by converting a Flutter page control corresponding to the page to be displayed.
[0030] Flutter is a new mobile UI framework developed by Google to help developers develop high-quality native applications on both Android and iOS platforms. It provides a variety of controls for generating pages, including but not limited to layout controls and view controls. When implementing page display based on Flutter, you can configure or design the page to be displayed on the page visualization configuration platform by dragging or combining Flutter page controls such as Element and Widget on the platform, generate a visualization view of the page to be displayed, and then obtain the xml data corresponding to the page to be displayed by converting the page controls of the visualization view into xml tags and corresponding attributes. Among them, Element is the basic layout control of the view, including containers, pictures, and texts; Widget is a commonly used complex view control, such as a carousel view and a sliding image.
[0031] In an optional implementation, the xml data is obtained by converting the Flutter page control corresponding to the page to be displayed, including: converting the Flutter page control into an xml tag, the attributes of the xml tag indicating the attributes of the corresponding page control; according to the page to be displayed, combining the page controls and setting the attributes of the page controls; according to the attributes of the page controls, determining the data required for the page to be displayed to generate the page to be displayed; according to the xml tag, converting the page to be displayed into xml data.
[0032] Specifically, see Figure 2, take the example of dragging page controls Element_A, Element_B, Element_C, Widget_A, and Widget_B to generate a visual view of the page to be displayed: on the page visualization configuration platform, the commonly used page controls in Flutter, including but not limited to Element_A, Element_B, Element_C, Widget_A, and Widget_B shown in the figure, are converted into custom xml tags, and the attributes corresponding to the xml tags indicate the properties of the page controls (such as width, height, margin, etc.) and data conversion properties (such as data container, background color, border, etc.); according to the page to be displayed, on the page visualization configuration platform Drag or combine page controls Element_A, Element_B, Element_C, Widget_A, and Widget_B on the stage to generate a visual view of the page to be displayed; according to the data that needs to be loaded when displaying the page, set the data field of the attributes of the page controls Element_A, Element_B, and Element_C so that the data field matches the data field in the data interface Api_data, thereby determining the data obtained through Api_data to complete the data binding of the visual view; on this basis, according to the aforementioned rules for converting page controls into custom xml tags and corresponding attributes, convert the visual view of the page to be displayed after data binding is completed into xml data.
[0033] It is understandable that since the data to be loaded when the page to be displayed is determined by setting the attributes of the xml tag, the limitation on the data format when determining the data to be loaded when the page to be displayed by using the xml tag in the prior art is avoided.
[0034] Step S102, converting the XML data into corresponding Flutter page code.
[0035] Since Flutter is developed using the Dart language, Flutter itself does not support page layout in the XML data format and has poor ability to dynamically display pages. Therefore, it is necessary to convert XML data into Flutter page code to enable Flutter to uniformly display multiple client pages.
[0036] In an optional implementation, the converting of the xml data into the corresponding Flutter page code includes: recursively parsing the xml tags of the xml data to obtain a tree data model, the nodes of the tree data model indicating the attributes of the corresponding xml tags; converting the tree data model into a tree view, the page layout of the tree view being consistent with the layout of the page to be displayed; obtaining data required by the tree view, and generating the Flutter page code according to the tree view and the obtained data.
[0037] It is understandable that the page to be displayed has a hierarchical structure, so the corresponding xml tag also has a corresponding hierarchical result. In the process of recursive parsing, it is processed into a tree data model according to the hierarchical mapping of the xml tag, and the attributes corresponding to the xml tag are filled into the corresponding tree database model nodes. In addition, since the page layout provided by the page visualization configuration platform (such as Flex box layout, etc.) is inconsistent with the page layout required when using Flutter to display the page on iOS, Android, and web (such as Flutter's Flex box layout and stack layout, etc.), in order to better realize the display of the page, the page layout conversion is realized in the process of converting the tree data model into a tree view.
[0038] Step S103: Send the Flutter page code to the Flutter engine, so that the Flutter engine displays the page to be displayed according to the Flutter page code.
[0039] After receiving the Flutter page code, the Flutter engine loads the data in the tree view or the data required for the page to be displayed, generates the page, and displays the page to users on the iOS, Android, and web terminals.
[0040] Based on the above embodiments, the provided page display method not only realizes Flutter's processing of XML data, but also realizes a high degree of unification in displaying pages on iOS, Android, and web terminals. At the same time, since XML data has many advantages such as simple syntax, easy learning, and ease of use, it reduces the cost for developers to learn or use Flutter, making Flutter more versatile. In addition, in the process of obtaining XML data, the configuration or design of different pages can be realized through a visual configuration platform, thereby realizing the diversity of display pages.
[0041] See also Figure 3The embodiment of the present invention provides a page display device 300, including: a data receiving module 301, a data conversion module 302, and a page display module 303; wherein,
[0042] The data receiving module 301 is used to receive XML data corresponding to the page to be displayed;
[0043] The data conversion module 302 is used to convert the xml data into corresponding Flutter page code;
[0044] The page display module 303 is used to send the Flutter page code to the Flutter engine, so that the Flutter engine displays the page to be displayed according to the Flutter page code.
[0045] In an optional implementation, the converting of the xml data into the corresponding Flutter page code includes: recursively parsing the xml tags of the xml data to obtain a tree data model, the nodes of the tree data model indicating the attributes of the corresponding xml tags; converting the tree data model into a tree view, the page layout of the tree view being consistent with the layout of the page to be displayed; obtaining data required by the tree view, and generating the Flutter page code according to the tree view and the obtained data.
[0046] In an optional implementation, the xml data is obtained by converting a Flutter page control corresponding to the page to be displayed.
[0047] In an optional implementation, the xml data is obtained by converting the Flutter page control corresponding to the page to be displayed, including: converting the Flutter page control into an xml tag, the attributes of the xml tag indicating the attributes of the corresponding page control; according to the page to be displayed, combining the page controls and setting the attributes of the page controls; according to the attributes of the page controls, determining the data required for the page to be displayed to generate the page to be displayed; according to the xml tag, converting the page to be displayed into xml data.
[0048] See also Figure 4 Based on the above embodiment, the embodiment of the present invention provides an application method of the page display device 300, which is as follows:
[0049] The page visualization configuration platform generates XML data corresponding to the page to be displayed and sends it to iOS, Android, web and other clients based on page display requests from iOS, Android and web clients or when the page needs to be updated.
[0050] Specifically, on the page visualization configuration platform, the commonly used page controls in Flutter are converted into custom xml tags, and the attributes corresponding to the xml tags indicate the attributes of the page controls (such as width, height, margin, etc.) and data conversion attributes (such as data container container, background color, border, etc.); according to the page to be displayed, drag or combine the page controls on the page visualization configuration platform to generate a visualization view of the page to be displayed; according to the data that needs to be loaded when displaying the page, set the data field of the attributes of the page control so that the data field matches the data field in the data interface, thereby determining the data obtained through the data interface to complete the data binding of the visualization view; on this basis, according to the aforementioned rules for converting the page controls into custom xml tags and corresponding attributes, the visualization view of the page to be displayed after data binding is completed is converted into xml data.
[0051] After receiving the XML data corresponding to the page to be displayed sent by the page visualization configuration platform, the iOS, Android, web and other clients send the XML data to the page display device 300 corresponding to the client.
[0052] After receiving the xml data corresponding to the page to be displayed sent by the client, the page display device 300 obtains all xml tags and attributes in the xml data, recursively parses the xml tags of the xml data, obtains a tree data model through hierarchical mapping of the xml tags, and fills the attributes corresponding to the xml tags into the nodes of the corresponding tree database model; converts the tree data model into a tree view, and at the same time, converts the page layout provided by the page visualization configuration platform (such as Flex box layout, etc.) into the page layout required when using Flutter to display the page on iOS, Android, and web (such as Flutter's Flex box layout and stack layout, etc.); according to the data field consistent with the data interface determined when generating the xml data, obtain the data required by the tree view or the data required by the page to be displayed, and generate the Flutter page code according to the tree view after obtaining the data.
[0053] The Flutter page code is sent to the Flutter engine, so that after receiving the Flutter page code, the Flutter engine loads the data of the tree view or the data required for the page to be displayed, generates the page, and displays the page to users on the iOS, Android, and web terminals.
[0054] Figure 5 An exemplary system architecture 500 is shown to which the page display method or page display device according to the embodiment of the present invention can be applied.
[0055] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0056] Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0057] The terminal devices 501 , 502 , and 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0058] Server 505 may be a server that provides various services, such as a backend management server that provides support for shopping websites browsed by users using terminal devices 501, 502, and 503. The backend management server may analyze and process received data such as product information query requests, and feed back processing results (such as pages to be displayed) to the terminal device.
[0059] It should be noted that the page display method provided in the embodiment of the present invention is generally executed by the server 505 , and accordingly, the page display device is generally arranged in the server 505 .
[0060] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0061] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present invention. Figure 6 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0062] like Figure 6As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0063] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.
[0064] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present invention are executed.
[0065] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, 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 above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0066] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0067] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes a data receiving module, a data conversion module, and a page display module. The names of these modules do not constitute a limitation on the modules themselves in some cases, for example, the data receiving module may also be described as a "module for receiving XML data corresponding to the page to be displayed".
[0068] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: receiving xml data corresponding to the page to be displayed; converting the xml data into corresponding Flutter page code; sending the Flutter page code to the Flutter engine, so that the Flutter engine displays the page to be displayed according to the Flutter page code.
[0069] According to the technical solution of the embodiment of the present invention, by converting the xml data corresponding to the page to be displayed into the Flutter page code, Flutter processes the xml data, and also realizes a high degree of unification of the displayed pages on the iOS, Android, and web ends; at the same time, since xml data has many advantages such as simple syntax, easy learning, and easy use, the cost for developers to learn or use Flutter is reduced, making Flutter more versatile; in addition, in the process of obtaining xml data, the configuration or design of different pages can be realized by dragging or combining Flutter page controls through the visual configuration platform, thereby realizing the diversity of displayed pages.
[0070] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A page display method, characterized in that: include: Receive xml data corresponding to the page to be displayed; wherein the xml data is obtained by converting the Flutter page control corresponding to the page to be displayed; Convert the XML data into corresponding Flutter page code; Sending the Flutter page code to the Flutter engine, so that the Flutter engine displays the page to be displayed according to the Flutter page code; The xml data is obtained by converting the Flutter page control corresponding to the page to be displayed, including: Convert the Flutter page control into an xml tag, where the attributes of the xml tag indicate the attributes of the corresponding page control; According to the page to be displayed, the page controls are combined, and the properties of the page controls are set; Determine the data required by the page to be displayed according to the properties of the page control, so as to generate the page to be displayed; According to the xml tag, the page to be displayed is converted into xml data.
2. The page display method according to claim 1, characterized in that: The converting of the xml data into corresponding Flutter page code includes: Recursively parsing the XML tags of the XML data to obtain a tree data model, wherein the nodes of the tree data model indicate the attributes of the corresponding XML tags; Converting the tree data model into a tree view, wherein the page layout of the tree view is consistent with the layout of the page to be displayed; The data required by the tree view is obtained, and the Flutter page code is generated according to the tree view and the obtained data.
3. A page display device, characterized in that: include: Data receiving module, data conversion module, page display module; among them, The data receiving module is used to receive XML data corresponding to the page to be displayed; wherein the XML data is obtained by converting the Flutter page control corresponding to the page to be displayed; The data conversion module is used to convert the XML data into corresponding Flutter page code; The page display module is used to send the Flutter page code to the Flutter engine, so that the Flutter engine displays the page to be displayed according to the Flutter page code; The xml data is obtained by converting the Flutter page control corresponding to the page to be displayed, including: Convert the Flutter page control into an xml tag, where the attributes of the xml tag indicate the attributes of the corresponding page control; According to the page to be displayed, the page controls are combined, and the properties of the page controls are set; Determine the data required by the page to be displayed according to the properties of the page control, so as to generate the page to be displayed; According to the xml tag, the page to be displayed is converted into xml data.
4. The page display device according to claim 3, characterized in that: The converting of the xml data into corresponding Flutter page code includes: Recursively parsing the XML tags of the XML data to obtain a tree data model, wherein the nodes of the tree data model indicate the attributes of the corresponding XML tags; Converting the tree data model into a tree view, wherein the page layout of the tree view is consistent with the layout of the page to be displayed; The data required by the tree view is obtained, and the Flutter page code is generated according to the tree view and the obtained data.
5. A server for page display, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-2.
6. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 2 is implemented.
Citation Information
Patent Citations
A processing method and device for converting a page application into a native application
CN109814866A