CN113778440B - Data processing method and device, electronic equipment and storage medium - Google Patents
Data processing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN113778440B CN113778440B CN202110952594.6A CN202110952594A CN113778440B CN 113778440 B CN113778440 B CN 113778440B CN 202110952594 A CN202110952594 A CN 202110952594A CN 113778440 B CN113778440 B CN 113778440B
- Authority
- CN
- China
- Prior art keywords
- class
- language
- library
- data processing
- syntax tree
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Devices For Executing Special Programs (AREA)
- Stored Programmes (AREA)
Abstract
The application discloses a data processing method, a data processing device, electronic equipment and a storage medium. The method comprises the steps that a public basic class library which is required to be referenced or relied on by a target code of a JS language is independently set, the public basic class library is not embedded into the target code of the JS language, for example, the public basic class library is set in a development environment, under the condition that a developer develops the target code of the JS language or translates the target code of the JS language from codes of other languages, the obtained target code of the JS language does not have the public basic class library, under the condition that an executable file is required to be compiled and obtained by compiling the target code of the JS language, the executable file can be obtained according to the target code of the JS language and the public basic class library which is developed in advance based on the JS language, and therefore, functions of the target code of the JS language in the executable file are also provided with functions of the public basic class library, and the volume and redundancy of the target code of the JS language can be reduced.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a data processing method, a data processing device, an electronic device, and a storage medium.
Background
When a developer writes computer program code for a task, sometimes the source code of the DART language may be written, however, sometimes due to business requirements, code of other languages, e.g., JAVASCRIPT (JS), etc., may also be written for the task. In this case, to save the developer's workload, the DART language source code may be automatically translated into JAVASCRIPT language object code, e.g., may be translated into JAVASCRIPT language object code by the self-contained tool DART2JAVASCRIPT in the DART language SDK (Software Development Kit ).
Wherein DART2JAVASCRIPT can convert the source code of DART language into byte code (code in one format and irrelevant to computer language), and then generate the target code of JAVASCRIPT language according to the byte code.
However, the inventors found that the above procedure has the following drawbacks:
on the one hand, DART2JAVASCRIPT detects dependent public basic classes in source codes of DART language according to main entry functions in the source codes of DART language, and the generated JAVASCRIPT language target codes comprise used functions in the dependent public basic classes and do not comprise unused functions in the dependent public basic classes, so that the JAVASCRIPT language target codes execute more efficiently, but the generated JAVASCRIPT language target codes comprise the used functions in the dependent public basic classes, so that redundancy and volume of the generated JAVASCRIPT language target codes are caused.
On the other hand, if libraries are relied on in the source code of the DART language, but if the relied libraries are not compatible with (or not suitable for) the JAVASCRIPT language, errors can be caused in the process of generating the target code of the JAVASCRIPT language according to the byte codes, and finally the target code of the JAVASCRIPT language cannot be generated.
Disclosure of Invention
The application discloses a data processing method, a data processing device, electronic equipment and a storage medium.
In a first aspect, the present application shows a data processing method, the method comprising:
generating an abstract syntax tree of source codes of DART language;
screening target nodes in the abstract syntax tree, wherein the target nodes at least comprise User Interface (UI) related nodes and/or data processing logic related nodes
Code translation of the target node is carried out to obtain target codes of JAVASCRIPT language;
and acquiring the executable file according to the target code of the JAVASCRIPT language and a public basic class library which is developed in advance based on the JAVASCRIPT language.
In an alternative implementation, the screening the abstract syntax tree for the target node includes:
searching nodes with UI attributes in the abstract syntax tree, and searching all upper nodes of the node cascade with the UI attributes in the abstract syntax tree;
And acquiring the UI related node according to the node with the UI attribute and the upper node.
In an alternative implementation, searching the abstract syntax tree for a node having UI properties includes:
and searching nodes with preset UI keywords in the attributes in the abstract syntax tree.
In an alternative implementation, the preset UI keyword includes at least State.
In an alternative implementation, the screening the abstract syntax tree for the target node includes:
searching a library file with data processing logic attributes in an abstract syntax tree; acquiring variables and functions of the library file level defined in the library file, acquiring classes defined in the library file, and acquiring classes on which the classes defined in the library file depend;
and acquiring data processing logic related nodes according to at least the variables, the functions, the classes defined in the library file and the classes on which the classes defined in the library file depend.
In an alternative implementation, searching a library file having data processing logic attributes in an abstract syntax tree includes:
searching nodes with keywords of preset data processing logic in the attributes in the abstract syntax tree.
In an alternative implementation, the keywords of the preset data processing logic include at least part of.
In an alternative implementation, obtaining a class on which a class defined in the library file depends includes:
acquiring an association file of the library file according to a preset association instruction;
acquiring a dependent instruction in the associated file;
under the condition that the dependent instruction comprises the class name of the dependent class, acquiring path information of the dependent class according to the class name;
and acquiring the class on which the class defined in the library file depends according to the path information.
In an optional implementation manner, the preset association instruction includes a part instruction; the association file comprises a part file; the dependent instruction includes an import instruction.
In an alternative implementation, obtaining path information of the dependent class according to the class name includes:
and converting the class name into the path information according to the package file.
In an alternative implementation, the common base class library includes at least one of: date class, duration class, itemable class, list class, map class, regex class, set class, auxiliary library related to inheritance of class, and common functions on Object base class Object.
In a second aspect, the present application shows a data processing apparatus, the apparatus comprising:
the generation module is used for generating an abstract syntax tree of source codes of DART language;
the screening module is used for screening target nodes in the abstract syntax tree, and the target nodes at least comprise User Interface (UI) related nodes and/or data processing logic related nodes;
the translation module is used for translating the codes of the target node to obtain target codes of JAVASCRIPT language;
and the acquisition module is used for acquiring the executable file according to the target code of the JAVASCRIPT language and a public basic class library which is developed in advance based on the JAVASCRIPT language.
In an alternative implementation, the screening module includes:
a first searching unit, configured to search nodes with UI attributes in the abstract syntax tree, and a second searching unit, configured to search all upper nodes of the node cascade with UI attributes in the abstract syntax tree;
and the first acquisition unit is used for acquiring the UI related node according to the node with the UI attribute and the upper node.
In an alternative implementation, the first search unit is specifically configured to: and searching nodes with preset UI keywords in the attributes in the abstract syntax tree.
In an alternative implementation, the preset UI keyword includes at least State.
In an alternative implementation, the screening module includes:
a third searching unit for searching the library file with the data processing logic attribute in the abstract syntax tree; the system comprises a second acquisition unit, a third acquisition unit and a fourth acquisition unit, wherein the second acquisition unit is used for acquiring variables and functions of the library file level defined in the library file, the third acquisition unit is used for acquiring classes defined in the library file, and the fourth acquisition unit is used for acquiring classes on which the classes defined in the library file depend;
and a fifth obtaining unit, configured to obtain a data processing logic related node according to at least the variable, the function, the class defined in the library file, and the class on which the class defined in the library file depends.
In an alternative implementation, the third search unit is specifically configured to: searching nodes with keywords of preset data processing logic in the attributes in the abstract syntax tree.
In an alternative implementation, the keywords of the preset data processing logic include at least part of.
In an alternative implementation, the fourth obtaining unit includes:
the first acquisition subunit is used for acquiring the association file of the library file according to a preset association instruction;
The second acquisition subunit is used for acquiring the dependent instruction in the association file;
a third obtaining subunit, configured to obtain, when the dependent instruction includes a class name of a dependent class, path information of the dependent class according to the class name;
and a fourth obtaining subunit, configured to obtain, according to the path information, a class on which the class defined in the library file depends.
In an optional implementation manner, the preset association instruction includes a part instruction; the association file comprises a part file; the dependent instruction includes an import instruction.
In an alternative implementation, the third obtaining subunit is specifically configured to: and converting the class name into the path information according to the package file.
In an alternative implementation, the common base class library includes at least one of: date class, duration class, itemable class, list class, map class, regex class, set class, auxiliary library related to inheritance of class, and common functions on Object base class Object.
In a third aspect, the present application shows an electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
Wherein the processor is configured to perform the data processing method according to the first aspect.
In a fourth aspect, the present application shows a non-transitory computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform the data processing method according to the first aspect.
In a fifth aspect, the present application shows a computer program product, which when executed by a processor of an electronic device, causes the electronic device to perform the data processing method according to the first aspect.
The technical scheme that this application provided can include following beneficial effect:
the common base class library is developed based on the JAVASCRIPT language, and if the common base class library is embedded in the target code of the JAVASCRIPT language, the redundancy and the volume of the target code of the JAVASCRIPT language are increased.
Therefore, in order to avoid the increased redundancy and volume of the object code of the JAVASCRIPT language, the public basic class library to which the object code of the JAVASCRIPT language needs to refer or depends may be set separately, the public basic class library is not embedded into the object code of the JAVASCRIPT language, for example, the public basic class library is set in a development environment, a developer may not have the public basic class library in the case of developing the object code of the JAVASCRIPT language or translating the object code of the JAVASCRIPT language from the object code of the other language, and in the case of compiling the object code of the JAVASCRIPT language to obtain an executable file, the executable file may be obtained according to the object code of the JAVASCRIPT language and the public basic class library developed in advance based on the JAVASCRIPT language, for example, in the development environment, the object code of the JAVASCRIPT language and the public basic class library developed in advance based on the JAVASCRIPT language are combined and compiled to obtain the executable file.
Thus, the executable file has both the function of the object code of the JAVASCRIPT language and the function of the common base class library, that is, the function of making the executable file generated from the object code of the JAVASCRIPT language have the common base class library, for example, the function of making the executable file capable of referencing the common base class library, and the like. This reduces the volume and redundancy of object code in the JAVASCRIPT language.
In addition, since the common base class library is developed based on the JAVASCRIPT language, the common base class library is applicable to the JAVASCRIPT language, and since the JAVASCRIPT language can be applied to the web domain, the common base class library can be applied to the web domain.
In this way, whether the source code of the DART language depends on the DART language library corresponding to the public basic class library or not, the DART language library corresponding to the public basic class library on which the source code of the DART language depends can be ignored in the process of translating the source code of the DART language, codes except for the DART language library corresponding to the dependent public basic class library in the source code of the DART language can be directly translated, and after the target code of the JAVASCRIPT language is obtained through translation, executable files can be obtained according to the target code of the JAVASCRIPT language and the public basic class library which is developed in advance based on the JAVASCRIPT language.
Thus, even if the source code of the DART language depends on the library of the DART language corresponding to the common basic class library, errors can be avoided in the process of translating the source code of the DART language, and finally the target code of the JAVASCRIPT language obtained by translation is available and the generated executable file is available.
And, as long as the grammar is correct for the source code of DART language, even if the source code of DART language cannot be normally compiled due to the fact that the DART language library corresponding to the public basic class library is not relied on in the source code of DART language, the source code of DART language can be translated to obtain the target code of JAVASCRIPT language, therefore, the translation scheme of the application has wide application range and strong adaptability.
And because the public basic class library is developed based on JAVASCRIPT language alone, in the process of translating the source codes of the DART language, the library of the DART language corresponding to the public basic class library in the source codes of the DART language can not be searched, so that the searching times can be reduced, and the translation efficiency can be further improved.
Secondly, as the target codes of the JAVASCRIPT language can not have a public basic class library, the target codes of the JAVASCRIPT language and the source codes of the DART language have good referential property, thereby facilitating the contrast check, secondary development and the like of the target codes of the JAVASCRIPT language and the source codes of the DART language by developers.
Drawings
FIG. 1 is a flow chart of steps of a data processing method of the present application.
Fig. 2 is a block diagram of a data processing apparatus of the present application.
Fig. 3 is a block diagram of an electronic device shown in the present application.
Fig. 4 is a block diagram of an electronic device shown in the present application.
Detailed Description
In order that the above-recited objects, features and advantages of the present application will become more readily apparent, a more particular description of the invention briefly described above will be rendered by reference to specific embodiments that are illustrated in the appended drawings.
Referring to fig. 1, a flowchart of steps of a data processing method of the present application is shown, and the method may specifically include the following steps:
in step S101, an abstract syntax tree of source code of DART language is generated.
In this application, where translation of DART language source code is desired, the DART language source code may be obtained and then an abstract syntax tree (Abstract Syntax Tree, AST) of the DART language source code is generated. The abstract syntax tree of the source code of the DART language can be generated by using a current existing abstract syntax tree generation mode, and the method for generating the abstract syntax tree is not limited in the application.
In step S102, target nodes are selected from the abstract syntax tree, the target nodes comprising at least user interface UI related nodes and/or data processing logic related nodes.
In one possible scenario, the source code of DART language developed by a developer is often developed for an application, where the content in the application relates to at least two aspects, UI related content and underlying logic content for data processing, so that, at the time of translation, UI related nodes and data processing logic related nodes can be screened in an abstract syntax tree.
In one embodiment of the present application, when screening UI (User Interface) related nodes in an abstract syntax tree, the method may be implemented by the following procedures, including:
11 Searching the abstract syntax tree for the node with the UI attribute, and searching the abstract syntax tree for all upper nodes of the node cascade with the UI attribute.
When searching the node with the UI attribute in the abstract syntax tree, the node with the preset UI keyword in the attribute may be searched in the abstract syntax tree, where the preset UI keyword at least includes State and the like.
In one embodiment, the attribute of the node in the abstract syntax tree includes the name of the node itself, the name of the upper node of the node cascade, the name of the lower node of the node cascade, and the like, so that all the upper nodes of the node cascade with UI attribute can be searched in the abstract syntax tree according to the name of the upper node of the node cascade in the attribute of the node in the abstract syntax tree.
Alternatively, in another embodiment, a cascade relationship between nodes is recorded in the abstract syntax tree, so after searching the nodes with UI attributes in the abstract syntax tree, all upper nodes of the cascade of nodes with UI attributes can be searched in the abstract syntax tree according to the cascade relationship between nodes recorded in the abstract syntax tree.
12 A UI related node is acquired from all upper nodes of the node cascade having the UI attribute according to the node having the UI attribute.
In one embodiment of the present application, a node having a UI attribute and all upper nodes of a cascade of nodes having a UI attribute may be regarded as UI related nodes or the like.
In another embodiment of the present application, when screening data processing logic related nodes in an abstract syntax tree, the method may be implemented by the following procedures, including:
21 Searching the abstract syntax tree for a library file having data processing logic properties. And acquiring variables and functions of a library file level defined in the library file, acquiring classes defined in the library file, and acquiring classes on which the classes defined in the library file depend.
When searching the library file with the data processing logic attribute in the abstract syntax tree, searching the node with the keyword of the preset data processing logic in the attribute in the abstract syntax tree. The keywords of the preset data processing logic at least comprise part of the like, so that the library file can be part of the file and the like.
And when the class on which the class defined in the library file depends is acquired, acquiring the associated file of the library file according to a preset associated instruction. Then the dependent instructions in the association file are obtained. In the case where the class name of the dependent class is included in the dependent instruction, path information of the dependent class is acquired from the class name, for example, the class name is converted into path information of the dependent class according to the ". Packages" file. And then acquiring the class depended on by the class defined in the library file according to the path information of the depended class.
In one embodiment, the preset association instruction may include a part instruction and the like. The association file includes a part file and the like. The dependent instructions include import instructions, etc.
22 A data processing logic related node is obtained based at least on the variables, the functions, the classes defined in the library file, and the classes relied upon by the classes defined in the library file.
In one embodiment, variables, functions, classes defined in the library file, and classes relied upon by classes defined in the library file may be determined as data processing logic dependent nodes.
Wherein the node obtained in step S102 includes a class definition (class declaration) node, and the code obtained in step S102 includes a class definition (class declaration) code and the like.
In step S103, the code of the target node is translated to obtain the target code of the JAVASCRIPT language.
The codes of the UI related nodes and the codes of the data processing logic related nodes comprise class codes, the class codes at least comprise data and functions, the data can comprise variables and the like, and the functions are used for processing the assigned values in a specific mode after assigning the variables to obtain processing results.
One way of understanding the code translation of the target node in this application may be: code translation of functions in the code of the class included in the code of the UI related node, and the like.
For functions in a class, it includes a single statement or a statement block made up of multiple statements, etc. In the case where it includes a statement block, a function may be respectively divided into a plurality of statements, and the plurality of statements may be respectively translated.
The statement of a function includes a functional structure and a functional expression.
The structure includes a declaration structure, an assignment structure, a circulation structure, a control structure, and the like.
The grammar rules corresponding to different function structures are often different, so that for any one function, the structure and the function expression of the function can be identified, the structure of the function is translated according to the grammar rules of the structure of the function to obtain the structure of the JAVASCRIPT language, and the function expression of the function is translated to obtain the expression of the JAVASCRIPT language to obtain the function expression of the JAVASCRIPT language. The same is true for each of the other functions.
For a specific translation mode, reference may be made to a currently existing mode, and the present application does not limit the specific translation mode.
For example, in one example, during translation, a new abstract syntax tree may be generated according to the target node, the code of the node in the new abstract syntax tree may be modified according to the difference between the syntax of the DART language and the syntax of the JAVASCRIPT language, and the target code of the JAVASCRIPT language may be generated according to the modified abstract syntax tree and the preset JAVASCRIPT file template.
In one manner, during the process of converting the source code of the DART language into the byte code, the DART2JAVASCRIPT optimizes the source code of the DART language, for example, merges constant expressions, concatenates codes, optimizes registers, deletes unused codes in the source code of the DART language, and the like, so that the finally obtained target code of the JAVASCRIPT language is executed more efficiently, but the difference between the language logic structure of the finally obtained target code of the JAVASCRIPT language and the language logic structure of the source code of the DART language is larger, and the target code of the JAVASCRIPT language is in a structure which is unfavorable for human interpretation, so that the target code of the JAVASCRIPT language is poorer in readability and is unfavorable for developers to develop the target code of the JAVASCRIPT language for the second time.
In the application, during the translation process, elements such as the names of variables in the source code of the DART language are reserved in the target code of the JAVASCRIPT language. According to the method for respectively translating the structure and the expression of the function, the difference between the language logic structure of the finally obtained JAVASCRIPT language target code and the language logic structure of the DART language source code can be reduced, and because the DART language is written by a developer, the language logic structure of the DART language source code is always a structure which is beneficial to human interpretation, so that the language logic structure of the translated JAVASCRIPT language target code is always a structure which is beneficial to human interpretation, the JAVASCRIPT language target code has better readability, and the understanding and secondary development of the JAVASCRIPT language target code by the developer are facilitated.
In one example, for strings that are of the same role, the strings supported for use in DART are different from the strings supported for use in JAVASCRIPT. Thus, the specific character string in the source code of the DART language can be translated into the character string used by the corresponding JAVASCRIPT language support. For example, dynamic to let, var to let, string to var, int to var, and void to function, etc.
In another example, in the source code of DART language, if an index value exists, an index method is added before the index value, and the index method includes "__ op_idx __" and the like.
In yet another example, in source code of DART language, if there is a definition of an object literal, a type translation statement of the object literal is added before the definition of the object literal to translate the type of the object literal to a type supported by JAVASCRIPT language, the type translation statement of the object literal including "convertObjectLiterAlToSetOrMap".
In yet another example, in the source code of DART language, if there are defined optional parameters, the character strings defined by the parameter types preceding the defined optional parameters are deleted, e.g., int, bool, double, etc., and brackets, etc., that encompass the optional parameters are deleted.
In yet another example, in source code in Dart language, if expressions are typically used for array object declarations, dynamically controlling the elements and length of data objects, where values of array variables need to be translated into immediate execution functions; and translate the if expression in the array object into a triple operator "? If the judging condition of the if expression is false, filling by using a special occupying object; then, filtering is carried out on the data object to remove the special occupying object; the filtered result is then returned.
In yet another example, in the scenario of creating an object, in the source code of the Dart language, class definitions are translated into function objects, class names as function names, and functions are defined on the defined function objects by a fixed name, which acts: non-static member variables defined in the class are implemented. Setting prototype of a function object as an empty object, and defining a function on the prototype of the function object by a fixed name, wherein the function has the functions of: initializing defined non-static member variables, in function definition, detecting whether the function execution context is equal to __ global __, and if the function execution context is equal to __ global __, creating a function object through a new keyword; at creation time, function parameters are obtained through the parameters keywords and identified by special key values. If the function execution context is not equal to __ global __, it is checked whether the function parameter contains a defined special key identification. If the function parameter contains a defined special key value identifier, the original function parameter is fetched through the defined special key value identifier. If the function parameters contain defined special key value identifications, then the parameters key is used as the original function parameters. The defined function, the incoming function context this and the determined original function parameters are called. Wherein __ global __ is provided by a common base class library that acts as a global object for the __ global __ -JavaScript execution environment.
In yet another example, in the scenario where a child calls a parent, the function defined on the child needs to first call the same function defined on the parent, passing in the execution context this as a parameter. After the translation of the function object corresponding to the subclass is completed, the inhereit is called, and the function objects corresponding to the parent class and the subclass are transmitted. For the member function calling the super key, the method with the same name defined in the prototype of the prototype chain object corresponding to the function object of the parent class is accessed, and the function context is and the parameters of the member function are input. If a class does not explicitly specify a parent class, its parent class is the base Object; the non-static member variables defined by objects need to be initialized and implemented in a common base class library. Wherein __ global __ and inhereit are provided by a common base class library, and function as global objects of __ global __ -JavaScript execution environment. inherit (child) -specifies inheritance relationships between classes.
In yet another example, in the scenario where static member variables and static member functions of a class are defined, the static member variables and methods of the class are defined directly on the "class definition translates into function objects". The static member functions of the class are defined first, and then the static member variables of the class are defined. Static member variables of a class are translated into a form of an execution function. The immediate execution function execution context is switched by the with key to the function object into which the class definition translates.
In yet another example, in a scenario involving MAP base types, literal objects are translated into MAP types defined in a base type library by a convertObjectLiterAlToSetOrMap utility function. The statement that accesses the associated key value through the index operator [ ] translates into a __ op_idx __ method call on the Map type, the call parameter being the index key. The statement that modifies the associated key value on the Map object translates to a __ op_eq __ method call on the Map type with the call parameters being the index key and its associated value. Wherein, the operations on Map objects are all implemented in a common base class library, and convertObjectLiteralToSetOrMap is implemented in a base class library. __ op_idx __, __ op_eq __, and other methods supported by Map are implemented in the base type library.
In step S104, an executable file is acquired from the object code of the JAVASCRIPT language and a common base class library developed in advance based on the JAVASCRIPT language.
In this application, in general, if a developer needs to develop the object code of the JAVASCRIPT language, the developed object code of the JAVASCRIPT language often needs to refer to or rely on the common base class library.
Wherein, the public basic class library developed based on JAVASCRIPT language can at least comprise at least one of the following: date class, duration class, itemable class, list class, map class, regex class, set class, auxiliary library related to inheritance of class, common functions on Object base class Object, etc. Of course, other types of classes or functions, etc. may be included according to the actual situation, which is not limited in this application.
In one possible scenario, the object code of the JAVASCRIPT language may or may not include part of the content in the common base class library.
The common base class library is developed based on the JAVASCRIPT language, and if the common base class library is embedded in the target code of the JAVASCRIPT language, the redundancy and the volume of the target code of the JAVASCRIPT language are increased.
Therefore, in order to avoid the increased redundancy and volume of the object code of the JAVASCRIPT language, the public basic class library to which the object code of the JAVASCRIPT language needs to refer or depends may be set separately, the public basic class library is not embedded into the object code of the JAVASCRIPT language, for example, the public basic class library is set in a development environment, a developer may not have the public basic class library in the case of developing the object code of the JAVASCRIPT language or translating the object code of the JAVASCRIPT language from the object code of the other language, and in the case of compiling the object code of the JAVASCRIPT language to obtain an executable file, the executable file may be obtained according to the object code of the JAVASCRIPT language and the public basic class library developed in advance based on the JAVASCRIPT language, for example, in the development environment, the object code of the JAVASCRIPT language and the public basic class library developed in advance based on the JAVASCRIPT language are combined and compiled to obtain the executable file.
Thus, the executable file has both the function of the object code of the JAVASCRIPT language and the function of the common base class library, that is, the function of making the executable file generated from the object code of the JAVASCRIPT language have the common base class library, for example, the function of making the executable file capable of referencing the common base class library, and the like. This reduces the volume and redundancy of object code in the JAVASCRIPT language.
In addition, since the common base class library is developed based on the JAVASCRIPT language, the common base class library is applicable to the JAVASCRIPT language, and since the JAVASCRIPT language can be applied to the web domain, the common base class library can be applied to the web domain.
In this way, whether the source code of the DART language depends on the DART language library corresponding to the public basic class library or not, the DART language library corresponding to the public basic class library on which the source code of the DART language depends can be ignored in the process of translating the source code of the DART language, codes except for the DART language library corresponding to the dependent public basic class library in the source code of the DART language can be directly translated, and after the target code of the JAVASCRIPT language is obtained through translation, executable files can be obtained according to the target code of the JAVASCRIPT language and the public basic class library which is developed in advance based on the JAVASCRIPT language.
Thus, even if the source code of the DART language depends on the library of the DART language corresponding to the common basic class library, errors can be avoided in the process of translating the source code of the DART language, and finally the target code of the JAVASCRIPT language obtained by translation is available and the generated executable file is available.
And, as long as the grammar is correct for the source code of DART language, even if the source code of DART language cannot be normally compiled due to the fact that the DART language library corresponding to the public basic class library is not relied on in the source code of DART language, the source code of DART language can be translated to obtain the target code of JAVASCRIPT language, therefore, the translation scheme of the application has wide application range and strong adaptability.
And because the public basic class library is developed based on JAVASCRIPT language alone, in the process of translating the source codes of the DART language, the library of the DART language corresponding to the public basic class library in the source codes of the DART language can not be searched, so that the searching times can be reduced, and the translation efficiency can be further improved.
Secondly, as the target codes of the JAVASCRIPT language can not have a public basic class library, the target codes of the JAVASCRIPT language and the source codes of the DART language have good referential property, thereby facilitating the contrast check, secondary development and the like of the target codes of the JAVASCRIPT language and the source codes of the DART language by developers.
It should be noted that, for the sake of simplicity of description, the method embodiments are all described as a series of combinations of actions, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may take place in other order or simultaneously in accordance with the present application. Further, those skilled in the art will appreciate that the embodiments described in the specification are all alternative embodiments, and that the acts referred to are not necessarily required for the present application.
With reference to fig. 2, a block diagram of a data processing apparatus of the present application is shown, which may specifically comprise the following modules:
a generating module 11, configured to generate an abstract syntax tree of source codes of the DART language;
a screening module 12, configured to screen the abstract syntax tree for a target node, where the target node includes at least a user interface UI related node and/or a data processing logic related node;
a translation module 13, configured to translate the code of the target node to obtain a target code of JAVASCRIPT language;
an obtaining module 14, configured to obtain the executable file according to the object code of the JAVASCRIPT language and a public basic class library that is developed in advance based on the JAVASCRIPT language.
In an alternative implementation, the screening module includes:
a first searching unit, configured to search nodes with UI attributes in the abstract syntax tree, and a second searching unit, configured to search all upper nodes of the node cascade with UI attributes in the abstract syntax tree;
and the first acquisition unit is used for acquiring the UI related node according to the node with the UI attribute and the upper node.
In an alternative implementation, the first search unit is specifically configured to: and searching nodes with preset UI keywords in the attributes in the abstract syntax tree.
In an alternative implementation, the preset UI keyword includes at least State.
In an alternative implementation, the screening module includes:
a third searching unit for searching the library file with the data processing logic attribute in the abstract syntax tree; the system comprises a second acquisition unit, a third acquisition unit and a fourth acquisition unit, wherein the second acquisition unit is used for acquiring variables and functions of the library file level defined in the library file, the third acquisition unit is used for acquiring classes defined in the library file, and the fourth acquisition unit is used for acquiring classes on which the classes defined in the library file depend;
and a fifth obtaining unit, configured to obtain a data processing logic related node according to at least the variable, the function, the class defined in the library file, and the class on which the class defined in the library file depends.
In an alternative implementation, the third search unit is specifically configured to: searching nodes with keywords of preset data processing logic in the attributes in the abstract syntax tree.
In an alternative implementation, the keywords of the preset data processing logic include at least part of.
In an alternative implementation, the fourth obtaining unit includes:
the first acquisition subunit is used for acquiring the association file of the library file according to a preset association instruction;
the second acquisition subunit is used for acquiring the dependent instruction in the association file;
a third obtaining subunit, configured to obtain, when the dependent instruction includes a class name of a dependent class, path information of the dependent class according to the class name;
and a fourth obtaining subunit, configured to obtain, according to the path information, a class on which the class defined in the library file depends.
In an optional implementation manner, the preset association instruction includes a part instruction; the association file comprises a part file; the dependent instruction includes an import instruction.
In an alternative implementation, the third obtaining subunit is specifically configured to: and converting the class name into the path information according to the package file.
In an alternative implementation, the common base class library includes at least one of: date class, duration class, itemable class, list class, map class, regex class, set class, auxiliary library related to inheritance of class, and common functions on Object base class Object.
The common base class library is developed based on the JAVASCRIPT language, and if the common base class library is embedded in the target code of the JAVASCRIPT language, the redundancy and the volume of the target code of the JAVASCRIPT language are increased.
Therefore, in order to avoid the increased redundancy and volume of the object code of the JAVASCRIPT language, the public basic class library to which the object code of the JAVASCRIPT language needs to refer or depends may be set separately, the public basic class library is not embedded into the object code of the JAVASCRIPT language, for example, the public basic class library is set in a development environment, a developer may not have the public basic class library in the case of developing the object code of the JAVASCRIPT language or translating the object code of the JAVASCRIPT language from the object code of the other language, and in the case of compiling the object code of the JAVASCRIPT language to obtain an executable file, the executable file may be obtained according to the object code of the JAVASCRIPT language and the public basic class library developed in advance based on the JAVASCRIPT language, for example, in the development environment, the object code of the JAVASCRIPT language and the public basic class library developed in advance based on the JAVASCRIPT language are combined and compiled to obtain the executable file.
Thus, the executable file has both the function of the object code of the JAVASCRIPT language and the function of the common base class library, that is, the function of making the executable file generated from the object code of the JAVASCRIPT language have the common base class library, for example, the function of making the executable file capable of referencing the common base class library, and the like. This reduces the volume and redundancy of object code in the JAVASCRIPT language.
In addition, since the common base class library is developed based on the JAVASCRIPT language, the common base class library is applicable to the JAVASCRIPT language, and since the JAVASCRIPT language can be applied to the web domain, the common base class library can be applied to the web domain.
In this way, whether the source code of the DART language depends on the DART language library corresponding to the public basic class library or not, the DART language library corresponding to the public basic class library on which the source code of the DART language depends can be ignored in the process of translating the source code of the DART language, codes except for the DART language library corresponding to the dependent public basic class library in the source code of the DART language can be directly translated, and after the target code of the JAVASCRIPT language is obtained through translation, executable files can be obtained according to the target code of the JAVASCRIPT language and the public basic class library which is developed in advance based on the JAVASCRIPT language.
Thus, even if the source code of the DART language depends on the library of the DART language corresponding to the common basic class library, errors can be avoided in the process of translating the source code of the DART language, and finally the target code of the JAVASCRIPT language obtained by translation is available and the generated executable file is available.
And, as long as the grammar is correct for the source code of DART language, even if the source code of DART language cannot be normally compiled due to the fact that the DART language library corresponding to the public basic class library is not relied on in the source code of DART language, the source code of DART language can be translated to obtain the target code of JAVASCRIPT language, therefore, the translation scheme of the application has wide application range and strong adaptability.
And because the public basic class library is developed based on JAVASCRIPT language alone, in the process of translating the source codes of the DART language, the library of the DART language corresponding to the public basic class library in the source codes of the DART language can not be searched, so that the searching times can be reduced, and the translation efficiency can be further improved.
Secondly, as the target codes of the JAVASCRIPT language can not have a public basic class library, the target codes of the JAVASCRIPT language and the source codes of the DART language have good referential property, thereby facilitating the contrast check, secondary development and the like of the target codes of the JAVASCRIPT language and the source codes of the DART language by developers.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
Fig. 3 is a block diagram of an electronic device 800 shown in the present application. For example, electronic device 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 3, the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interactions between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, images, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen between the electronic device 800 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data when the device 800 is in an operational mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 further includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of the electronic device 800. For example, the sensor assembly 814 may detect an on/off state of the device 800, a relative positioning of the components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in position of the electronic device 800 or a component of the electronic device 800, the presence or absence of a user's contact with the electronic device 800, an orientation or acceleration/deceleration of the electronic device 800, and a change in temperature of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communication between the electronic device 800 and other devices, either wired or wireless. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi, an operator network (e.g., 2G, 3G, 4G, or 5G), or a combination thereof. In one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast operation information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 804 including instructions executable by processor 820 of electronic device 800 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Fig. 4 is a block diagram of an electronic device 1900 shown in the present application. For example, electronic device 1900 may be provided as a server.
Referring to FIG. 4, electronic device 1900 includes a processing component 1922 that further includes one or more processors and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by processing component 1922. The application programs stored in memory 1932 may include one or more modules each corresponding to a set of instructions. Further, processing component 1922 is configured to execute instructions to perform the methods described above.
The electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output (I/O) interface 1958. The electronic device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, or the like.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The foregoing has described in detail a data processing method and apparatus provided herein, and specific examples have been presented herein to illustrate the principles and embodiments of the present application, the above examples being provided only to assist in understanding the method and core ideas of the present application; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.
Claims (12)
1. A method of data processing, the method comprising:
generating an abstract syntax tree of source codes of DART language;
screening target nodes in the abstract syntax tree, wherein the target nodes at least comprise User Interface (UI) related nodes and/or data processing logic related nodes;
code translation of the target node is carried out to obtain target codes of JAVASCRIPT language;
acquiring an executable file according to an object code of a JAVASCRIPT language and a public basic class library which is developed in advance based on the JAVASCRIPT language;
wherein the screening the target node in the abstract syntax tree comprises:
searching nodes with UI attributes in the abstract syntax tree, and searching all upper nodes of the node cascade with the UI attributes in the abstract syntax tree;
acquiring the UI related node according to the node with the UI attribute and the upper node;
and/or the number of the groups of groups,
screening target nodes in the abstract syntax tree comprises:
searching a library file with data processing logic attributes in an abstract syntax tree; acquiring variables and functions of the library file level defined in the library file, acquiring classes defined in the library file, and acquiring classes on which the classes defined in the library file depend;
And acquiring data processing logic related nodes according to at least the variables, the functions, the classes defined in the library file and the classes on which the classes defined in the library file depend.
2. The method of claim 1, wherein finding nodes with UI properties in the abstract syntax tree comprises:
and searching nodes with preset UI keywords in the attributes in the abstract syntax tree.
3. The method of claim 2, wherein the preset UI keywords comprise at least State.
4. The method of claim 1, wherein searching for a library file having data processing logic attributes in an abstract syntax tree comprises:
searching nodes with keywords of preset data processing logic in the attributes in the abstract syntax tree.
5. The method of claim 4, wherein the keywords of the preset data processing logic comprise at least part of.
6. The method of claim 1, wherein obtaining the class on which the class defined in the library file depends comprises:
acquiring an association file of the library file according to a preset association instruction;
acquiring a dependent instruction in the associated file;
Under the condition that the dependent instruction comprises the class name of the dependent class, acquiring path information of the dependent class according to the class name;
and acquiring the class on which the class defined in the library file depends according to the path information.
7. The method of claim 6, wherein the preset association instruction comprises a part instruction; the association file comprises a part file; the dependent instruction includes an import instruction.
8. The method of claim 6, wherein obtaining path information for the dependent class from the class name comprises:
and converting the class name into the path information according to the package file.
9. The method of claim 1, wherein the common base class library comprises at least one of: date class, duration class, itemable class, list class, map class, regex class, set class, auxiliary library related to inheritance of class, and common functions on Object base class Object.
10. A data processing apparatus, the apparatus comprising:
the generation module is used for generating an abstract syntax tree of source codes of DART language;
the screening module is used for screening target nodes in the abstract syntax tree, and the target nodes at least comprise User Interface (UI) related nodes and/or data processing logic related nodes;
The translation module is used for translating the codes of the target node to obtain target codes of JAVASCRIPT language;
the acquisition module is used for acquiring an executable file according to the target code of the JAVASCRIPT language and a public basic class library which is developed in advance based on the JAVASCRIPT language;
the screening module comprises:
a first searching unit, configured to search nodes with UI attributes in the abstract syntax tree, and a second searching unit, configured to search all upper nodes of the node cascade with UI attributes in the abstract syntax tree;
a first obtaining unit, configured to obtain the UI-related node according to the node having the UI attribute and the upper node;
and/or the number of the groups of groups,
the screening module comprises:
a third searching unit for searching the library file with the data processing logic attribute in the abstract syntax tree; the system comprises a second acquisition unit, a third acquisition unit and a fourth acquisition unit, wherein the second acquisition unit is used for acquiring variables and functions of the library file level defined in the library file, the third acquisition unit is used for acquiring classes defined in the library file, and the fourth acquisition unit is used for acquiring classes on which the classes defined in the library file depend;
and a fifth obtaining unit, configured to obtain a data processing logic related node according to at least the variable, the function, the class defined in the library file, and the class on which the class defined in the library file depends.
11. An electronic device, the electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the data processing method of any of claims 1-9.
12. A non-transitory computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform the data processing method of any of claims 1-9.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110952594.6A CN113778440B (en) | 2021-08-18 | 2021-08-18 | Data processing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110952594.6A CN113778440B (en) | 2021-08-18 | 2021-08-18 | Data processing method and device, electronic equipment and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN113778440A CN113778440A (en) | 2021-12-10 |
| CN113778440B true CN113778440B (en) | 2024-01-26 |
Family
ID=78838311
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110952594.6A Active CN113778440B (en) | 2021-08-18 | 2021-08-18 | Data processing method and device, electronic equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN113778440B (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114444032A (en) * | 2022-01-29 | 2022-05-06 | 北京小川在线网络技术有限公司 | Method and device for obfuscating code with custom rules |
| CN119668569A (en) * | 2023-09-19 | 2025-03-21 | Oppo广东移动通信有限公司 | Source code control method and system, and electronic device |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| AU2012201466A1 (en) * | 2005-06-27 | 2012-04-05 | Csc Technology Singapore Pte Ltd | Code Transformation |
| CN110781086A (en) * | 2019-10-23 | 2020-02-11 | 南京大学 | A cross-project defect impact analysis method based on program dependencies and symbolic analysis |
| CN111488154A (en) * | 2020-04-23 | 2020-08-04 | 北京东土科技股份有限公司 | ST language source code compilation method, device, computer equipment and medium |
| CN111625224A (en) * | 2020-05-28 | 2020-09-04 | 北京百度网讯科技有限公司 | Code generation method, device, equipment and storage medium |
| CN111736840A (en) * | 2019-09-19 | 2020-10-02 | 北京沃东天骏信息技术有限公司 | Compiling method and running method of applet, storage medium and electronic equipment |
| CN111831384A (en) * | 2020-07-20 | 2020-10-27 | 北京百度网讯科技有限公司 | Language switching method and device, device and storage medium |
| CN112306497A (en) * | 2020-11-03 | 2021-02-02 | 高炼 | Method and system for converting natural language into program code |
| CN112328257A (en) * | 2020-11-24 | 2021-02-05 | 中国工商银行股份有限公司 | Code conversion method and device |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101770363B (en) * | 2005-06-27 | 2014-03-12 | Csc科技(新加坡)私人有限公司 | Method and device for transformation of executable code from into different programming language |
| US9886249B2 (en) * | 2015-11-16 | 2018-02-06 | Sap Se | Universal transcompiling framework |
| CN112104709B (en) * | 2020-08-28 | 2022-06-07 | 腾讯科技(深圳)有限公司 | Intelligent contract processing method, device, medium and electronic equipment |
| CN113268243B (en) * | 2021-05-11 | 2024-02-23 | 网易(杭州)网络有限公司 | Memory prediction method and device, storage medium and electronic equipment |
-
2021
- 2021-08-18 CN CN202110952594.6A patent/CN113778440B/en active Active
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| AU2012201466A1 (en) * | 2005-06-27 | 2012-04-05 | Csc Technology Singapore Pte Ltd | Code Transformation |
| CN111736840A (en) * | 2019-09-19 | 2020-10-02 | 北京沃东天骏信息技术有限公司 | Compiling method and running method of applet, storage medium and electronic equipment |
| CN110781086A (en) * | 2019-10-23 | 2020-02-11 | 南京大学 | A cross-project defect impact analysis method based on program dependencies and symbolic analysis |
| CN111488154A (en) * | 2020-04-23 | 2020-08-04 | 北京东土科技股份有限公司 | ST language source code compilation method, device, computer equipment and medium |
| CN111625224A (en) * | 2020-05-28 | 2020-09-04 | 北京百度网讯科技有限公司 | Code generation method, device, equipment and storage medium |
| CN111831384A (en) * | 2020-07-20 | 2020-10-27 | 北京百度网讯科技有限公司 | Language switching method and device, device and storage medium |
| CN112306497A (en) * | 2020-11-03 | 2021-02-02 | 高炼 | Method and system for converting natural language into program code |
| CN112328257A (en) * | 2020-11-24 | 2021-02-05 | 中国工商银行股份有限公司 | Code conversion method and device |
Non-Patent Citations (2)
| Title |
|---|
| Arithmetic Algorithms and Circuits to Convert MVL to MVL Coded Decimal and Vice Versa;H. A. Osseily等;《2008 3rd International Conference on Information and Communication Technologies: From Theory to Applications》;第1-6页 * |
| 计算机软件及计算机应用 领域编程语言SIMC到SIMD的代码转换技术;张迪迅;《中国优秀硕士学位论文全文数据库信息科技辑》(第1期);I138-716 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113778440A (en) | 2021-12-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10817282B2 (en) | Application configuration file generation method and apparatus, application page display method and apparatus and storage medium | |
| CN107423106B (en) | Method and apparatus for supporting multi-frame syntax | |
| US10909203B2 (en) | Method and device for improving page display effect via execution, conversion and native layers | |
| CN110704053B (en) | Style information processing method and device | |
| CN111459494B (en) | A code processing method and device | |
| CN113778440B (en) | Data processing method and device, electronic equipment and storage medium | |
| CN111638907A (en) | Method, device, terminal and storage medium for replacing third-party code segment | |
| US11210449B2 (en) | Page display method and device and storage medium | |
| CN113434134B (en) | Component processing method and device, electronic equipment and storage medium | |
| CN106339384A (en) | Conversion method and device for storage procedures | |
| CN113420531B (en) | Code text conversion method, device and storage medium | |
| CN113220280A (en) | Application generation method and device for generating application | |
| CN107450912A (en) | Layout method, device and the terminal of the page | |
| CN105468606B (en) | Webpage saving method and device | |
| CN118170435B (en) | Instruction information processing method, device, equipment and storage medium | |
| CN116820423A (en) | Code file processing method and device, electronic equipment and storage medium | |
| CN114416065B (en) | Language information visualization method and device | |
| CN114115862B (en) | Data processing method, device, electronic device and storage medium | |
| CN114661338B (en) | A program package processing method, device, electronic device and storage medium | |
| CN114115863B (en) | Data processing method, device, electronic device and storage medium | |
| CN120215894A (en) | A method, device, user equipment and storage medium for generating code | |
| CN114489595B (en) | Data processing method, device, electronic device, storage medium and product | |
| CN115098200B (en) | Language switching method and device, electronic equipment and storage medium | |
| CN114968205B (en) | Data processing method, device, electronic device and storage medium | |
| CN114416094A (en) | Language information conversion method and device |
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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |