Method, device and equipment for executing dynamic codes on page and storage medium

A dynamic code and page technology, applied in the computer field, can solve problems such as user loss and wrong interaction

Pending Publication Date: 2020-04-21
BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF5 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The present application provides a method, device, device, and storage medium for executing dynamic code on a page, which are used to solve the problem of when the components of the p...

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method, device and equipment for executing dynamic codes on page and storage medium
  • Method, device and equipment for executing dynamic codes on page and storage medium
  • Method, device and equipment for executing dynamic codes on page and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0045] In order to make the purpose, technical solutions and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be described clearly and completely in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments These are a part of the embodiments of this application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.

[0046] It should be noted that the page mentioned in the following embodiments of this application may be a web page, or a page on the React Native side.

[0047] Abstract Syntax Tree (AST), also known as syntax tree, is an abstract representation of the source code syntax structure. Each node of the syntax tree represents a structure of the source code, such as AND, OR, ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to a page execution dynamic code method and device, page execution dynamic code equipment and a storage medium. The method comprises: obtaining a character string of a to-be-executed dynamic code of a page; parsing the character string to obtain an abstract syntax tree corresponding to the character string, traversing the abstract syntax tree, and identifying an identifier node and a statement declaration node in the abstract syntax tree; converting variables or functions in the identifier nodes into literal quantities, defining the variables or functions declared by thestatement declaration nodes in a context environment variable pool, and deleting the variables or functions to obtain an abstract syntax tree processed by the nodes; and converting the abstract syntaxtree processed by the node into an executable code of the page. The invention is used for solving the problem that after the dynamic code depending on the context is converted into the executable code through the abstract syntax tree, when the executable code is operated by a component of a page, wrong interaction is generated, and loss is caused to a user.

Description

Technical field [0001] This application relates to the field of computer technology, and in particular to a method, device, device, and storage medium for executing dynamic code on a page. Background technique [0002] With template engine as the core, the development method of dynamically generating web pages based on Hypertext Markup Language (HTML) has the advantages of high reuse, low coupling, composability, and easy operation, and is widely used in the web front-end field. In this development method, developers only need to open the back-end web design page, select the required components, and fill in the corresponding execution statements in the components. The back-end generates executable code by generating an abstract syntax tree from the filled-in code and then converting it. Generate a dynamic page, also becomes a dynamic page. [0003] Among them, the execution statements involved in the component, such as the acquisition of background interface data, the display or h...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F8/40
CPCG06F8/40
Inventor 姚义伟尹冠群胡永财苏雅迪
Owner BEIJING QIYI CENTURY SCI & TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products