Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Conversion method and system for codes between different platforms

A conversion method and conversion system technology, applied in the direction of program code conversion, software maintenance/management, reverse engineering, etc., can solve the problem of developing the same function APP many times, reduce the workload and development cycle, improve the online speed, users Experience the best results

Active Publication Date: 2019-08-09
SHANGHAI CTRIP COMMERCE CO LTD
View PDF10 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The technical problem to be solved by the present invention is to provide a code conversion method and system between different platforms in order to overcome the defect in the prior art that the same function APP needs to be developed multiple times under different platforms

Method used

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

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Conversion method and system for codes between different platforms
  • Conversion method and system for codes between different platforms
  • Conversion method and system for codes between different platforms

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0070] This embodiment provides a code conversion method between different platforms, the conversion method includes:

[0071] Step 11, through the conversion tool, convert the business code under the first platform into a syntax tree;

[0072] Step 12, retrieve events and functions in the business code under the first platform through the syntax tree;

[0073] Step 13, retrieve the conversion rule corresponding to the event and the function in the registry, and put the retrieved conversion rule into the corresponding position of the event and the function in the syntax tree;

[0074] The registry includes preset conversion rules for converting events and functions under the first platform to corresponding events and functions under the second platform;

[0075] Step 14: Convert the syntax tree into business codes under the second platform by using the conversion tool.

[0076] In this embodiment, the conversion between the syntax tree and the code is realized by AST, wherei...

Embodiment 2

[0079] This embodiment provides a code conversion method between different platforms, so Figure 4 As shown, the conversion method includes:

[0080] Step 21, compare the business code under the first platform and the business code under the second platform to obtain the difference point of the business code under the two platforms;

[0081] Step 22, according to the difference point, make a registry;

[0082] The registry includes preset conversion rules for converting events and functions under the first platform to corresponding events and functions under the second platform;

[0083] Step 23, standardize the business code under the first platform;

[0084] Step 24, through the conversion tool, convert the business code under the first platform into a syntax tree;

[0085] Step 25, retrieving events and functions in the business code under the first platform through the syntax tree;

[0086] Step 26, retrieve the conversion rule corresponding to the event and the functi...

Embodiment 3

[0116] This embodiment provides a code conversion system between different platforms, wherein, in this embodiment, the code under the first platform is stored in the first folder; the code under the second platform is stored in the second folder.

[0117] Place Figure 10 As shown, the conversion system includes: a syntax tree conversion module 41, a business code conversion module 42, a specification module 43, a comparison module 44, a registry making module 45, a mapping module 46, a frame code conversion module 47, a theme matching module 48, Traverse module 49 , common code conversion module 50 and verification module 51 .

[0118] The syntax tree conversion module 41 is used to convert the business code under the first platform into a syntax tree by using a conversion tool. In this embodiment, the conversion tool is AST.

[0119] The service code conversion module 42 is configured to perform batch processing on the node contents in the syntax tree according to preset c...

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

PUM

No PUM Login to View More

Abstract

The invention discloses a conversion method and system for codes between different platforms, the codes comprise service codes, and the conversion method comprises the following steps: converting theservice codes under a first platform into a syntax tree through a conversion tool; and performing batch processing on the node contents in the syntax tree according to a preset conversion rule to obtain a service code under a second platform corresponding to the service code under the first platform. According to the invention, the use of multiple platforms can be realized under the condition thatonly one set of codes is developed; therefore, the workload and the development period of developers can be reduced, meanwhile, the learning cost under different platforms and the maintenance cost ofcodes under different platforms are also reduced, and on the other hand, the online speed of related APPs is also greatly increased, so that the user experience is better.

Description

technical field [0001] The invention relates to the technical field of computer information, in particular to a method and system for code conversion between different platforms. Background technique [0002] With the rapid development of computer information technology, various types of APPs (applications) are constantly emerging. Developers usually need to develop the same APP under different platforms. The usual practice is to develop different platforms under different platforms. APP with the same function under the grammar rules and the underlying architecture. SUMMARY OF THE INVENTION [0003] The technical problem to be solved by the present invention is to provide a method and system for code conversion between different platforms in order to overcome the defect in the prior art that APPs with the same function need to be developed multiple times under multiple different platforms. [0004] The present invention solves the above-mentioned technical problems throug...

Claims

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

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/51G06F8/75
CPCG06F8/51G06F8/75Y02P90/30
Inventor 周新毅邓玉莹徐步欣
Owner SHANGHAI CTRIP COMMERCE CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products