WO2020063031A1 - 结构数据的处理方法、装置、存储介质及电子设备 - Google Patents

结构数据的处理方法、装置、存储介质及电子设备 Download PDF

Info

Publication number
WO2020063031A1
WO2020063031A1 PCT/CN2019/095439 CN2019095439W WO2020063031A1 WO 2020063031 A1 WO2020063031 A1 WO 2020063031A1 CN 2019095439 W CN2019095439 W CN 2019095439W WO 2020063031 A1 WO2020063031 A1 WO 2020063031A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
object model
tree structure
nodes
model tree
Prior art date
Application number
PCT/CN2019/095439
Other languages
English (en)
French (fr)
Inventor
李森林
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to EP19865354.5A priority Critical patent/EP3842929A4/en
Publication of WO2020063031A1 publication Critical patent/WO2020063031A1/zh
Priority to US17/195,173 priority patent/US20210191993A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/93Document management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9027Trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/904Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching

Definitions

  • the present application relates to the field of information processing technology, and in particular, to a method, an apparatus, a storage medium, and an electronic device for processing structured data.
  • a mobile phone when a mobile phone generates a native page through a fast application, it needs to call the rendering engine in the application to parse and render the corresponding fast application code of the fast application component, and the fast application components use the Document Object Model (Document Object Mode, DOM) tree structure for storage.
  • Each fast application component is regarded as a node in the document object model tree. As the display content of the native page becomes more and more complex, the level of the document object tree is getting higher and higher, which causes rendering time. Getting longer.
  • the embodiments of the present application provide a method, a device, a storage medium, and an electronic device for processing structured data, which can reduce the hierarchical complexity of the structured data and improve the rendering efficiency of the structured data.
  • an embodiment of the present application provides a method for processing structured data, including:
  • a document object model tree structure corresponding to the native page is obtained, and the document object model tree structure includes a dynamic node and a static node;
  • the rendered document object model tree structure is parsed by the rendering engine to generate a native page.
  • an apparatus for processing structured data includes:
  • An obtaining unit configured to obtain a document object model tree structure corresponding to the native page when a display instruction of the native page is received, where the document object model tree structure includes a dynamic node and a static node;
  • a transformation unit configured to traverse the nodes in the document object model tree structure and convert a static node into a target node
  • a merging unit configured to merge the target nodes, generate a virtual node, and load the virtual node into a document object model tree structure
  • the parsing unit is configured to parse the loaded document object model tree structure through a rendering engine to generate a native page.
  • a storage medium provided in an embodiment of the present application stores a computer program thereon, and when the computer program is run on a computer, the computer is caused to execute a method for processing structured data provided by any embodiment of the present application. .
  • the electronic device includes a processor and a memory, and the processor executes steps by calling a computer program stored in the memory:
  • a document object model tree structure corresponding to the native page is obtained, and the document object model tree structure includes a dynamic node and a static node;
  • the rendered document object model tree structure is parsed by the rendering engine to generate a native page.
  • FIG. 1 is a schematic flowchart of a structure data processing method according to an embodiment of the present application.
  • FIG. 2 is another schematic flowchart of a structure data processing method according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a method for processing structured data provided by an embodiment of the present application.
  • FIG. 4 is a schematic block diagram of a structured data processing apparatus according to an embodiment of the present application.
  • FIG. 5 is another schematic block diagram of a structure data processing apparatus according to an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 7 is another schematic structural diagram of an electronic device according to an embodiment of the present application.
  • module can be considered as a software object executing on the computing system.
  • the different components, modules, engines, and services described in this article can be considered as implementation objects on this computing system.
  • the device and method described herein are preferably implemented in software, and of course, they can also be implemented in hardware, which are all within the protection scope of this application.
  • the structure data processing device may be specifically integrated into an electronic device, such as a mobile phone, a tablet computer, and a personal digital assistant (PDA).
  • PDA personal digital assistant
  • An embodiment of the present application provides a method for processing structured data, including:
  • a document object model tree structure corresponding to the native page is obtained, and the document object model tree structure includes dynamic nodes and static nodes;
  • the rendered document object model tree structure is parsed by the rendering engine to generate a native page.
  • the step of traversing the nodes in the document object model tree structure and converting the static nodes into target nodes may include: traversing the nodes in the object model tree structure according to a preset rule; judging Whether the currently traversed node is a dynamic node; when it is determined that the currently traversed node is a dynamic node, the children of the currently traversed node are accessed; when it is determined that the currently traversed node is not a dynamic node, the currently traversed node is determined Converted into a target node.
  • the step of converting the currently traversed node into a target node may include: obtaining the currently traversed node and a child node of the currently traversed node; merging the child node into the currently traversed node. Node and convert the merged current traversed node into a target node.
  • the step of traversing the nodes in the object model tree structure according to a preset rule may include: starting to traverse based on the root node of the object model tree structure, and sequentially traversing the object model according to the rule from top to bottom Nodes in the tree structure.
  • the root node of the object model tree structure begins to traverse, and the steps of sequentially traversing the nodes in the object model tree structure according to the rule from top to bottom may include: starting from the root node of the object model tree structure Traversing; following the rules of traversing the sibling nodes of the same level layer, and then traversing the sibling nodes in the next level layer in turn, the nodes in the object model tree structure are sequentially traversed.
  • the step of merging the target node to generate a virtual node and loading the virtual node into the document object model tree structure may include: sequentially rendering the target node to generate multiple targets. Component; combine the multiple target components to generate a virtual component, and generate a virtual node from the virtual component and load it into the document object model tree structure.
  • the method may further include: adding a special identifier, adding an attribute, or using a special component name to mark each node, so that according to the identifier, The attribute or component name determines whether the node is a static node or a dynamic node.
  • An embodiment of the present application provides a method for processing structured data.
  • the method for processing structured data may include the following steps:
  • step S101 when a display instruction of a native page is received, a document object model tree structure corresponding to the native page is obtained.
  • the native page refers to the application native page opened through the fast application.
  • the fast application refers to the fact that the user does not need to download and install the application, click to use, and enjoy the performance experience of the native application in real time, which can greatly save the electronic device.
  • the storage space has the effect of "thinning" the electronic device.
  • the native page is composed of multiple components, such as a text component, an image component, a horizontal layout component, a vertical layout component, and a video component.
  • the multiple components refer to the Document Object Model of the World Wide Web Consortium (W3C).
  • the DOM) standard defines the composition method of the native page, that is, each component can be regarded as a node to form a tree structure.
  • the tree structure becomes the document object model tree structure, which includes dynamic Nodes and static nodes. Therefore, when a user performs an operation of opening a native page, the electronic device generates and receives a display instruction of the native page, and downloads and obtains a document object model tree structure corresponding to the native page.
  • step S102 the nodes in the document object model tree structure are traversed to convert the static nodes into target nodes.
  • the document object model tree structure includes multiple nodes, each node corresponds to a component, and the component maps the corresponding variable function.
  • the component maps the corresponding variable function.
  • the component is automatically updated according to the parameter.
  • the invariant part corresponds to a static variable function, that is, a static node
  • the changing part corresponds to a dynamic variable function, that is, a dynamic node.
  • the static nodes can be merged to shorten the hierarchical depth of the document object model tree structure and save the speed of later rendering. Therefore, the The nodes are traversed one by one, and the corresponding static node of the static variable function is converted into the target node.
  • a special identifier, an attribute, or a special component name may be added to each component to mark the component, so that the electronic device can quickly determine whether the component is a static component or is based on the identification, attribute, or component name. Dynamic components.
  • the steps of traversing the nodes in the document object model tree structure and converting the static nodes into the target nodes may include:
  • the currently traversed node is converted into a target node.
  • each node in the object model tree structure is traversed one by one, and it is determined whether the currently traversed node is dynamic according to whether the corresponding variable function parameter of the component on the node is changed. Node.
  • the corresponding variable of the component on the node is a variable that can be changed, it is determined that the currently traversed node is a dynamic node, and the byte points of the currently traversed node are automatically accessed.
  • the corresponding variable of the component on the node is a variable that cannot be changed, it is determined that the currently traversed node is a static node, and the currently traversed node is converted into a target node.
  • the step of converting the currently traversed node into a target node may include:
  • the child node is merged into the currently traversed node, and the merged current traversed node is converted into a target node.
  • the byte points of the currently traversed node and the currently traversed node can be obtained and the byte points can be merged.
  • the byte points of the static node are automatically merged to the parent node, so the time of traversing the judgment one by one is omitted, and the traversal is improved s efficiency.
  • the step of traversing the nodes in the object model tree structure according to a preset rule may include starting the traversal based on the root node of the object model tree structure, and sequentially traversing the object model tree structure according to the rules from top to bottom In the node.
  • the root node based on the object model structure begins to traverse, and the nodes in the object model tree structure are sequentially traversed according to the top-down rule.
  • the top-down rule is to traverse all sibling nodes at the same level and then to Go down the sibling nodes in the next level.
  • step S103 the target nodes are merged to generate a virtual node, and the virtual node is loaded into the document object model tree structure.
  • the target node is a static node, which is a node with constant parameters of the variable function
  • the target nodes are combined in advance to generate a total virtual node, and the virtual node is loaded into the document object model tree structure, so that the document The complexity of the node of the object model tree structure is reduced, which makes the efficiency of later rendering increase.
  • the steps of merging target nodes, generating virtual nodes, and loading the virtual nodes into the document object model tree structure may include:
  • multiple target nodes are sequentially rendered, multiple target components corresponding to the multiple target nodes are generated, the multiple target components are combined, a virtual component including multiple target components is generated, and the virtual component is loaded into the document Object model tree structure.
  • step S104 the loaded document object model tree structure is parsed by the rendering engine to generate a native page.
  • the rendering engine is responsible for fast application analysis and component drawing functions.
  • the rendering engine can be a JavaScript scripting language framework.
  • the JavaScript is a scripting language belonging to the network and has been widely used Web application development is often used to add a variety of dynamic functions to web pages to provide users with a more smooth and beautiful browsing effect.
  • the rendered document object model tree structure is parsed and rendered by the rendering engine on the electronic device, and the components are drawn on the display interface one by one to generate a native page. Since the virtual node contains a collection of multiple components, When parsing and rendering, only one call is needed to directly generate multiple components and draw them, which greatly reduces rendering time and communication times.
  • the method for processing structured data obtains a document object model tree structure corresponding to a native page when a display instruction of a native page is received; and traverses nodes in the document object model tree structure , Convert static nodes into target nodes; merge target nodes to generate virtual nodes, and load virtual nodes into the document object model tree structure; parse the loaded document object model tree structure through the rendering engine to generate native page.
  • This can determine the static nodes in the document object model tree structure corresponding to the native page, transform and merge the static nodes, generate virtual nodes and load them into the document object model tree, and reduce the hierarchical complexity of the document object model tree structure. Improved rendering efficiency of structured data.
  • FIG. 2 is another schematic flowchart of a structure data processing method according to an embodiment of the present application.
  • the method includes:
  • step S201 when a display instruction of a native page is received, a document object model tree structure corresponding to the native page is obtained.
  • the mobile phone when the mobile phone detects that the user opens the quick application, it automatically generates a display instruction of the native page, and downloads and obtains a document object model tree structure corresponding to the native page, and the document object model tree structure includes dynamic nodes and static nodes.
  • the document object model tree structure 100 includes a node A, a node B, a node C, a node D, a node E, and a node F.
  • step S202 the root node of the object model tree structure is traversed, and the nodes in the object model tree structure are traversed in order according to the rule from top to bottom.
  • the mobile phone starts to traverse based on the root node of the object model tree structure, and sequentially traverses the nodes in the object model tree structure according to the rules from top to bottom.
  • the mobile phone starts traversing from the root node A, and traverses the node A, the node B, the node C, the node D, the node E, and the node F according to the rules from top to bottom.
  • step S203 it is determined whether the currently traversed node is a dynamic node.
  • the mobile phone judges whether the currently traversed node is a dynamic node according to whether the corresponding component of the currently traversed node is a dynamic variable function. When the corresponding component of the currently traversed node is a dynamic variable function, it determines that the currently traversed node is For dynamic nodes, execute step S204. When the component corresponding to the currently traversed node is not a dynamic variable function, it is determined that the currently traversed node is not a dynamic node, and step S205 is performed.
  • the mobile phone determines that node A and node C are dynamic nodes.
  • step S204 the child nodes of the currently traversed node are accessed.
  • the currently traversed node When it is determined that the currently traversed node is a dynamic node, it automatically accesses the children of the currently traversed node, and then returns to step S203 to continue to determine whether the child node is a dynamic node.
  • step S205 the currently traversed node and the children of the currently traversed node are acquired, the child nodes are merged into the currently traversed node, and the merged current traversed node is converted into the target node.
  • the current traversed node when it is determined that the current traversed node is not a dynamic node, it indicates that the current traversed node is a static node, and since the children of the static node must also be static nodes, the byte points of the currently traversed node and the currently traversed node are automatically obtained , The byte points are automatically merged into the parent node of the current traversal, and the merged current traversed node is converted into the target node.
  • node B when node B is determined to be a static node, since node B is a tail node, node B is directly converted into the target node, and the traversal is continued.
  • node D is determined to be a static node, the node is The child node E and child node F of D are merged into the parent node D, and the merged node D is generated into a target node.
  • step S206 the target nodes are sequentially rendered, multiple target components are generated, multiple target components are combined, virtual components are generated, and virtual nodes are generated and loaded into the document object model tree structure.
  • the mobile phone renders target nodes in turn, generates target components corresponding to each target node, combines multiple target components, generates virtual components including multiple target components, generates virtual nodes based on the virtual components, and loads them into the document object model. Tree structure.
  • the mobile phone renders the target node transformed by Node B to generate a picture component 1.
  • the mobile phone renders the target node transformed by the merged node D to generate a mixed component 2 containing pictures and text.
  • the picture component 1 and The hybrid component 2 is merged to generate a virtual component including two components, a virtual node G is generated according to the virtual component, and the virtual node G is loaded into the document object model book structure to obtain a loaded document object model tree structure 200, which is loaded
  • the hierarchical level of the document object model tree structure 200 is significantly lower than that of the document object model tree structure 100 before loading.
  • step S207 the loaded document object model tree structure is parsed by the rendering engine to generate a native page.
  • the loaded document object model tree structure is parsed by a rendering engine integrated in the mobile phone, and each node is parsed into a corresponding component and rendered into a display interface to generate a native page.
  • the loaded document object model tree structure 200 is parsed through the JavaScript scripting language framework integrated in the mobile phone, and node C generates a corresponding picture component, virtual node G generates a virtual component including multiple components, and the picture component and The virtual component is drawn into the display interface according to the position attribute, and a native page is generated. Since the level of the document object model tree structure 200 after loading is significantly lower than that of the document object model tree structure 100 before loading, the rendering engine needs to communicate when parsing. The number of calls is reduced, which greatly reduces the rendering time.
  • the method for processing structured data obtains a document object model tree structure corresponding to a native page when a display instruction of a native page is received, and starts to traverse based on the root node of the object model tree structure.
  • iterate through the nodes in the object model tree structure merge the static nodes and the child nodes of the static nodes, convert each static node into a target node, render the target node to generate the corresponding target component, and
  • the virtual component is combined to generate a virtual node according to the virtual component and loaded into the document object model tree structure.
  • the loaded document object model tree structure is parsed by the rendering engine to generate a native page.
  • the embodiment of the present application further provides a device based on the above-mentioned structure data processing method.
  • the meanings of the nouns are the same as in the above-mentioned processing method of structured data. For specific implementation details, refer to the description in the method embodiment.
  • An embodiment of the present application provides a structure data processing device, including:
  • An obtaining unit configured to obtain a document object model tree structure corresponding to the native page when a display instruction of the native page is received, and the document object model tree structure includes a dynamic node and a static node;
  • a transformation unit which is used to traverse the nodes in the document object model tree structure and convert a static node into a target node;
  • a merging unit for merging the target node to generate a virtual node and loading the virtual node into the document object model tree structure
  • the parsing unit is configured to parse the loaded document object model tree structure through a rendering engine to generate a native page.
  • the transformation unit may include: a traversal subunit for traversing nodes in the object model tree structure according to a preset rule; a judgment subunit for judging whether the currently traversed node is a dynamic node ; Access sub-unit, used to access the child nodes of the currently traversed node when it is determined that the currently traversed node is a dynamic node; transformation sub-unit, used to determine the current traversed node is not a dynamic node, The currently traversed node is transformed into the target node.
  • the transformation subunit is specifically configured to: obtain the currently traversed node and the child nodes of the currently traversed node; merge the child node into the currently traversed node, and merge the merged
  • the currently traversed node is transformed into the target node.
  • the traversal subunit is specifically used to: start traversing based on the root node of the object model tree structure; after traversing the sibling nodes of the same level, and then traverse the sibling nodes in the next level The rules in turn traverse the nodes in the object model tree structure.
  • the processing device further includes: a marking unit, configured to add a special identification, add an attribute, or mark using a special component name for each node, so that the node is determined to be static according to the identification, attribute, or component name. Node or dynamic node.
  • FIG. 4 is a schematic diagram of a module of a structured data processing apparatus according to an embodiment of the present application.
  • the structured data processing device 300 includes: an obtaining unit 31, a converting unit 32, a merging unit 33, and a parsing unit 34.
  • the obtaining unit 31 is configured to obtain a document object model tree structure corresponding to the native page when a display instruction of the native page is received, and the document object model tree structure includes a dynamic node and a static node.
  • the native page is composed of multiple components, such as a text component, an image component, a horizontal layout component, a vertical layout component, and a video component.
  • the multiple components refer to the document object model standard of the World Wide Web Consortium to define the composition method of the native page.
  • each component can be regarded as a node to form a tree structure, and the tree structure becomes the document object model tree structure. Therefore, when the user performs an operation of opening a native page, the obtaining unit 31 generates and receives a display instruction of the native page, and downloads and obtains a document object model tree structure corresponding to the native page.
  • the conversion unit 32 is configured to traverse the nodes in the document object model tree structure and convert the static nodes into target nodes.
  • the document object model tree structure includes multiple nodes, each node corresponds to a component, and the component maps the corresponding variable function.
  • the component maps the corresponding variable function.
  • the component is automatically updated according to the parameter.
  • the invariant part corresponds to a static variable function, that is, a static node
  • the changing part corresponds to a dynamic variable function, that is, a dynamic node.
  • the transformation unit 32 can merge the static nodes to shorten the hierarchical depth of the document object model tree structure and save the speed of later rendering. Therefore, the transformation unit 32 performs a modification on the document object model tree.
  • the nodes in the structure are traversed one by one, and the corresponding static nodes of the static variable function are converted into target nodes.
  • a merging unit 33 is configured to merge the target node, generate a virtual node, and load the virtual node into a document object model tree structure.
  • the merging unit 33 combines the target nodes in advance to generate a total virtual node, and loads the virtual node into the document object model tree structure. , Which reduces the node complexity of the document object model tree structure and increases the efficiency of later rendering.
  • the merging unit 33 is specifically configured to sequentially render the target node to generate a plurality of target components; merge the plurality of target components to generate a virtual component, and generate a virtual node from the virtual component, and Load into the document object model tree structure.
  • the parsing unit 34 is configured to parse the loaded document object model tree structure by a rendering engine to generate a native page.
  • the rendering engine is responsible for fast application analysis and component drawing functions.
  • the rendering engine can be a JavaScript scripting language framework.
  • the JavaScript is a scripting language belonging to the network and has been widely used Web application development is often used to add a variety of dynamic functions to web pages to provide users with a more smooth and beautiful browsing effect.
  • the parsing unit 34 parses and renders the loaded document object model tree structure through the rendering engine on the electronic device, and draws the components one by one on the display interface to generate a native page. Because the virtual node contains a collection of multiple components, When the parsing unit 34 performs parsing and rendering, only one call is needed to directly generate multiple components and draw them, which greatly reduces rendering time and communication times.
  • FIG. 5 is another schematic diagram of a structure data processing apparatus provided by an embodiment of the present application.
  • the structure data processing apparatus 300 may further include:
  • the conversion unit 32 may include a traversal subunit 321, a determination subunit 322, an access subunit 323, and a conversion subunit 324.
  • the traversal subunit 321 is configured to traverse nodes in the object model tree structure according to a preset rule.
  • the judging subunit 322 is configured to judge whether the currently traversed node is a dynamic node.
  • the access subunit 323 is configured to access a child node of the currently traversed node when it is determined that the currently traversed node is a dynamic node.
  • the transformation subunit 324 is configured to transform the currently traversed node into a target node when it is determined that the currently traversed node is not a dynamic node.
  • the transformation subunit 324 is specifically configured to obtain the currently traversed node and the children of the currently traversed node; merge the child node into the currently traversed node, and merge the merged current traversal The node is transformed into the target node.
  • the traversing subunit 321 is specifically configured to start traversing based on the root node of the object model tree structure, and sequentially traverse the nodes in the object model tree structure according to the rules from top to bottom.
  • the structure data processing apparatus obtains a document object model tree structure corresponding to a native page when the obtaining unit 31 receives a display instruction of the native page;
  • the nodes in the structure are traversed to convert the static nodes into target nodes;
  • the merging unit 33 merges the target nodes to generate virtual nodes and loads the virtual nodes into the document object model tree structure;
  • the parsing unit 34 uses the rendering engine to load the
  • the document object model tree structure is parsed to generate a native page. This can determine the static nodes in the document object model tree structure corresponding to the native page, transform and merge the static nodes, generate virtual nodes and load them into the document object model tree, and reduce the hierarchical complexity of the document object model tree structure. Improved rendering efficiency of structured data.
  • the electronic device 500 includes a processor 501 and a memory 502.
  • the processor 501 is electrically connected to the memory 502.
  • the processor 500 is a control center of the electronic device 500, and uses various interfaces and lines to connect various parts of the entire electronic device.
  • the processor 500 runs or loads a computer program stored in the memory 502, and calls data stored in the memory 502 to execute Various functions of the electronic device 500 and data are processed to perform overall monitoring of the electronic device 500.
  • the memory 502 can be used to store software programs and modules.
  • the processor 501 executes various functional applications and data processing by running computer programs and modules stored in the memory 502.
  • the memory 502 may mainly include a storage program area and a storage data area, where the storage program area may store an operating system, a computer program (such as a sound playback function, an image playback function, etc.) required for at least one function, and the like; Data created by the use of electronic devices, etc.
  • the memory 502 may include a high-speed random access memory, and may further include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 502 may further include a memory controller to provide the processor 501 with access to the memory 502.
  • the processor 501 in the electronic device 500 loads the instructions corresponding to the process of one or more computer programs into the memory 502 according to the following steps, and the processor 501 runs the stored data in the memory 502
  • a computer program in the computer to achieve various functions, as follows:
  • a document object model tree structure corresponding to the native page is obtained, and the document object model tree structure includes dynamic nodes and static nodes;
  • the rendered document object model tree structure is parsed by the rendering engine to generate a native page.
  • the document object model tree structure includes dynamic nodes and static nodes.
  • the processor 501 may specifically execute the following step:
  • the children of the currently traversed node are accessed;
  • the currently traversed node is converted into a target node.
  • the processor 501 when converting the currently traversed node into a target node, the processor 501 may specifically perform the following steps:
  • the child node is merged into the currently traversed node, and the merged current traversed node is converted into a target node.
  • the processor 501 may specifically perform the following steps:
  • the nodes in the object model tree structure are traversed in order according to the rules from top to bottom.
  • the processor 501 may specifically perform the following steps:
  • the multiple target components are combined to generate a virtual component, and the virtual component is generated into a virtual node and loaded into the document object model tree structure.
  • the processor 501 may specifically perform the following steps:
  • the multiple target components are combined to generate a virtual component, and the virtual component is generated into a virtual node and loaded into the document object model tree structure.
  • the processor 501 may further specifically perform the following steps:
  • Each node is added with a special identifier, an attribute is added, or a special component name is used for marking, so that the node is determined to be a static node or a dynamic node according to the identifier, the attribute, or the component name.
  • the electronic device in the embodiment of the present application obtains the document object model tree structure corresponding to the native page when receiving the display instruction of the native page; traverses the nodes in the document object model tree structure to convert the static nodes Is the target node; merge the target nodes to generate a virtual node and load the virtual node into the document object model tree structure; parse the loaded document object model tree structure through the rendering engine to generate a native page.
  • This can determine the static nodes in the document object model tree structure corresponding to the native page, transform and merge the static nodes, generate virtual nodes and load them into the document object model tree, and reduce the hierarchical complexity of the document object model tree structure. Improved rendering efficiency of structured data.
  • the electronic device 500 may further include a display 503, a radio frequency circuit 504, an audio circuit 505, and a power supply 506.
  • the display 503, the radio frequency circuit 504, the audio circuit 505, and the power supply 506 are electrically connected to the processor 501, respectively.
  • the display 503 may be used to display information input by the user or information provided to the user and various graphical user interfaces. These graphical user interfaces may be composed of graphics, text, icons, videos, and any combination thereof.
  • the display 503 may include a display panel.
  • the display panel may be configured by using a liquid crystal display (Liquid Crystal Display, LCD), or an organic light emitting diode (Organic Light-Emitting Diode, OLED).
  • the radio frequency circuit 504 can be used to transmit and receive radio frequency signals to establish wireless communication with a network device or other electronic devices through wireless communication, and transmit and receive signals to and from the network device or other electronic devices.
  • the audio circuit 505 may be used to provide an audio interface between the user and the electronic device through a speaker or a microphone.
  • the power supply 506 can be used to power various components of the electronic device 500.
  • the power supply 506 may be logically connected to the processor 501 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system.
  • the electronic device 500 may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
  • An embodiment of the present application further provides a storage medium that stores a computer program.
  • the computer program runs on a computer, the computer is caused to execute the method for processing structured data in any of the foregoing embodiments, for example, by
  • the document object model tree structure corresponding to the native page is obtained, and the document object model tree structure includes dynamic nodes and static nodes; the nodes in the document object model tree structure are traversed to convert the static nodes into Target node; merge the target node to generate a virtual node and load the virtual node into the document object model tree structure; parse the loaded document object model tree structure through a rendering engine to generate a native page.
  • the storage medium may be a magnetic disk, an optical disc, a read-only memory (ROM), or a random access memory (Random Access Memory, RAM).
  • ROM read-only memory
  • RAM Random Access Memory
  • the computer program may be stored in a computer-readable storage medium, such as stored in a memory of an electronic device, and executed by at least one processor in the electronic device. During execution, the computer program may include, for example, a structure The flow of the embodiment of the data processing method.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, or the like.
  • its functional modules may be integrated into one processing chip, or each module may exist separately physically, or two or more modules may be integrated into one module.
  • the above integrated modules may be implemented in the form of hardware or software functional modules. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk, or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Document Processing Apparatus (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本申请公开了一种结构数据的处理方法,包括:当接收到原生页面的显示指令时,获取原生页面相应的文档对象模型树结构;对文档对象模型树结构中的节点进行遍历,将静态节点转化为目标节点并进行合并,生成虚拟节点,并将虚拟节点加载到文档对象模型树结构中;对加载后的文档对象模型树结构进行解析,以生成原生页面。

Description

结构数据的处理方法、装置、存储介质及电子设备
本申请要求于2018年09月29日提交中国专利局、申请号为201811152477.6、发明名称为“一种结构数据的处理方法、装置、存储介质及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及信息处理技术领域,尤其涉及一种结构数据的处理方法、装置、存储介质及电子设备。
背景技术
随着电子技术的不断发展,电子设备如手机的功能越来越强大,用户可以通过各式各样的快应用程序去浏览应用的原生页面,如浏览原生页面上的文字信息、图像信息、音视频信息以及卡片信息等等。
目前,手机在通过快应用程序生成原生页面时,需要调用应用中的渲染引擎对快应用组件相应的快应用代码进行解析和渲染,而快应用组件彼此之间以文档对象模型(Document Object Mode,DOM)树的结构进行存储,每一个快应用组件视为文档对象模型树中的一个节点,由于原生页面的显示内容越来越复杂,导致文档对象树的层次越来越高,进而造成渲染时间越来越长。
发明内容
本申请实施例提供一种结构数据的处理方法、装置、存储介质及电子设备,可以降低结构数据的层次复杂度,提升结构数据的渲染效率。
第一方面,本申请实施例提供了一种结构数据的处理方法,包括:
当接收到原生页面的显示指令时,获取所述原生页面相应的文档对象模型树结构,所述文档对象模型树结构包括动态节点以及静态节点;
对所述文档对象模型树结构中的节点进行遍历,将静态节点转化为目标节点;
将所述目标节点进行合并,生成虚拟节点,并将所述虚拟节点加载到文档对象模型树结构中;
通过渲染引擎对加载后的文档对象模型树结构进行解析,以生成原生页面。
第二方面,本申请实施例提供了的一种结构数据的处理装置,包括:
获取单元,用于当接收到原生页面的显示指令时,获取所述原生页面相应的文档对象模型树结构,所述文档对象模型树结构包括动态节点以及静态节点;
转化单元,用于对所述文档对象模型树结构中的节点进行遍历,将静态节点转化为目标节点;
合并单元,用于将所述目标节点进行合并,生成虚拟节点,并将所述虚拟节点加载到文档对象模型树结构中;
解析单元,用于通过渲染引擎对加载后的文档对象模型树结构进行解析,以生成原生页面。
第三方面,本申请实施例提供的存储介质,其上存储有计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行如本申请任一实施例提供的结构数据的处理方法。
第四方面,本申请实施例提供的电子设备,包括处理器和存储器,所述处理器通过调用所述存储器中存储的计算机程序,用于执行步骤:
当接收到原生页面的显示指令时,获取所述原生页面相应的文档对象模型树结构,所述文档对象模型树结构包括动态节点以及静态节点;
对所述文档对象模型树结构中的节点进行遍历,将静态节点转化为目标节点;
将所述目标节点进行合并,生成虚拟节点,并将所述虚拟节点加载到文档对象模型树结构中;
通过渲染引擎对加载后的文档对象模型树结构进行解析,以生成原生页面。
附图说明
下面结合附图,通过对本申请的具体实施方式详细描述,将使本申请的技术方案及其它有益效果显而易见。
图1是本申请实施例提供的结构数据的处理方法的流程示意图。
图2为本申请实施例提供的结构数据的处理方法的另一流程示意图。
图3是本申请实施例提供的结构数据的处理方法的场景示意图。
图4为本申请实施例提供的结构数据的处理装置的模块示意图。
图5为本申请实施例提供的结构数据的处理装置的另一模块示意图。
图6为本申请实施例提供的电子设备的结构示意图。
图7为本申请实施例提供的电子设备的另一结构示意图。
具体实施方式
请参照图式,其中相同的组件符号代表相同的组件,本申请的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所例示的本申请具体实施例,其不应被视为限制本申请未在此详述的其它具体实施例。
本文所使用的术语「模块」可看做为在该运算系统上执行的软件对象。本文该的不同组件、模块、引擎及服务可看做为在该运算系统上的实施对象。而本文该的装置及方法优选的以软件的方式进行实施,当然也可在硬件上进行实 施,均在本申请保护范围之内。
以下进行具体分析说明。
在本实施例中,将从结构数据的处理装置的角度进行描述,该结构数据的处理装置具体可以集成在电子设备,比如手机、平板电脑、掌上电脑(PDA,Personal Digital Assistant)等。
本申请实施例提供一种结构数据的处理方法,包括:
当接收到原生页面的显示指令时,获取该原生页面相应的文档对象模型树结构,该文档对象模型树结构包括动态节点以及静态节点;
对该文档对象模型树结构中的节点进行遍历,将静态节点转化为目标节点;
将该目标节点进行合并,生成虚拟节点,并将该虚拟节点加载到文档对象模型树结构中;
通过渲染引擎对加载后的文档对象模型树结构进行解析,以生成原生页面。
在一种实施方式中,该对该文档对象模型树结构中的节点进行遍历,将静态节点转化为目标节点的步骤,可以包括:按照预设规则对对象模型树结构中的节点进行遍历;判断当前遍历的节点是否为动态节点;当判断出当前遍历的节点为动态节点时,访问该当前遍历的节点的子节点;当判断出当前遍历的节点不为动态节点时,将该当前遍历的节点转化为目标节点。
在一种实施方式中,该将该当前遍历的节点转化为目标节点的步骤,可以包括:获取该当前遍历的节点以及该当前遍历的节点的子节点;将该子节点合并到该当前遍历的节点中,并将合并后的当前遍历的节点转化为目标节点。
在一种实施方式中,该按照预设规则对对象模型树结构中的节点进行遍历的步骤,可以包括:基于对象模型树结构的根节点开始遍历,按照从上至下的规则依次遍历对象模型树结构中的节点。
在一种实施方式中,该基于对象模型树结构的根节点开始遍历,按照从上至下的规则依次遍历对象模型树结构中的节点的步骤,可以包括:基于对象模型树结构的根节点开始遍历;按照将同一级别层的兄弟节点遍历后,再向下遍历下一级别层中的兄弟节点的规则依次遍历对象模型树结构中的节点。
在一种实施方式中,该将该目标节点进行合并,生成虚拟节点,并将该虚拟节点加载到文档对象模型树结构中的步骤,可以包括:将该目标节点进行依次渲染,生成多个目标组件;将该多个目标组件进行合并,生成虚拟组件,并将该虚拟组件生成虚拟节点并加载到文档对象模型树结构中。
在一种实施方式中,该获取该原生页面相应的文档对象模型树结构的步骤之前,还可以包括:为每一节点添加特殊标识、增加属性或者使用特殊组件名 进行标记,以使得根据标识、属性或者组件名确定出节点为静态节点或者动态节点。
本申请实施例提供一种结构数据的处理方法,如图1所示,该结构数据的处理方法,可以包括以下步骤:
在步骤S101中,当接收到原生页面的显示指令时,获取原生页面相应的文档对象模型树结构。
需要说明的是,该原生页面指通过快应用打开的应用原生页面,该快应用指用户无需下载安装应用,即点即用,实时享受原生应用的性能体验,可以很大程度的节省电子设备的存储空间,起到对电子设备“瘦身”的效果。
其中,该原生页面由多个组件构成,如文字组件、图片组件、横向布局组件、纵向布局组件,视频组件等等,该多个组件参考万维网联盟(W3C)的文档对象模型(Document Object Model,DOM)标准定义了原生页面的组成方法,也就是说可以将每个组件视为一个节点,组成一棵树形结构,该树形结构成为文档对象模型树结构,该文档对象模型树结构包括动态节点以及静态节点。因此,当用户执行打开原生页面的操作时,电子设备生成并接收原生页面的显示指令,并下载获取原生页面相应的文档对象模型树结构。
在步骤S102中,对文档对象模型树结构中的节点进行遍历,将静态节点转化为目标节点。
其中,文档对象模型树结构中包括多个节点,每个节点对应一个组件,而组件映射相应的变量函数,当变量函数中的参数改变时,组件自动根据参数进行更新,由于网页中的组件内容通常有变化部分以及不变部分,该不变部分,对应为静态变量函数,即为静态节点,该变化部分,对应为动态变量函数,即为动态节点。
进一步的,由于静态节点中的内容不会发生变化,所以可以将静态节点进行合并,以缩短文档对象模型树结构的层次深度,节省后期的渲染的速度,因此,对文档对象模型树结构中的节点进行逐一遍历,将静态变量函数相应的静态节点转化为目标节点。
在一实施方式中,还可以在每一组件中添加特殊标识、增加属性或者使用特殊组件名等其他方式进行标记,使得电子设备可以快速根据标识、属性或者组件名确定出组件为静态组件或者是动态组件。
在一些实施方式中,对文档对象模型树结构中的节点进行遍历,将静态节点转化为目标节点的步骤,可以包括:
(1)按照预设规则对对象模型树结构中的节点进行遍历;
(2)判断当前遍历的节点是否为动态节点;
(3)当判断出当前遍历的节点为动态节点时,访问该当前遍历的节点的子节点;
(4)当判断出当前遍历的节点不为动态节点时,将该当前遍历的节点转化为目标节点。
其中,可以按照预设遍历规则,如从上至下规则对对象模型树结构中的每一节点进行逐一遍历,根据节点上组件相应的变量函数的参数是否改变来判断当前遍历的节点是否为动态节点,当节点上组件相应的变量为可以改变的变量时,则判断出当前遍历的节点为动态节点,自动访问该当前遍历的节点的字节点。当节点上组件相应的变量为不可以改变的变量时,则判断出当前遍历的节点为静态节点,将当前遍历的节点转化为目标节点。
在一些实施方式中,该将该当前遍历的节点转化为目标节点的步骤,可以包括:
(1.1)获取该当前遍历的节点以及该当前遍历的节点的子节点;
(1.2)将该子节点合并到该当前遍历的节点中,并将合并后的当前遍历的节点转化为目标节点。
其中,当判断出当前遍历的节点为静态节点时,由于静态节点的子节点也一定为静态节点,所以可以获取该当前遍历的节点以及该当前遍历的节点的字节点,将字节点合并到该当前遍历的节点中,并将合并后的当前遍历的节点转化为目标节点,由于自动将静态节点的字节点合并到父节点上,所以省去了逐一遍历判断的时间,提升了遍历的效率。
在一些实施方式中,该按照预设规则对对象模型树结构中的节点进行遍历的步骤,可以包括基于对象模型树结构的根节点开始遍历,按照从上至下的规则依次遍历对象模型树结构中的节点。
其中,基于对象模型结构的根节点开始遍历,按照从上至下的规则依次遍历对象模型树结构中的节点,该从上至下的规则为将同一级别层的兄弟节点都遍历后,再向下遍历下一级别层中的兄弟节点。
在步骤S103中,将目标节点进行合并,生成虚拟节点,并将虚拟节点加载到文档对象模型树结构中。
其中,由于目标节点为静态节点,都是变量函数的参数不变的节点,所以预先将目标节点进行合并,生成一个总的虚拟节点,并将虚拟节点加载到文档对象模型树结构中,使得文档对象模型树结构的节点复杂度下降,使得后期渲染的效率增加。
在一些实施方式中,该将目标节点进行合并,生成虚拟节点,并将虚拟节点加载到文档对象模型树结构中的步骤,可以包括:
(1)将该目标节点进行依次渲染,生成多个目标组件;
(2)将该多个目标组件进行合并,生成虚拟组件,并将该虚拟组件生成虚拟节点并加载到文档对象模型树结构中。
其中,将多个目标节点进行依次渲染,生成多个目标节点相应的多个目标组件,将该多个目标组件进行合并,生成包含多个目标组件的虚拟组件,并将该虚拟组件加载到文档对象模型树结构中。
在步骤S104中,通过渲染引擎对加载后的文档对象模型树结构进行解析,以生成原生页面。
其中,该渲染引擎为负责快应用的解析,以及组件绘制的功能,在一实施方式中,该渲染引擎可以为JavaScript脚本语言框架,该JavaScript是一种属于网络的脚本语言,已经被广泛用于Web应用开发,常用来为网页添加各式各样的动态功能,为用户提供更流畅美观的浏览效果。
进一步的,通过电子设备上的渲染引擎对加载后的文档对象模型树结构进行解析渲染,逐一将组件绘制到显示界面上,以生成原生页面,由于虚拟节点中包含多个组件的集合,在进行解析渲染时,只需要进行一次调用,就可以直接生成多个组件并进行绘制,极大的减少了渲染时间以及通信次数。
由上述可知,本实施例提供的一种结构数据的处理方法,通过当接收到原生页面的显示指令时,获取原生页面相应的文档对象模型树结构;对文档对象模型树结构中的节点进行遍历,将静态节点转化为目标节点;将目标节点进行合并,生成虚拟节点,并将虚拟节点加载到文档对象模型树结构中;通过渲染引擎对加载后的文档对象模型树结构进行解析,以生成原生页面。以此可以确定原生页面相应的文档对象模型树结构中的静态节点,将静态节点进行转化并合并,生成虚拟节点并加载到文档对象模型树中,降低了文档对象模型树结构的层次复杂度,提升了结构数据的渲染效率。
根据上述实施例所描述的方法,以下将举例作进一步详细说明。
请参阅图2,图2为本申请实施例提供的结构数据的处理方法的另一流程示意图。
具体而言,该方法包括:
在步骤S201中,当接收到原生页面的显示指令时,获取原生页面相应的文档对象模型树结构。
需要说明的是,为了更好的说明本实施例,将电子设备以手机为例进行说 明。
其中,当手机检测到用户打开快应用时,自动生成原生页面的显示指令,并相应下载获取原生页面相应的文档对象模型树结构,该文档对象模型树结构包括动态节点以及静态节点。
例如,如图3所示,当手机接收到原生页面的显示指令时,手机会下载获取原生页面相应的文档对象模型树结构100。该文档对象模型树结构100包括节点A、节点B、节点C、节点D、节点E、节点F。
在步骤S202中,基于对象模型树结构的根节点开始遍历,按照从上至下的规则依次遍历对象模型树结构中的节点。
其中,手机基于对象模型树结构的根节点开始遍历,按照从上至下的规则依次遍历对象模型树结构中的节点进行遍历。
例如,如图3所示,手机从根节点A开始遍历,按照从上至下的规则依次对节点A、节点B、节点C、节点D、节点E以及节点F进行遍历。
在步骤S203中,判断当前遍历的节点是否为动态节点。
其中,手机根据当前遍历的节点相应的组件的是否为动态变量函数,来判断当前遍历的节点是否为动态节点,在当前遍历的节点相应的组件为动态变量函数时,判断为当前遍历的节点为动态节点,执行步骤S204。在当前遍历的节点相应的组件不为动态变量函数时,判断为当前遍历的节点不为动态节点,执行步骤S205。
例如,如图3所示,手机判断出节点A以及节点C为动态节点。
在步骤S204中,访问当前遍历的节点的子节点。
其中,当判断出当前遍历的节点为动态节点时,自动访问当前遍历的节点的子节点,进而返回步骤S203,继续判断该子节点是否为动态节点。
在步骤S205中,获取当前遍历的节点以及当前遍历的节点的子节点,将子节点合并到当前遍历的节点中,并将合并后的当前遍历的节点转化为目标节点。
其中,当判断出当前遍历节点不为动态节点时,说明当前遍历节点为静态节点,由于静态节点的子节点也一定为静态节点,所以自动获取当前遍历的节点以及当前遍历的节点的字节点,将字节点自动合并到当前遍历的父节点中,并将合并后的当前遍历的节点转化为目标节点。
例如,如图3所示,当判断出节点B为静态节点时,由于节点B为尾节点,所以直接将节点B转化为目标节点,继续遍历,在判断出节点D为静态节点时,将节点D的子节点E以及子节点F合并到父节点D中,并将合并后 的节点D生成目标节点。
在步骤S206中,将目标节点进行依次渲染,生成多个目标组件,将多个目标组件进行合并,生成虚拟组件,并将虚拟组件生成虚拟节点并加载到文档对象模型树结构中。
其中,手机依次将目标节点进行渲染,生成每一个目标节点相应的目标组件,将多个目标组件进行合并,生成包含多个目标组件的虚拟组件,基于虚拟组件生成虚拟节点并加载到文档对象模型树结构中。
例如,手机对节点B转化的目标节点进行渲染,生成图片组件1,手机对合并后的节点D转化的目标节点进行渲染,生成包含图片和文本的混合组件2,按照布局规则将图片组件1以及混合组件2进行合并,生成包含两个组件的虚拟组件,根据虚拟组件生成虚拟节点G,并将虚拟节点G加载到文档对象模型书结构中,得到加载后的文档对象模型树结构200,该加载后的文档对象模型树结构200的层次明显低于加载前的文档对象模型树结构100。
在步骤S207中,通过渲染引擎对加载后的文档对象模型树结构进行解析,以生成原生页面。
其中,通过手机中集成的渲染引擎对加载后的文档对象模型树结构进行解析,将每个节点解析为相应的组件并渲染到显示界面中,以生成原生页面。
例如,通过手机中集成的JavaScript脚本语言框架对加载后的文档对象模型树结构200进行解析,将节点C生成相应的图片组件,将虚拟节点G生成包含多个组件的虚拟组件,将图片组件以及虚拟组件按照位置属性绘制到显示界面中,生成原生页面,由于加载后的文档对象模型树结构200的层次明显低于加载前的文档对象模型树结构100,所以渲染引擎在进行解析时,需要通信调取的次数降低,极大的减少了渲染的时间。
由上述可知,本实施例提供的一种结构数据的处理方法,通过当接收到原生页面的显示指令时,获取原生页面相应的文档对象模型树结构,基于对象模型树结构的根节点开始遍历,按照从上至下的规则依次遍历对象模型树结构中的节点,将静态节点以及静态节点的子节点合并,并将每一静态节点转化为目标节点,将目标节点渲染生成相应的目标组件,并合并生成虚拟组件,根据虚拟组件生成虚拟节点并加载到文档对象模型树结构中,通过渲染引擎对加载后的文档对象模型树结构进行解析,以生成原生页面。以此可以确定原生页面相应的文档对象模型树结构中的静态节点,将静态节点进行转化并合并,生成虚拟节点并加载到文档对象模型树中,降低了文档对象模型树结构的层次复杂度,提升了结构数据的渲染效率。
为便于更好的实施本申请实施例提供的结构数据的处理方法,本申请实施例还提供一种基于上述结构数据的处理方法的装置。其中名词的含义与上述结构数据的处理方法中相同,具体实现细节可以参考方法实施例中的说明。
本申请实施例提供一种结构数据的处理装置,包括:
获取单元,用于当接收到原生页面的显示指令时,获取该原生页面相应的文档对象模型树结构,该文档对象模型树结构包括动态节点以及静态节点;
转化单元,用于对该文档对象模型树结构中的节点进行遍历,将静态节点转化为目标节点;
合并单元,用于将该目标节点进行合并,生成虚拟节点,并将该虚拟节点加载到文档对象模型树结构中;
解析单元,用于通过渲染引擎对加载后的文档对象模型树结构进行解析,以生成原生页面。
在一种实施方式中,该转化单元,可以包括:遍历子单元,用于按照预设规则对对象模型树结构中的节点进行遍历;判断子单元,用于判断当前遍历的节点是否为动态节点;访问子单元,用于当判断出当前遍历的节点为动态节点时,访问该当前遍历的节点的子节点;转化子单元,用于当判断出当前遍历的节点不为动态节点时,将该当前遍历的节点转化为目标节点。
在一种实施方式中,该转化子单元,具体用于:获取该当前遍历的节点以及该当前遍历的节点的子节点;将该子节点合并到该当前遍历的节点中,并将合并后的当前遍历的节点转化为目标节点。
在一种实施方式中,该遍历子单元,具体用于:基于对象模型树结构的根节点开始遍历;按照将同一级别层的兄弟节点遍历后,再向下遍历下一级别层中的兄弟节点的规则依次遍历对象模型树结构中的节点。
在一种实施方式中,该处理装置还包括:标记单元,用于为每一节点添加特殊标识、增加属性或者使用特殊组件名进行标记,以使得根据标识、属性或者组件名确定出节点为静态节点或者动态节点。
请参阅图4,图4为本申请实施例提供的结构数据的处理装置的模块示意图。具体而言,该结构数据的处理装置300,包括:获取单元31、转化单元32、合并单元33以及解析单元34。
获取单元31,用于当接收到原生页面的显示指令时,获取该原生页面相应的文档对象模型树结构,该文档对象模型树结构包括动态节点以及静态节点。
其中,该原生页面由多个组件构成,如文字组件、图片组件、横向布局组件、纵向布局组件,视频组件等等,该多个组件参考万维网联盟的文档对象模 型标准定义了原生页面的组成方法,也就是说可以将每个组件视为一个节点,组成一棵树形结构,该树形结构成为文档对象模型树结构。因此,当用户执行打开原生页面的操作时,获取单元31生成并接收原生页面的显示指令,并下载获取原生页面相应的文档对象模型树结构。
转化单元32,用于对该文档对象模型树结构中的节点进行遍历,将静态节点转化为目标节点。
其中,文档对象模型树结构中包括多个节点,每个节点对应一个组件,而组件映射相应的变量函数,当变量函数中的参数改变时,组件自动根据参数进行更新,由于网页中的组件内容通常有变化部分以及不变部分,该不变部分,对应为静态变量函数,即为静态节点,该变化部分,对应为动态变量函数,即为动态节点。
由于静态节点中的内容不会发生变化,所以转化单元32可以将静态节点进行合并,以缩短文档对象模型树结构的层次深度,节省后期的渲染的速度,因此,转化单元32对文档对象模型树结构中的节点进行逐一遍历,将静态变量函数相应的静态节点转化为目标节点。
合并单元33,用于将该目标节点进行合并,生成虚拟节点,并将该虚拟节点加载到文档对象模型树结构中。
其中,由于目标节点为静态节点,都是变量函数的参数不变的节点,所以合并单元33预先将目标节点进行合并,生成一个总的虚拟节点,并将虚拟节点加载到文档对象模型树结构中,使得文档对象模型树结构的节点复杂度下降,使得后期渲染的效率增加。
在一些实施方式中,该合并单元33,具体用于将该目标节点进行依次渲染,生成多个目标组件;将该多个目标组件进行合并,生成虚拟组件,并将该虚拟组件生成虚拟节点并加载到文档对象模型树结构中。
解析单元34,用于通过渲染引擎对加载后的文档对象模型树结构进行解析,以生成原生页面。
其中,该渲染引擎为负责快应用的解析,以及组件绘制的功能,在一实施方式中,该渲染引擎可以为JavaScript脚本语言框架,该JavaScript是一种属于网络的脚本语言,已经被广泛用于Web应用开发,常用来为网页添加各式各样的动态功能,为用户提供更流畅美观的浏览效果。
进一步的,解析单元34通过电子设备上的渲染引擎对加载后的文档对象模型树结构进行解析渲染,逐一将组件绘制到显示界面上,以生成原生页面,由于虚拟节点中包含多个组件的集合,在解析单元34进行解析渲染时,只需 要进行一次调用,就可以直接生成多个组件并进行绘制,极大的减少了渲染时间以及通信次数。
可一并参考图5,图5为本申请实施例提供的结构数据的处理装置的另一模块示意图,该结构数据的处理装置300还可以包括:
其中,该转化单元32可以包括遍历子单元321、判断子单元322、访问子单元323以及转化子单元324。
进一步的,该遍历子单元321,用于按照预设规则对对象模型树结构中的节点进行遍历。该判断子单元322,用于判断当前遍历的节点是否为动态节点。访问子单元323,用于当判断出当前遍历的节点为动态节点时,访问该当前遍历的节点的子节点。转化子单元324,用于当判断出当前遍历的节点不为动态节点时,将该当前遍历的节点转化为目标节点。
在一些实施方式中,该转化子单元324具体用于获取该当前遍历的节点以及该当前遍历的节点的子节点;将该子节点合并到该当前遍历的节点中,并将合并后的当前遍历的节点转化为目标节点。
在一些实施方式中,该遍历子单元321,具体用于基于对象模型树结构的根节点开始遍历,按照从上至下的规则依次遍历对象模型树结构中的节点。
由上述可知,本实施例提供的一种结构数据的处理装置,通过当获取单元31接收到原生页面的显示指令时,获取原生页面相应的文档对象模型树结构;转化单元32对文档对象模型树结构中的节点进行遍历,将静态节点转化为目标节点;合并单元33将目标节点进行合并,生成虚拟节点,并将虚拟节点加载到文档对象模型树结构中;解析单元34通过渲染引擎对加载后的文档对象模型树结构进行解析,以生成原生页面。以此可以确定原生页面相应的文档对象模型树结构中的静态节点,将静态节点进行转化并合并,生成虚拟节点并加载到文档对象模型树中,降低了文档对象模型树结构的层次复杂度,提升了结构数据的渲染效率。
本申请实施例还提供一种电子设备。请参阅图6,电子设备500包括处理器501以及存储器502。其中,处理器501与存储器502电性连接。
该处理器500是电子设备500的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或加载存储在存储器502内的计算机程序,以及调用存储在存储器502内的数据,执行电子设备500的各种功能并处理数据,从而对电子设备500进行整体监控。
该存储器502可用于存储软件程序以及模块,处理器501通过运行存储在存储器502的计算机程序以及模块,从而执行各种功能应用以及数据处理。存 储器502可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的计算机程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备的使用所创建的数据等。此外,存储器502可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器502还可以包括存储器控制器,以提供处理器501对存储器502的访问。
在本申请实施例中,电子设备500中的处理器501会按照如下的步骤,将一个或一个以上的计算机程序的进程对应的指令加载到存储器502中,并由处理器501运行存储在存储器502中的计算机程序,从而实现各种功能,如下:
当接收到原生页面的显示指令时,获取该原生页面相应的文档对象模型树结构,该文档对象模型树结构包括动态节点以及静态节点;
对该文档对象模型树结构中的节点进行遍历,将静态节点转化为目标节点;
将该目标节点进行合并,生成虚拟节点,并将该虚拟节点加载到文档对象模型树结构中;
通过渲染引擎对加载后的文档对象模型树结构进行解析,以生成原生页面。
在某些实施方式中,该文档对象模型树结构包括动态节点以及静态节点,该对该文档对象模型树结构中的节点进行遍历,将静态节点转化为目标节点时,处理器501可以具体执行以下步骤:
按照预设规则对对象模型树结构中的节点进行遍历;
判断当前遍历的节点是否为动态节点;
当判断出当前遍历的节点为动态节点时,访问该当前遍历的节点的子节点;
当判断出当前遍历的节点不为动态节点时,将该当前遍历的节点转化为目标节点。
在某些实施方式中,在将该当前遍历的节点转化为目标节点时,处理器501可以具体执行以下步骤:
获取该当前遍历的节点以及该当前遍历的节点的子节点;
将该子节点合并到该当前遍历的节点中,并将合并后的当前遍历的节点转化为目标节点。
在某些实施方式中,在按照预设规则对对象模型树结构中的节点进行遍历时,处理器501可以具体执行以下步骤:
基于对象模型树结构的根节点开始遍历,按照从上至下的规则依次遍历对象模型树结构中的节点。
在某些实施方式中,在将该目标节点进行合并,生成虚拟节点,并将该虚 拟节点加载到文档对象模型树结构中时,处理器501可以具体执行以下步骤:
将该目标节点进行依次渲染,生成多个目标组件;
将该多个目标组件进行合并,生成虚拟组件,并将该虚拟组件生成虚拟节点并加载到文档对象模型树结构中。
在某些实施方式中,在将该目标节点进行合并,生成虚拟节点,并将该虚拟节点加载到文档对象模型树结构中时,处理器501可以具体执行以下步骤:
将该目标节点进行依次渲染,生成多个目标组件;
将该多个目标组件进行合并,生成虚拟组件,并将该虚拟组件生成虚拟节点并加载到文档对象模型树结构中。
在某些实施方式中,在获取该原生页面相应的文档对象模型树结构之前,处理器501还可以具体执行以下步骤:
为每一节点添加特殊标识、增加属性或者使用特殊组件名进行标记,以使得根据标识、属性或者组件名确定出节点为静态节点或者动态节点。
由上述可知,本申请实施例的电子设备,通过当接收到原生页面的显示指令时,获取原生页面相应的文档对象模型树结构;对文档对象模型树结构中的节点进行遍历,将静态节点转化为目标节点;将目标节点进行合并,生成虚拟节点,并将虚拟节点加载到文档对象模型树结构中;通过渲染引擎对加载后的文档对象模型树结构进行解析,以生成原生页面。以此可以确定原生页面相应的文档对象模型树结构中的静态节点,将静态节点进行转化并合并,生成虚拟节点并加载到文档对象模型树中,降低了文档对象模型树结构的层次复杂度,提升了结构数据的渲染效率。
请一并参阅图7,在某些实施方式中,电子设备500还可以包括:显示器503、射频电路504、音频电路505以及电源506。其中,其中,显示器503、射频电路504、音频电路505以及电源506分别与处理器501电性连接。
该显示器503可以用于显示由用户输入的信息或提供给用户的信息以及各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示器503可以包括显示面板,在某些实施方式中,可以采用液晶显示器(Liquid Crystal Display,LCD)、或者有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板。
该射频电路504可以用于收发射频信号,以通过无线通信与网络设备或其他电子设备建立无线通讯,与网络设备或其他电子设备之间收发信号。
该音频电路505可以用于通过扬声器、传声器提供用户与电子设备之间的音频接口。
该电源506可以用于给电子设备500的各个部件供电。在一些实施例中,电源506可以通过电源管理系统与处理器501逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
尽管图7中未示出,电子设备500还可以包括摄像头、蓝牙模块等,在此不再赘述。
本申请实施例还提供一种存储介质,该存储介质存储有计算机程序,当该计算机程序在计算机上运行时,使得该计算机执行上述任一实施例中的结构数据的处理方法,比如:通过当接收到原生页面的显示指令时,获取原生页面相应的文档对象模型树结构,该文档对象模型树结构包括动态节点以及静态节点;对文档对象模型树结构中的节点进行遍历,将静态节点转化为目标节点;将目标节点进行合并,生成虚拟节点,并将虚拟节点加载到文档对象模型树结构中;通过渲染引擎对加载后的文档对象模型树结构进行解析,以生成原生页面。
在本申请实施例中,存储介质可以是磁碟、光盘、只读存储器(Read Only Memory,ROM,)、或者随机存取记忆体(Random Access Memory,RAM)等。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
需要说明的是,对本申请实施例的结构数据的处理方法而言,本领域普通测试人员可以理解实现本申请实施例的结构数据的处理方法的全部或部分流程,是可以通过计算机程序来控制相关的硬件来完成,该计算机程序可存储于一计算机可读取存储介质中,如存储在电子设备的存储器中,并被该电子设备内的至少一个处理器执行,在执行过程中可包括如结构数据的处理方法的实施例的流程。其中,该的存储介质可为磁碟、光盘、只读存储器、随机存取记忆体等。
对本申请实施例的结构数据的处理装置而言,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。该集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中,该存储介质譬如为只读存储器,磁盘或光盘等。
以上对本申请实施例所提供的一种结构数据的处理方法、装置、存储介质及电子设备进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应 用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (20)

  1. 一种结构数据的处理方法,其特征在于,包括:
    当接收到原生页面的显示指令时,获取所述原生页面相应的文档对象模型树结构,所述文档对象模型树结构包括动态节点以及静态节点;
    对所述文档对象模型树结构中的节点进行遍历,将静态节点转化为目标节点;
    将所述目标节点进行合并,生成虚拟节点,并将所述虚拟节点加载到文档对象模型树结构中;
    通过渲染引擎对加载后的文档对象模型树结构进行解析,以生成原生页面。
  2. 如权利要求1所述的结构数据的处理方法,其特征在于,所述对所述文档对象模型树结构中的节点进行遍历,将静态节点转化为目标节点的步骤,包括:
    按照预设规则对对象模型树结构中的节点进行遍历;
    判断当前遍历的节点是否为动态节点;
    当判断出当前遍历的节点为动态节点时,访问所述当前遍历的节点的子节点;
    当判断出当前遍历的节点不为动态节点时,将所述当前遍历的节点转化为目标节点。
  3. 如权利要求2所述的结构数据的处理方法,其特征在于,所述将所述当前遍历的节点转化为目标节点的步骤,包括:
    获取所述当前遍历的节点以及所述当前遍历的节点的子节点;
    将所述子节点合并到所述当前遍历的节点中,并将合并后的当前遍历的节点转化为目标节点。
  4. 如权利要求2所述的结构数据的处理方法,其特征在于,所述按照预设规则对对象模型树结构中的节点进行遍历的步骤,包括:
    基于对象模型树结构的根节点开始遍历,按照从上至下的规则依次遍历对象模型树结构中的节点。
  5. 如权利要求4所述的结构数据的处理方法,其特征在于,所述基于对象模型树结构的根节点开始遍历,按照从上至下的规则依次遍历对象模型树结构中的节点的步骤,包括:
    基于对象模型树结构的根节点开始遍历;
    按照将同一级别层的兄弟节点遍历后,再向下遍历下一级别层中的兄弟节点的规则依次遍历对象模型树结构中的节点。
  6. 如权利要求1所述的结构数据的处理方法,其特征在于,所述将所述目标节点进行合并,生成虚拟节点,并将所述虚拟节点加载到文档对象模型树结构中的步骤,包括:
    将所述目标节点进行依次渲染,生成多个目标组件;
    将所述多个目标组件进行合并,生成虚拟组件,并将所述虚拟组件生成虚拟节点并加载到文档对象模型树结构中。
  7. 如权利要求1所述的结构数据的处理方法,其特征在于,所述获取所述原生页面相应的文档对象模型树结构的步骤之前,还包括:
    为每一节点添加特殊标识、增加属性或者使用特殊组件名进行标记,以使得根据标识、属性或者组件名确定出节点为静态节点或者动态节点。
  8. 一种结构数据的处理装置,其特征在于,包括:
    获取单元,用于当接收到原生页面的显示指令时,获取所述原生页面相应的文档对象模型树结构,所述文档对象模型树结构包括动态节点以及静态节点;
    转化单元,用于对所述文档对象模型树结构中的节点进行遍历,将静态节点转化为目标节点;
    合并单元,用于将所述目标节点进行合并,生成虚拟节点,并将所述虚拟节点加载到文档对象模型树结构中;
    解析单元,用于通过渲染引擎对加载后的文档对象模型树结构进行解析,以生成原生页面。
  9. 如权利要求8所述的结构数据的处理装置,其特征在于,所述转化单元,包括:
    遍历子单元,用于按照预设规则对对象模型树结构中的节点进行遍历;
    判断子单元,用于判断当前遍历的节点是否为动态节点;
    访问子单元,用于当判断出当前遍历的节点为动态节点时,访问所述当前遍历的节点的子节点;
    转化子单元,用于当判断出当前遍历的节点不为动态节点时,将所述当前遍历的节点转化为目标节点。
  10. 如权利要求9所述的结构数据的处理装置,其特征在于,所述转化子单元,具体用于:
    获取所述当前遍历的节点以及所述当前遍历的节点的子节点;
    将所述子节点合并到所述当前遍历的节点中,并将合并后的当前遍历的节点转化为目标节点。
  11. 如权利要求9所述的结构数据的处理装置,其特征在于,所述遍历子 单元,具体用于:
    基于对象模型树结构的根节点开始遍历;
    按照将同一级别层的兄弟节点遍历后,再向下遍历下一级别层中的兄弟节点的规则依次遍历对象模型树结构中的节点。
  12. 如权利要求8所述的结构数据的处理装置,其特征在于,所述处理装置还包括:
    标记单元,用于为每一节点添加特殊标识、增加属性或者使用特殊组件名进行标记,以使得根据标识、属性或者组件名确定出节点为静态节点或者动态节点。
  13. 一种存储介质,其上存储有计算机程序,其特征在于,当所述计算机程序在计算机上运行时,使得所述计算机执行如权利要求1所述的结构数据的处理方法。
  14. 一种电子设备,包括存储器和处理器,其中,所述处理器通过调用所述存储器中存储的计算机程序,用于执行步骤:
    当接收到原生页面的显示指令时,获取所述原生页面相应的文档对象模型树结构,所述文档对象模型树结构包括动态节点以及静态节点;
    对所述文档对象模型树结构中的节点进行遍历,将静态节点转化为目标节点;
    将所述目标节点进行合并,生成虚拟节点,并将所述虚拟节点加载到文档对象模型树结构中;
    通过渲染引擎对加载后的文档对象模型树结构进行解析,以生成原生页面。
  15. 如权利要求14所述的电子设备,其中,所述处理器通过调用所述计算机程序,用于执行步骤:
    按照预设规则对对象模型树结构中的节点进行遍历;
    判断当前遍历的节点是否为动态节点;
    当判断出当前遍历的节点为动态节点时,访问所述当前遍历的节点的子节点;
    当判断出当前遍历的节点不为动态节点时,将所述当前遍历的节点转化为目标节点。
  16. 如权利要求15所述的电子设备,其中,所述处理器通过调用所述计算机程序,用于执行步骤:
    获取所述当前遍历的节点以及所述当前遍历的节点的子节点;
    将所述子节点合并到所述当前遍历的节点中,并将合并后的当前遍历的节 点转化为目标节点。
  17. 如权利要求15所述的电子设备,其中,所述处理器通过调用所述计算机程序,用于执行步骤:
    基于对象模型树结构的根节点开始遍历,按照从上至下的规则依次遍历对象模型树结构中的节点。
  18. 如权利要求17所述的电子设备,其中,所述处理器通过调用所述计算机程序,用于执行步骤:
    基于对象模型树结构的根节点开始遍历;
    按照将同一级别层的兄弟节点遍历后,再向下遍历下一级别层中的兄弟节点的规则依次遍历对象模型树结构中的节点。
  19. 如权利要求14所述的电子设备,其中,所述处理器通过调用所述计算机程序,用于执行步骤:
    将所述目标节点进行依次渲染,生成多个目标组件;
    将所述多个目标组件进行合并,生成虚拟组件,并将所述虚拟组件生成虚拟节点并加载到文档对象模型树结构中。
  20. 如权利要求14所述的电子设备,其中,所述处理器通过调用所述计算机程序,用于执行步骤:
    为每一节点添加特殊标识、增加属性或者使用特殊组件名进行标记,以使得根据标识、属性或者组件名确定出节点为静态节点或者动态节点。
PCT/CN2019/095439 2018-09-29 2019-07-10 结构数据的处理方法、装置、存储介质及电子设备 WO2020063031A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP19865354.5A EP3842929A4 (en) 2018-09-29 2019-07-10 STRUCTURED DATA PROCESSING PROCESS AND APPARATUS, AND STORAGE MEDIA AND ELECTRONIC DEVICE
US17/195,173 US20210191993A1 (en) 2018-09-29 2021-03-08 Processing Method for Structured Data, Storage Medium and Electronic Device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811152477.6 2018-09-29
CN201811152477.6A CN109445784B (zh) 2018-09-29 2018-09-29 结构数据的处理方法、装置、存储介质及电子设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/195,173 Continuation US20210191993A1 (en) 2018-09-29 2021-03-08 Processing Method for Structured Data, Storage Medium and Electronic Device

Publications (1)

Publication Number Publication Date
WO2020063031A1 true WO2020063031A1 (zh) 2020-04-02

Family

ID=65545944

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/095439 WO2020063031A1 (zh) 2018-09-29 2019-07-10 结构数据的处理方法、装置、存储介质及电子设备

Country Status (4)

Country Link
US (1) US20210191993A1 (zh)
EP (1) EP3842929A4 (zh)
CN (1) CN109445784B (zh)
WO (1) WO2020063031A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113486281A (zh) * 2021-07-20 2021-10-08 北京达佳互联信息技术有限公司 一种页面展示方法、装置、电子设备及存储介质
CN113485782A (zh) * 2021-07-29 2021-10-08 北京百度网讯科技有限公司 页面数据获取方法、装置、电子设备及介质

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109445784B (zh) * 2018-09-29 2020-08-14 Oppo广东移动通信有限公司 结构数据的处理方法、装置、存储介质及电子设备
CN111694833B (zh) * 2019-03-12 2023-07-25 北京字节跳动网络技术有限公司 数据处理方法、装置、电子设备和计算机可读存储介质
CN112579066A (zh) * 2019-09-30 2021-03-30 北京国双科技有限公司 图表展示方法、装置、存储介质及设备
CN111143725A (zh) * 2019-11-15 2020-05-12 北京字节跳动网络技术有限公司 页面生成方法、装置和电子设备
CN117313853A (zh) * 2020-01-29 2023-12-29 谷歌有限责任公司 用于从Web文档的结构化数据提取的可转移神经架构
CN112905922A (zh) * 2021-01-26 2021-06-04 北京达佳互联信息技术有限公司 页面加载方法、装置、电子设备、存储介质及程序产品
CN114265916A (zh) * 2021-12-23 2022-04-01 深圳前海微众银行股份有限公司 文档目录的生成方法、装置、终端设备及存储介质
CN114995859A (zh) * 2022-06-29 2022-09-02 深圳前海微众银行股份有限公司 页面热更新方法、装置、设备及存储介质
CN117667278A (zh) * 2022-08-31 2024-03-08 华为技术有限公司 一种界面显示方法、设备及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1265130A2 (en) * 2001-06-07 2002-12-11 Sun Microsystems, Inc. Method and apparatus for runtime merging of hierarchical trees
CN102253937A (zh) * 2010-05-18 2011-11-23 阿里巴巴集团控股有限公司 获取网页中的感兴趣信息的方法及相关装置
CN102375847A (zh) * 2010-08-17 2012-03-14 富士通株式会社 形成用于生成文档模板的合并树的方法以及装置
CN107943929A (zh) * 2017-11-22 2018-04-20 福州大学 基于dom树抽象的包装器自动生成方法
CN109445784A (zh) * 2018-09-29 2019-03-08 Oppo广东移动通信有限公司 结构数据的处理方法、装置、存储介质及电子设备

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101329665A (zh) * 2007-06-18 2008-12-24 国际商业机器公司 解析标记语言文档的方法和解析器
CN101957816B (zh) * 2009-07-13 2013-03-20 上海华燕置业发展有限公司 基于多页面比较的网页元数据自动抽取方法和系统
CN102890681B (zh) * 2011-07-20 2016-03-09 阿里巴巴集团控股有限公司 一种生成网页结构模板的方法及系统
US10169481B2 (en) * 2015-02-18 2019-01-01 Adobe Systems Incorporated Method for intelligent web reference preloading based on user behavior prediction
CN108228188B (zh) * 2018-01-08 2021-04-27 武汉斗鱼网络科技有限公司 一种视图组件处理方法、电子设备及可读存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1265130A2 (en) * 2001-06-07 2002-12-11 Sun Microsystems, Inc. Method and apparatus for runtime merging of hierarchical trees
CN102253937A (zh) * 2010-05-18 2011-11-23 阿里巴巴集团控股有限公司 获取网页中的感兴趣信息的方法及相关装置
CN102375847A (zh) * 2010-08-17 2012-03-14 富士通株式会社 形成用于生成文档模板的合并树的方法以及装置
CN107943929A (zh) * 2017-11-22 2018-04-20 福州大学 基于dom树抽象的包装器自动生成方法
CN109445784A (zh) * 2018-09-29 2019-03-08 Oppo广东移动通信有限公司 结构数据的处理方法、装置、存储介质及电子设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3842929A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113486281A (zh) * 2021-07-20 2021-10-08 北京达佳互联信息技术有限公司 一种页面展示方法、装置、电子设备及存储介质
CN113485782A (zh) * 2021-07-29 2021-10-08 北京百度网讯科技有限公司 页面数据获取方法、装置、电子设备及介质

Also Published As

Publication number Publication date
EP3842929A1 (en) 2021-06-30
EP3842929A4 (en) 2021-12-01
CN109445784A (zh) 2019-03-08
US20210191993A1 (en) 2021-06-24
CN109445784B (zh) 2020-08-14

Similar Documents

Publication Publication Date Title
WO2020063031A1 (zh) 结构数据的处理方法、装置、存储介质及电子设备
WO2020063019A1 (zh) 信息处理方法、装置、存储介质、电子设备及系统
US11706331B2 (en) Information processing method and apparatus, storage medium, and electronic device
WO2021027476A1 (zh) 语音控制设备的方法及电子设备
CN108287918B (zh) 基于应用页面的音乐播放方法、装置、存储介质和电子设备
CN105740263B (zh) 页面显示方法和装置
RU2617388C2 (ru) Способ, терминал и электронное устройство для обработки документа электронной книги
CN111580879A (zh) 小程序的运行方法、装置、电子设备及计算机存储介质
WO2022144016A1 (zh) 应用程序控制方法、装置、电子设备和存储介质
WO2020063030A1 (zh) 主题色彩的调节方法、装置、存储介质及电子设备
JP2008542919A (ja) 表示におけるエレメントz−順番の精密なグレイン制御
CN109933381B (zh) 一种内核的加载方法及装置
WO2020042769A1 (zh) 图像信息的传输方法、装置、存储介质及电子设备
CN109902282B (zh) 一种文字排版方法、装置和存储介质
US20190213241A1 (en) Web page display method and apparatus, mobile terminal, and storage medium
CN102193806B (zh) 更新动画的方法和装置
US11818491B2 (en) Image special effect configuration method, image recognition method, apparatus and electronic device
CN115510347A (zh) 演示文稿的转换方法、装置、电子设备及存储介质
CN109726379B (zh) 内容项编辑方法、装置、电子设备及存储介质
CN107122177A (zh) 界面展示方法及装置
US11507633B2 (en) Card data display method and apparatus, and storage medium
CN107248947B (zh) 表情处理方法及装置、计算机设备及存储介质
CN114020309B (zh) 通过webpack构建多页面应用的方法、装置及存储介质
CN110855539B (zh) 设备发现方法、装置及存储介质
WO2023071629A1 (zh) 网页的渲染方法、装置、设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19865354

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 19865354.5

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019865354

Country of ref document: EP

Effective date: 20210325