CN111736840A - Compiling method and running method of applet, storage medium and electronic equipment - Google Patents

Compiling method and running method of applet, storage medium and electronic equipment Download PDF

Info

Publication number
CN111736840A
CN111736840A CN201910889213.7A CN201910889213A CN111736840A CN 111736840 A CN111736840 A CN 111736840A CN 201910889213 A CN201910889213 A CN 201910889213A CN 111736840 A CN111736840 A CN 111736840A
Authority
CN
China
Prior art keywords
applet
syntax tree
code
definition
application
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201910889213.7A
Other languages
Chinese (zh)
Inventor
严康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
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 Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201910889213.7A priority Critical patent/CN111736840A/en
Publication of CN111736840A publication Critical patent/CN111736840A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis

Abstract

The invention discloses a compiling method, an operating method, a storage medium and electronic equipment of an applet application, wherein the compiling method of the applet application comprises the following steps: obtaining source code of a native application, and generating a first syntax tree based on the source code; adjusting the first syntax tree according to a preset rule to generate a second syntax tree; traversing the second syntax tree, and generating a definition template file of the applet based on definition nodes in the second syntax tree; generating logic code for an applet application based on the second syntax tree; and obtaining the object code of the applet application based on the definition template file and the logic code. The source code of the native application is adjusted, the same logic and related codes in the source code are multiplexed, so that the target code of the applet application is generated quickly, the applet application does not need to be re-developed, and the code multiplexing rate and the compiling efficiency of the applet application are improved.

Description

Compiling method and running method of applet, storage medium and electronic equipment
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a compiling method, an operating method, a storage medium and electronic equipment for small program application.
Background
With the continuous development of computer technology, various APPs (Application programs) come out endlessly, and users need to install APPs on mobile terminals to apply the APPs. However, a large amount of APPs installed on the mobile terminal occupy a large amount of memory space, which affects the operation of the mobile terminal.
For the above-described problem, an applet, which is an application that can be used without downloading and installation, has been produced. APP is a Flutter application, Flutter is a mobile UI framework, a high-quality native user interface can be quickly constructed on iOS and Android, and an applet application cannot run the Flutter framework.
In the process of implementing the invention, the inventor finds that the prior art at least has the following problems that the Flutter application and the applet application are two sets of codes which are independent from each other, generally two sets of developers are distributed and compiled, and meanwhile, two sets of test programs of the programs are also needed, so that the workload is large, the efficiency is low, and resources and time are wasted.
Disclosure of Invention
The invention provides a compiling method, an operating method, a device, a storage medium and electronic equipment of an applet, which are used for simplifying the compiling process of the applet and improving the compiling efficiency of the applet.
In a first aspect, an embodiment of the present invention provides a method for compiling an applet, including:
obtaining source code of a native application, and generating a first syntax tree based on the source code;
adjusting the first syntax tree according to a preset rule to generate a second syntax tree;
traversing the second syntax tree, and generating a definition template file of the applet based on definition nodes in the second syntax tree;
generating logic code for an applet application based on the second syntax tree;
and obtaining the object code of the applet application based on the definition template file and the logic code.
In a second aspect, an embodiment of the present invention further provides an applet operating method, including:
running an object code of the applet and determining rendering data for rendering the interactive interface, wherein the object code is generated based on a compiling method of the applet, provided by any embodiment of the invention;
transmitting the rendering data to an execution environment of an applet application;
rendering, in the execution environment, an interactive interface of an applet application based on the rendering data.
In a third aspect, an embodiment of the present invention further provides a compiling apparatus for an applet, including:
the first syntax tree generation module is used for acquiring a source code of a native application and generating a first syntax tree based on the source code;
the second syntax tree production module is used for adjusting the first syntax tree according to a preset rule to generate a second syntax tree;
the definition template file generating module is used for traversing the second syntax tree and generating a definition template file of the applet application based on definition nodes in the second syntax tree;
a logic code generation module for generating logic code of the applet application based on the second syntax tree;
and the object code generating module is used for obtaining the object code of the applet application based on the definition template file and the logic code.
In a fourth aspect, an embodiment of the present invention further provides an apparatus for running an applet, where the apparatus includes:
the rendering data determining module is used for running an object code of the applet and determining rendering data for rendering the interactive interface, wherein the object code is generated based on the compiling method of the applet, which is provided by any embodiment of the invention;
the rendering data transmission module is used for transmitting the rendering data to an execution environment of the applet application;
and the interactive interface rendering module is used for rendering the interactive interface of the applet application based on the rendering data in the execution environment.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements a compiling method for an applet provided in any embodiment of the present invention when executing the program.
In a sixth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a compiling method for an applet application provided in any one of the embodiments of the present invention
In a seventh aspect, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the method for running the applet provided in any embodiment of the present invention.
In an eighth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements an operating method of an applet application provided in any embodiment of the present invention.
According to the method and the device, the first syntax tree corresponding to the source code of the native application is adjusted to obtain the second syntax tree suitable for the applet application, and the definition template file and the logic code are generated based on the second syntax tree to form the target code of the applet application. The source code of the native application is adjusted, the same logic and related codes in the source code are multiplexed, so that the target code of the applet application is generated quickly, the applet application does not need to be re-developed, and the code multiplexing rate and the compiling efficiency of the applet application are improved.
Drawings
Fig. 1 is a flowchart illustrating a compiling method of an applet according to an embodiment of the present invention;
FIG. 2A is an exemplary diagram for generating a first syntax tree based on source code according to an embodiment of the present invention;
FIG. 2B is a diagram illustrating a second syntax tree-based generating definition template file according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a compiling method of an applet according to a second embodiment of the present invention;
fig. 4 is a flowchart illustrating an operation method of an applet according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of an applet compiling apparatus according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an apparatus for running an applet according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to a sixth embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an eighth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart illustrating a method for compiling an applet according to an embodiment of the present invention, where the method is applicable to a case of quickly compiling an applet, and the method can be executed by a compiling apparatus for an applet according to an embodiment of the present invention, where the compiling apparatus for an applet can be integrated in an electronic device such as a server or a computer. The method specifically comprises the following steps:
s110, obtaining a source code of the native application, and generating a first syntax tree based on the source code.
And S120, adjusting the first syntax tree according to a preset rule to generate a second syntax tree.
S130, traversing the second syntax tree, and generating a definition template file of the applet application based on the definition nodes in the second syntax tree.
And S140, generating logic codes of the applet application based on the second syntax tree.
And S150, obtaining the object code of the applet application based on the definition template file and the logic code.
The native application is a Flutter application installed by downloading, and may be, for example and without limitation, a kyoto APP, a naobao APP, or a masu APP. The applet is an application hosted in a host application, and illustratively, the host application may be, but is not limited to, a WeChat application, a QQ application, and the like, and the applet may be, but is not limited to, a Jingdong applet, a Taobao applet, or a Mei Tuo applet, and the like hosted in a WeChat application. The applet application can directly run in the running environment of the host application without downloading an installation package, and can realize the same functions as the native application.
During compilation of the applet, source code of the native application corresponding to the applet is obtained, illustratively code in the Dart language. The syntax analysis is performed on the source code to obtain a first syntax tree of the source code, which may be, for example, an AST syntax tree (abstract syntax tree). The syntax tree can visually represent the syntax structure of the source program, not only contains all static information required by the source code structure display, but also has higher storage efficiency. The process of constructing the first syntax tree of the source code mainly comprises the steps of performing lexical analysis on the source code, then performing syntax analysis by combining code syntax, and constructing the first syntax tree of the source code.
The source code is first processed through a lexical analyzer, which scans the source code line by line and decomposes the source code into elementary word symbols in the form of individual character strings in the programming language, such as operators, keywords, etc. Meanwhile, the lexical analyzer transforms the decomposed basic elements into Token and marks the line where the basic elements are located, so that the lexical analyzer is convenient to access and search the Token. The grammar analysis is a key step in the analysis link of the source program, and in the process, the Token strings obtained by the former lexical analyzer are utilized and are combined with the language specification of the source program to generate a grammar analysis tree corresponding to the Token strings. Because the syntactic parse tree is too closely related to the grammar of a specific programming language, and contains too many details in the original programming language, a large number of redundant nodes without reference values exist in the tree, and therefore, the syntactic parse tree cannot be directly used for similarity comparison. The syntax tree constructor builds a first syntax tree on the basis of the parse tree. The working process is that according to the grammar of the user-defined grammar tree, character strings in the grammar analysis tree are analyzed and Token information is extracted, meanwhile, according to different levels of nodes, such as root nodes, class node classes and method node classes, corresponding methods are respectively called to create node objects, and then a first grammar tree of a source code is generated. Illustratively, referring to fig. 2A, fig. 2A is an exemplary diagram for generating a first syntax tree based on source code according to an embodiment of the present invention.
The first syntax tree comprises the syntax structure and the parameter information of the source code, the first syntax tree is adjusted to generate a second syntax tree suitable for the small program application, the code structure of the source code and the parameter information in the source code can be quickly adjusted by adjusting the syntax tree, and compared with the method for independently developing the small program application and directly adjusting the source code, the method improves the adjusting effect and the compiling efficiency of the small program application. Specifically, the adjusting of the first syntax tree may be adjusting according to the operation requirement of the applet application. Optionally, the adjustment may be performed according to an execution environment of the applet (i.e. an execution environment of the host application), so that the applet obtained based on the second syntax tree can run in the execution environment of the host application.
Optionally, adjusting the first syntax tree according to a preset rule includes: and replacing the Flutter library quoted in the first syntax tree with a preset pseudo Flutter library, wherein the pseudo Flutter library is used for rendering interactive pages of the applet application. The Flutter library is used for rendering the interactive page of the native application when being called, and rendering the interactive page of the applet application cannot be performed. In this embodiment, the rendering of the interactive page of the applet is realized by setting a pseudo Flutter library capable of rendering the interactive page of the applet, where the pseudo Flutter library may be related to the host applications, and each host application may correspond to one pseudo Flutter library. The pseudo-Flutter library is preset and has the same rendering capability as the Flutter library. Specifically, the first syntax tree is traversed, the Flutter library referenced in the first syntax tree is determined, for example, fields of the Flutter library in the first syntax tree are traversed, and the retrieved Flutter library is replaced by the pseudo Flutter library.
On the basis of the above embodiment, adjusting the first syntax tree according to a preset rule further includes: setting an identifier for each definition component in the first syntax tree, wherein the definition component (Widget) is a minimum unit for rendering in an interactive page, and may include, but is not limited to, a key, text, and the like. The identifier may be a UUID (universal unique identifier) used to uniquely identify the defined component, that is, the identifier corresponds to the defined component one to one, and the defined component can be quickly determined by the identifier. Specifically, the field set of the defined components is set in the electronic device, and the field set may include fields such as "center", "text", "button", and the like, and the fields are matched in the first syntax tree one by one, and when matching is successful, it is determined that the defined component corresponding to the field exists in the first syntax tree, and a corresponding setting identifier exists. Referring to fig. 2A and fig. 2B, fig. 2B is a diagram illustrating a second syntax tree-based generation definition template file according to an embodiment of the present invention. The definition components "center" and "text" are included in the first syntax tree in fig. 2A, and the identifier UUID is set, respectively, and accordingly, the definition component "center" is configured with the identifier "UUID 001" and the definition component "text" is configured with the identifier "UUID 002" in fig. 2B.
On the basis of the above embodiment, adjusting the first syntax tree according to a preset rule further includes: setting a template name for each independently rendered fragment in the first syntax tree. The independent rendering fragment may include at least one definition component for rendering an independent control on the interactive page, for example, an independent control may be a button, where the button is configured with a word "click", and correspondingly, the independent rendering fragment corresponding to the independent control includes a definition component "button" and a definition component "text" referred by the definition component "button". Optionally, traversing the first layer definition in the first syntax tree based on a field set in the electronic device, where the field set is provided with a definition component (each definition in the first syntax tree includes at least one layer of definition), determining the obtained definition component as an independent rendering fragment, and setting a template name (tempName). Referring to FIG. 2A, traversing the first level definition results in the definition component "center" indicating that there is an independently rendered fragment. Optionally, it may also be determined whether each defined component obtained by traversing the first syntax tree is a child parameter or a child parameter, and for a defined component that is not a child parameter or a child parameter, it is determined that an independent rendering fragment exists, and a template name is set. Referring to fig. 2A, including defining components "center" and "text", where the defining component "text" is a child parameter defining the component "center", it may be determined that the defining component "center" corresponds to an independent rendering fragment. Referring to fig. 2B, the template name of the independent rendering fragment corresponding to the component "center" is defined as "temp 001", and the template name is used to uniquely identify one independent rendering fragment. By determining the name of the template for rendering, the corresponding independent rendering segment can be quickly determined, and further, the identifier of the definition component included in the independent rendering segment is determined, so as to obtain rendering data, wherein the rendering data is the rendering parameter corresponding to each definition component, and may be, for example, color, size, shape, and the like.
The second syntax tree includes syntax structure and parameter information of the applet code, and the object code of the applet is available based on the second syntax tree. Specifically, the object code of the applet includes a definition template file and logic code. The generating of the definition template file based on the second syntax tree may be to generate a label in the definition template file according to the definition node in the second syntax tree, so as to obtain the definition template file. The definition nodes in the second syntax tree can be determined by traversing definition sentences or definition components, and each definition sentence or definition component corresponds to one definition node. The definition template file may be a WMXL file, see fig. 2B.
Optionally, the language of the logic code is a language applied by the host application, and may be, for example, a JavaScript language code; wherein the JavaScript language code can be generated directly from the second syntax tree. In some embodiments, generating logic code for the applet application based on the second syntax tree comprises: generating intermediate code in DART language according to the second syntax tree; and converting the intermediate code of the DART language into logic code of the JavaScript language based on a conversion tool of the DART language and the JavaScript language. For example, the DART language and JavaScript language conversion tool may be a DART2js tool. It should be noted that after the logic code is obtained, the intermediate code of DART language is deleted.
In this embodiment, the definition template file and the logic code may together constitute an object code of the applet application, and running the definition template file and the logic code may realize running the applet application in the host application and rendering an interactive page of the applet application.
In this embodiment, the execution order of step S130 and step S104 is not limited. For example, the execution may be sequential, synchronous, or first step S104 and then step S130.
According to the technical scheme provided by the embodiment, a second syntax tree suitable for the applet application is obtained by adjusting the first syntax tree corresponding to the source code of the native application, and the definition template file and the logic code are generated based on the second syntax tree to form the target code of the applet application. The source code of the native application is adjusted, the same logic and related codes in the source code are multiplexed, so that the target code of the applet application is generated quickly, the applet application does not need to be re-developed, and the code multiplexing rate and the compiling efficiency of the applet application are improved.
Example two
Fig. 3 is a flowchart of a compiling method of an applet, which is provided in the second embodiment of the present invention, and is optimized on the basis of the second embodiment, where the method specifically includes:
s210, obtaining a source code of a native application, and generating a first syntax tree based on the source code.
S220, adjusting the first syntax tree according to a preset rule to generate a second syntax tree.
And S230, identifying the definition components in the second syntax tree, and setting labels corresponding to the definition components in the definition template file.
S240, determining the node relation of each label in the definition template file according to the nesting relation of the definition components in the second syntax tree, and generating the definition template file.
And S250, generating logic codes of the applet application based on the second syntax tree.
And S260, obtaining the object code of the applet application based on the definition template file and the logic code.
In this embodiment, after the second syntax tree is generated, the second syntax tree is traversed, and the definition components (widgets) in the second syntax tree are determined, where the field sets provided with the definition components in the electronic device may be respectively matched in the second syntax tree to determine the definition components, which is not described herein again. And generating labels corresponding to the definition components in the definition template file. Illustratively, referring to fig. 2B, the definition components "center" and "text" are included in the second syntax tree, and accordingly, tags corresponding to the definition components "center" and "text" are generated in the definition template file, that is, < center uuid ═ uuid001 "> and < text uuid ═ uuid 002" >, where the tags include identifiers of the definition components.
Further, because there is a nesting relationship between the definition components, determining a node relationship between the labels in the definition template file, optionally, determining a node relationship between the labels in the definition template file according to the nesting relationship between the definition components in the second syntax tree includes: and setting a first label corresponding to the first definition component as a child node of a second label corresponding to the second definition component based on the nesting parameter of the first definition component as the second definition component. Illustratively, the nesting relationship of the defined components is determined by determining whether the defined components are child parameters or child parameters. For example, in fig. 2B, defining the component "text" as the child parameter of the component "center", i.e. determining the component "text" as the nested parameter of the component "center", and accordingly, defining the label corresponding to the component "text" as the child node of the label corresponding to the component "center" in the definition template file. Based on the above thought, the nesting relation between the definition nodes is determined, the node relation in each label in the definition template file is obtained, and the definition template file is generated.
Optionally, an independent rendering fragment in the second syntax tree is determined, and accordingly, a template tag (template) of the independent rendering fragment is set in the definition template file, see fig. 2B, where the second syntax tree includes an independent rendering fragment "center", and accordingly, the definition template file sets a template tag < template name ═ temp001 ", where the template tag of the independent rendering fragment and the template name of the independent rendering fragment may be the same.
On the basis of the above embodiment, the method further includes setting parameters called by each definition component in the second syntax tree as tag attributes of the corresponding tag.
According to the technical scheme of the embodiment, each definition node in the second syntax tree is set with a label in the definition template file correspondingly by traversing the second syntax tree, namely the definition template file comprises the definition required by the applet application, and the definition template file and the logic code can realize the operation of the applet application. The source code of the native application is adjusted, the same logic and related codes in the source code are multiplexed, so that the target code of the applet application is generated quickly, the applet application does not need to be re-developed, and the code multiplexing rate and the compiling efficiency of the applet application are improved.
EXAMPLE III
Fig. 4 is a flowchart of an applet running method according to a third embodiment of the present invention, where the method is suitable for executing an applet compiled in the foregoing embodiments. The method can be executed by the running device of the applet provided by the embodiment of the invention, and the running device of the applet can be integrated in electronic equipment such as a mobile phone, a tablet computer and the like. The method specifically comprises the following steps:
and S310, running the object code of the applet application, and determining rendering data for rendering the interactive interface.
The object code is generated based on the compiling method of the applet application provided by any one of the above embodiments.
And S320, transmitting the rendering data to an execution environment of the applet application.
S330, in the execution environment, rendering an interactive interface of the applet application based on the rendering data.
In this embodiment, when the applet is compiled based on any of the above compiling methods of the program applications, the applet is executed by the execution method of the applet provided in this embodiment.
The execution environment of the applet application is the execution environment of the host application where the applet application is hosted, that is, the object code of the applet application cannot be directly run in the execution environment of the applet application. In this embodiment, when the applet is running, the rendering data for rendering the interactive interface is obtained in the running environment of the object code, the rendering data is sent to the execution environment of the applet, and the interactive page of the applet is rendered based on the rendering data, so that the applet is run in the host application.
Optionally, the code for running the applet determines rendering data for rendering the interactive interface, including: calling and operating a pseudo-Flutterer library, and determining the template name of the fragment to be rendered and the identifier of each defined component in the fragment to be rendered according to the defined template file of the applet application; and determining rendering data according to the template name of the fragment to be rendered and the identifier of each defined component in the fragment to be rendered. The template names of the fragments to be rendered correspond to the independent rendering fragments one by one, the identifiers of the definition components correspond to the definition components one by one, at least one definition component with rendering can be determined through the template names and the identifiers, the rendering data of each definition component is read, the collection efficiency of the rendering data is improved, and the rendering time of the interactive page is shortened.
Illustratively, the rendering data may be, for example:
uiData={
template Name:“temp001”
uuid001Width:“100px”,
uuid002Width:“100px”
Uuid002Value:“HelloWorld”
}。
optionally, in this embodiment, an interoperation module is provided for connecting the running environment of the code of the applet and the execution environment of the applet, and the rendering data is correspondingly transmitted to the execution environment of the applet based on the interoperation module. And under the execution environment of the applet, rendering an interactive interface of the applet based on the rendering data, wherein the interactive interface is used for realizing the interaction between the applet and the user.
According to the technical scheme of the embodiment, based on the characteristics of the object code of the applet application, when the applet application is operated, rendering data for page rendering is obtained, page rendering is performed in the execution environment of the applet application, and the applet application is operated.
On the basis of the above embodiment, the method further includes: acquiring an externally input operation instruction under the execution environment of the applet application; and transmitting the operation instruction to the running environment of the object code of the applet application, executing the operation instruction in the running environment of the code of the applet application, and rendering the interactive interface of the applet application according to the execution result of the operation instruction.
In the running process of the applet application, the operation of a user on the applet application exists. In this embodiment, the received operation instruction is transmitted to the running environment of the object code through the interoperation module, the operation instruction is executed in the running environment of the object code to obtain an execution result, rendering data corresponding to the execution result is obtained, the rendering data corresponding to the execution result is sent to the execution environment of the applet application through the interoperation module, the interactive page is rendered, and interaction between the applet application and the user is achieved.
Example four
Fig. 5 is a schematic structural diagram of a compiling apparatus of an applet according to a fourth embodiment of the present invention, which includes a first syntax tree generating module 410, a second syntax tree generating module 420, a definition template file generating module 430, a logic code generating module 440, and an object code generating module 450, wherein,
a first syntax tree generating module 410, configured to obtain source code of a native application, and generate a first syntax tree based on the source code;
a second syntax tree generating module 420, configured to adjust the first syntax tree according to a preset rule, and generate a second syntax tree;
a definition template file generating module 430, configured to traverse the second syntax tree, and generate a definition template file of an applet based on definition nodes in the second syntax tree;
a logic code generation module 440 for generating logic code of the applet application based on the second syntax tree;
an object code generating module 450, configured to obtain an object code of the applet based on the definition template file and the logic code.
On the basis of the above embodiment, the second syntax tree generating module 420 includes:
and the Flutter library replacing unit is used for replacing the Flutter library quoted in the first syntax tree with a preset pseudo Flutter library, wherein the pseudo Flutter library is used for rendering an interactive page of the applet application.
On the basis of the above embodiment, the second syntax tree generating module 420 further includes:
an identifier setting unit configured to set an identifier for each defined component in the first syntax tree;
and the template name setting unit is used for setting a template name for each independent rendering fragment in the first syntax tree.
On the basis of the above embodiment, the definition template file generating module 430 includes:
a label generating unit, configured to identify a definition component in the second syntax tree, and set a label corresponding to the definition component in the definition template file;
and the node relation determining unit is used for determining the node relation of each label in the definition template file according to the nesting relation of the definition components in the second syntax tree.
On the basis of the above embodiment, the node relationship determining unit is configured to:
and setting a first label corresponding to the first definition component as a child node of a second label corresponding to the second definition component based on the nesting parameter of the first definition component as the second definition component.
On the basis of the above embodiment, the defining template file generating module 430 further includes:
and the label attribute setting unit is used for setting parameters called by each definition component in the second syntax tree as the label attributes of the corresponding labels.
On the basis of the embodiment, the source code is DART language code, and the logic code is JavaScript language code;
accordingly, the logic code generation module 440 is configured to:
generating intermediate code in DART language according to the second syntax tree;
and converting the intermediate code of the DART language into logic code of the JavaScript language based on a conversion tool of the DART language and the JavaScript language.
The compiling device of the applet provided by the embodiment of the invention can execute the compiling method of the applet provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the compiling method of the applet.
EXAMPLE five
Fig. 6 is a schematic structural diagram of an apparatus for running an applet, the apparatus including a rendering data determining module 510, a rendering data transmitting module 520, and an interactive interface rendering module 530, where:
a rendering data determining module 510, configured to run an object code of an applet, and determine rendering data for rendering an interactive interface, where the object code is generated based on a compiling method of the applet, according to any embodiment of the present invention;
a rendering data transmission module 520 for transmitting the rendering data to an execution environment of the applet;
an interactive interface rendering module 530 for rendering an interactive interface of an applet application based on the rendering data in the execution environment.
On the basis of the above embodiment, the rendering data determining module 510 is configured to:
calling and operating a pseudo-Flutterer library, and determining the template name of the fragment to be rendered and the identifier of each defined component in the fragment to be rendered according to the defined template file of the applet application;
and determining rendering data according to the template name of the fragment to be rendered and the identifier of each defined component in the fragment to be rendered.
On the basis of the above embodiment, the execution environment of the code of the applet and the execution environment of the applet are independent from each other.
Accordingly, the rendering data transmission module 520 is configured to:
and transmitting the rendering data to an execution environment of the applet based on an interoperation module, wherein the interoperation module is used for connecting the execution environment of the code of the applet and the execution environment of the applet.
On the basis of the above embodiment, the apparatus further includes:
the operating instruction acquisition module is used for acquiring an externally input operating instruction under the execution environment of the applet application;
the operating instruction transmission module is used for transmitting the operating instruction to the running environment of the code of the applet application;
and the operation instruction execution module is used for executing the operation instruction in the running environment of the code of the applet application and rendering the interactive interface of the applet application according to the execution result of the operation instruction.
The running device of the applet provided by the embodiment of the invention can execute the running method of the applet provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the running method of the applet.
EXAMPLE six
Fig. 7 is a schematic structural diagram of an electronic device according to a sixth embodiment of the present invention. FIG. 7 illustrates a block diagram of an electronic device 612 suitable for use in implementing embodiments of the present invention. The electronic device 612 shown in fig. 7 is only an example and should not bring any limitations to the function and scope of use of the embodiments of the present invention. The device 612 is typically an electronic device that undertakes image classification functions.
As shown in fig. 7, the electronic device 612 is in the form of a general purpose computing device. The components of the electronic device 612 may include, but are not limited to: one or more processors 616, a memory device 628, and a bus 618 that couples the various system components including the memory device 628 and the processors 616.
Bus 618 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The electronic device 612 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by electronic device 612 and includes both volatile and nonvolatile media, removable and non-removable media.
Storage 628 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 630 and/or cache Memory 632. The electronic device 612 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 634 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 7, commonly referred to as a "hard drive"). Although not shown in FIG. 7, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk-Read Only Memory (CD-ROM), a Digital Video disk (DVD-ROM), or other optical media) may be provided. In such cases, each drive may be connected to bus 618 by one or more data media interfaces. Storage device 628 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program 636 having a set (at least one) of program modules 626 may be stored, for example, in storage device 628, such program modules 626 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may include an implementation of a network environment. Program modules 626 generally perform the functions and/or methodologies of embodiments of the invention as described herein.
The electronic device 612 may also communicate with one or more external devices 614 (e.g., keyboard, pointing device, camera, display 624, etc.), with one or more devices that enable a user to interact with the electronic device 612, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 612 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 622. Also, the electronic device 612 may communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), and/or a public Network, such as the internet) via the Network adapter 620. As shown, the network adapter 620 communicates with the other modules of the electronic device 612 via the bus 618. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the electronic device 612, including but not limited to: microcode, device drivers, Redundant processing units, external disk drive Arrays, disk array (RAID) systems, tape drives, and data backup storage systems, to name a few.
The processor 616 executes various functional applications and data processing by executing programs stored in the storage device 628, for example, implementing the compiling method of the applet provided by the above-described embodiment of the present invention.
EXAMPLE seven
A seventh embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a compiling method for an applet, according to an embodiment of the present invention.
Of course, the computer program stored on the computer-readable storage medium provided by the embodiment of the present invention is not limited to the method operations described above, and may also execute the compiling method of the applet provided by any embodiment of the present invention.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable source code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Source code embodied on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer source code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The source code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
Example eight
Fig. 8 is a schematic structural diagram of an electronic device according to an eighth embodiment of the present invention. FIG. 8 illustrates a block diagram of an electronic device 712 suitable for use to implement embodiments of the present invention. The electronic device 712 shown in fig. 8 is only an example and should not bring any limitations to the function and the scope of use of the embodiments of the present invention. Device 712 is typically an electronic device that undertakes image classification functions.
As shown in fig. 8, electronic device 712 is embodied in the form of a general purpose computing device. Components of electronic device 712 may include, but are not limited to: one or more processors 716, a storage device 728, and a bus 718 that couples the various system components (including the storage device 728 and the processors 716).
Bus 718 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 712 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by electronic device 712 and includes both volatile and nonvolatile media, removable and non-removable media.
Storage 728 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 730 and/or cache Memory 732. The electronic device 712 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 734 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 8, and commonly referred to as a "hard drive"). Although not shown in FIG. 8, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk-Read Only Memory (CD-ROM), a Digital Video disk (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to the bus 718 by one or more data media interfaces. Storage 728 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
Program 736 having a set (at least one) of program modules 726, which may include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may comprise an implementation of a network environment, may be stored in, for example, storage 728. Program modules 726 generally perform the functions and/or methodologies of embodiments of the invention as described herein.
Electronic device 712 may also communicate with one or more external devices 717 (e.g., keyboard, pointing device, camera, display 724, etc.), with one or more devices that enable a user to interact with electronic device 712, and/or with any devices (e.g., network card, modem, etc.) that enable electronic device 712 to communicate with one or more other computing devices. Such communication may occur through input/output (I/O) interfaces 722. Also, the electronic device 712 can communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), and/or a public Network, such as the internet) via the Network adapter 720. As shown, the network adapter 720 communicates with the other modules of the electronic device 712 via the bus 718. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the electronic device 712, including but not limited to: microcode, device drivers, Redundant processing units, external disk drive Arrays, disk array (RAID) systems, tape drives, and data backup storage systems, to name a few.
The processor 716 executes various functional applications and data processing by executing programs stored in the storage 728, for example, implementing the execution method of the applet provided in the above-described embodiment of the present invention.
Example nine
Ninth embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements an operating method of an applet, as provided in the ninth embodiment of the present invention.
Of course, the computer program stored on the computer-readable storage medium provided by the embodiment of the present invention is not limited to the method operations described above, and may also execute the method for running the applet provided by any embodiment of the present invention.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable source code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Source code embodied on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer source code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The source code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (17)

1. A compilation method for an applet, comprising:
obtaining source code of a native application, and generating a first syntax tree based on the source code;
adjusting the first syntax tree according to a preset rule to generate a second syntax tree;
traversing the second syntax tree, and generating a definition template file of the applet based on definition nodes in the second syntax tree;
generating logic code for an applet application based on the second syntax tree;
and obtaining the object code of the applet application based on the definition template file and the logic code.
2. The method of claim 1, wherein adjusting the first syntax tree according to a predetermined rule comprises:
and replacing the Flutter library quoted in the first syntax tree with a preset pseudo Flutter library, wherein the pseudo Flutter library is used for rendering interactive pages of the applet application.
3. The method of claim 2, wherein adjusting the first syntax tree according to a predetermined rule further comprises:
setting an identifier for each defined component in the first syntax tree;
setting a template name for each independently rendered fragment in the first syntax tree.
4. The method of claim 1, wherein traversing the second syntax tree and generating a definition template file for an applet based on definition nodes in the second syntax tree comprises:
identifying a definition component in the second syntax tree, and setting a label corresponding to the definition component in the definition template file;
and determining the node relation of each label in the definition template file according to the nesting relation of the definition components in the second syntax tree.
5. The method of claim 4, wherein determining the node relationship of each tag in the definition template file according to the nesting relationship of the definition components in the second syntax tree comprises:
and setting a first label corresponding to the first definition component as a child node of a second label corresponding to the second definition component based on the nesting parameter of the first definition component as the second definition component.
6. The method of claim 4, further comprising:
and setting parameters called by each definition component in the second syntax tree as the label attributes of the corresponding labels.
7. The method of claim 1, wherein the source code is DART language code and the logic code is JavaScript language code; wherein the content of the first and second substances,
generating logic code for an applet application based on the second syntax tree, comprising:
generating intermediate code in DART language according to the second syntax tree;
and converting the intermediate code of the DART language into logic code of the JavaScript language based on a conversion tool of the DART language and the JavaScript language.
8. An applet application executing method comprising:
running object code of the applet and determining rendering data for rendering the interactive interface, wherein the object code is generated based on the compiling method of the applet according to any one of claims 1-7;
transmitting the rendering data to an execution environment of an applet application;
rendering, in the execution environment, an interactive interface of an applet application based on the rendering data.
9. The method of claim 8, wherein the running object code of the applet, determining rendering data for rendering the interactive interface, comprises:
calling and operating a pseudo-Flutterer library, and determining the template name of the fragment to be rendered and the identifier of each defined component in the fragment to be rendered according to the defined template file of the applet application;
and determining rendering data according to the template name of the fragment to be rendered and the identifier of each defined component in the fragment to be rendered.
10. The method according to claim 8 or 9, characterized in that the execution environment of the object code of the applet is independent of the execution environment of the applet; wherein transmitting the rendering data to an execution environment of an applet comprises:
and transmitting the rendering data to an execution environment of the applet based on an interoperation module, wherein the interoperation module is used for connecting the execution environment of the object code of the applet and the execution environment of the applet.
11. The method of claim 10, further comprising:
acquiring an externally input operation instruction under the execution environment of the applet application;
and transmitting the operation instruction to the running environment of the code of the applet application, executing the operation instruction in the running environment of the code of the applet application, and rendering the interactive interface of the applet application according to the execution result of the operation instruction.
12. An applet compiling apparatus comprising:
the first syntax tree generation module is used for acquiring a source code of a native application and generating a first syntax tree based on the source code;
the second syntax tree production module is used for adjusting the first syntax tree according to a preset rule to generate a second syntax tree;
the definition template file generating module is used for traversing the second syntax tree and generating a definition template file of the applet application based on definition nodes in the second syntax tree;
a logic code generation module for generating logic code of the applet application based on the second syntax tree;
and the object code generating module is used for obtaining the object code of the applet application based on the definition template file and the logic code.
13. An applet running apparatus, comprising:
a rendering data determination module, configured to run an object code of an applet, and determine rendering data for rendering an interactive interface, where the object code is generated based on a compilation method of the applet according to any one of claims 1 to 7;
the rendering data transmission module is used for transmitting the rendering data to an execution environment of the applet application;
and the interactive interface rendering module is used for rendering the interactive interface of the applet application based on the rendering data in the execution environment.
14. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of compiling an applet as claimed in any one of claims 1-7 when executing the program.
15. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of compiling an applet according to any one of claims 1-7.
16. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of running an applet as claimed in any one of claims 8-11 when executing the program.
17. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method for running an applet according to one of claims 8-11.
CN201910889213.7A 2019-09-19 2019-09-19 Compiling method and running method of applet, storage medium and electronic equipment Pending CN111736840A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910889213.7A CN111736840A (en) 2019-09-19 2019-09-19 Compiling method and running method of applet, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910889213.7A CN111736840A (en) 2019-09-19 2019-09-19 Compiling method and running method of applet, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN111736840A true CN111736840A (en) 2020-10-02

Family

ID=72646092

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910889213.7A Pending CN111736840A (en) 2019-09-19 2019-09-19 Compiling method and running method of applet, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111736840A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112379885A (en) * 2020-11-19 2021-02-19 北京百度网讯科技有限公司 Applet compiling method, device and equipment and readable storage medium
CN112799677A (en) * 2021-02-05 2021-05-14 北京字节跳动网络技术有限公司 Hook method, device, equipment and storage medium for compilation period
CN113094086A (en) * 2021-04-13 2021-07-09 北京房江湖科技有限公司 Component integration method and device, computer-readable storage medium and electronic equipment
CN113515286A (en) * 2021-05-08 2021-10-19 上海安畅网络科技股份有限公司 Applet generating and running method, device, equipment and storage medium
CN113778440A (en) * 2021-08-18 2021-12-10 上海瑞家信息技术有限公司 Data processing method and device, electronic equipment and storage medium
CN113805890A (en) * 2021-09-10 2021-12-17 中国银联股份有限公司 Method, device, terminal, system and storage medium for migrating applets across applications
CN115495094A (en) * 2022-11-16 2022-12-20 深圳市客路网络科技有限公司 Method for developing small program and electronic equipment
WO2023245344A1 (en) * 2022-06-20 2023-12-28 北京小米移动软件有限公司 Application processing method and device, terminal, and storage medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130263086A1 (en) * 2012-03-27 2013-10-03 Microsoft Corporation Extensible Mechanism for Providing Suggestions in a Source Code Editor
CN103631632A (en) * 2013-11-29 2014-03-12 华为技术有限公司 Transplantation method and source to source compiler
CN103955426A (en) * 2014-04-21 2014-07-30 中国科学院计算技术研究所 Method and device for detecting code C null-pointer reference
WO2014155148A1 (en) * 2013-03-27 2014-10-02 Netfective Technology Sa Method for transforming first code instructions in a first programming language into second code instructions in a second programming language
CN104572234A (en) * 2014-12-29 2015-04-29 杭州华为数字技术有限公司 Method for generating source codes used for parallel computing architecture and source-to-source compiler
CN105159715A (en) * 2015-09-01 2015-12-16 南京大学 Python code change reminding method on basis of abstract syntax tree node change extraction
CN107045438A (en) * 2016-12-16 2017-08-15 阿里巴巴集团控股有限公司 One kind application top level view processing method, device and component
WO2018082562A1 (en) * 2016-11-07 2018-05-11 腾讯科技(深圳)有限公司 Method and device for compiling page data and rendering page, and storage medium
CN108255485A (en) * 2017-09-22 2018-07-06 优视科技有限公司 Page building method, equipment and electronic equipment
CN108595171A (en) * 2018-04-27 2018-09-28 广州视源电子科技股份有限公司 Model generating method, device, equipment and the storage medium of object
CN108920133A (en) * 2018-06-14 2018-11-30 北京三快在线科技有限公司 Across Programming with Pascal Language method, apparatus, electronic equipment and storage medium
CN109032606A (en) * 2018-07-10 2018-12-18 北京小米移动软件有限公司 The process of compilation method, apparatus and terminal of native applications program
CN109918073A (en) * 2019-01-29 2019-06-21 维沃移动通信有限公司 A kind of generation method of sound code file, device and terminal
CN109947426A (en) * 2019-03-12 2019-06-28 天津字节跳动科技有限公司 Generation method, device and the electronic equipment of application program

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130263086A1 (en) * 2012-03-27 2013-10-03 Microsoft Corporation Extensible Mechanism for Providing Suggestions in a Source Code Editor
WO2014155148A1 (en) * 2013-03-27 2014-10-02 Netfective Technology Sa Method for transforming first code instructions in a first programming language into second code instructions in a second programming language
CN103631632A (en) * 2013-11-29 2014-03-12 华为技术有限公司 Transplantation method and source to source compiler
CN103955426A (en) * 2014-04-21 2014-07-30 中国科学院计算技术研究所 Method and device for detecting code C null-pointer reference
CN104572234A (en) * 2014-12-29 2015-04-29 杭州华为数字技术有限公司 Method for generating source codes used for parallel computing architecture and source-to-source compiler
CN105159715A (en) * 2015-09-01 2015-12-16 南京大学 Python code change reminding method on basis of abstract syntax tree node change extraction
WO2018082562A1 (en) * 2016-11-07 2018-05-11 腾讯科技(深圳)有限公司 Method and device for compiling page data and rendering page, and storage medium
CN107045438A (en) * 2016-12-16 2017-08-15 阿里巴巴集团控股有限公司 One kind application top level view processing method, device and component
CN108255485A (en) * 2017-09-22 2018-07-06 优视科技有限公司 Page building method, equipment and electronic equipment
CN108595171A (en) * 2018-04-27 2018-09-28 广州视源电子科技股份有限公司 Model generating method, device, equipment and the storage medium of object
CN108920133A (en) * 2018-06-14 2018-11-30 北京三快在线科技有限公司 Across Programming with Pascal Language method, apparatus, electronic equipment and storage medium
CN109032606A (en) * 2018-07-10 2018-12-18 北京小米移动软件有限公司 The process of compilation method, apparatus and terminal of native applications program
CN109918073A (en) * 2019-01-29 2019-06-21 维沃移动通信有限公司 A kind of generation method of sound code file, device and terminal
CN109947426A (en) * 2019-03-12 2019-06-28 天津字节跳动科技有限公司 Generation method, device and the electronic equipment of application program

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘楠;韩丽芳;夏坤峰;曲通;: "一种改进的基于抽象语法树的软件源代码比对算法", 信息网络安全, no. 01 *
朱: "一种基于Java技术的PHP编译器的设计与开发", 江苏广播电视大学学报, no. 06 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112379885A (en) * 2020-11-19 2021-02-19 北京百度网讯科技有限公司 Applet compiling method, device and equipment and readable storage medium
CN112379885B (en) * 2020-11-19 2024-04-09 北京百度网讯科技有限公司 Applet compiling method, device, equipment and readable storage medium
CN112799677A (en) * 2021-02-05 2021-05-14 北京字节跳动网络技术有限公司 Hook method, device, equipment and storage medium for compilation period
CN112799677B (en) * 2021-02-05 2023-09-12 北京字节跳动网络技术有限公司 Method, device, equipment and storage medium for hook of compiling period
CN113094086A (en) * 2021-04-13 2021-07-09 北京房江湖科技有限公司 Component integration method and device, computer-readable storage medium and electronic equipment
CN113094086B (en) * 2021-04-13 2024-01-19 贝壳找房(北京)科技有限公司 Component integration method, device, computer readable storage medium and electronic equipment
CN113515286B (en) * 2021-05-08 2022-06-17 上海安畅网络科技股份有限公司 Applet generating and running method, device, equipment and storage medium
CN113515286A (en) * 2021-05-08 2021-10-19 上海安畅网络科技股份有限公司 Applet generating and running method, device, equipment and storage medium
CN113778440A (en) * 2021-08-18 2021-12-10 上海瑞家信息技术有限公司 Data processing method and device, electronic equipment and storage medium
CN113778440B (en) * 2021-08-18 2024-01-26 上海瑞家信息技术有限公司 Data processing method and device, electronic equipment and storage medium
CN113805890A (en) * 2021-09-10 2021-12-17 中国银联股份有限公司 Method, device, terminal, system and storage medium for migrating applets across applications
WO2023245344A1 (en) * 2022-06-20 2023-12-28 北京小米移动软件有限公司 Application processing method and device, terminal, and storage medium
CN115495094A (en) * 2022-11-16 2022-12-20 深圳市客路网络科技有限公司 Method for developing small program and electronic equipment

Similar Documents

Publication Publication Date Title
CN111736840A (en) Compiling method and running method of applet, storage medium and electronic equipment
EP3605324B1 (en) Application development method and tool, and storage medium thereof
CN109542399B (en) Software development method and device, terminal equipment and computer readable storage medium
US8762962B2 (en) Methods and apparatus for automatic translation of a computer program language code
CN111507086B (en) Automatic discovery of translated text locations in localized applications
US8762963B2 (en) Translation of programming code
CN108595171B (en) Object model generation method, device, equipment and storage medium
CN110554875B (en) Code conversion method and device, electronic equipment and storage medium
CN110968305A (en) Applet visualization generation method, device, equipment and storage medium
CN111740948B (en) Data packet issuing method, dynamic updating method, device, equipment and medium
US11934287B2 (en) Method, electronic device and computer program product for processing data
CN110543297A (en) method and apparatus for generating source code
CN110688111A (en) Configuration method, device, server and storage medium of business process
CN111507074B (en) Data processing method and device, processor, electronic equipment and storage medium
CN114153459A (en) Interface document generation method and device
CN114036439A (en) Website building method, device, medium and electronic equipment
CN115599386A (en) Code generation method, device, equipment and storage medium
US9405652B2 (en) Regular expression support in instrumentation languages using kernel-mode executable code
CN101253477A (en) Nullable and late binding
CN112269566B (en) Script generation processing method, device, equipment and system
CN113238739A (en) Plug-in development and data acquisition method, device, electronic equipment and medium
CN113377342B (en) Project construction method and device, electronic equipment and storage medium
CN111258802A (en) Method for capturing application program crash information and related equipment
CN114625373A (en) Application conversion method and device, electronic equipment and storage medium
CN111898762A (en) Deep learning model catalog creation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination