Supercharge Your Innovation With Domain-Expert AI Agents!

IDL file-based analysis method and device, electronic equipment and storage medium

A parsing method and document technology, applied in software engineering design, multi-programming device, program control design, etc., can solve the problems of poor accuracy and high labor cost

Active Publication Date: 2019-07-30
BEIJING SANKUAI ONLINE TECH CO LTD
View PDF2 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] It can be seen that the existing technology requires developers to intervene in the compilation process, the labor cost is high, and the accuracy is poor

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
  • IDL file-based analysis method and device, electronic equipment and storage medium
  • IDL file-based analysis method and device, electronic equipment and storage medium
  • IDL file-based analysis method and device, electronic equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0028] refer to figure 1 , which shows a flow chart of specific steps of an IDL file-based parsing method provided in Embodiment 1 of the present invention.

[0029] Step 101, acquire user configuration information, and determine an IDL file from the user configuration information.

[0030] The embodiment of the present invention is applied to the remote call framework Thrift, such as figure 2 As shown, the remote call framework involves the client at the front end and the server at the back end. The client is usually implemented through Node.js, which can complete the underlying protocol conversion, parameter serialization, network I / O and other links. The client and The server has the corresponding underlying network I / O layer, TTransport transport layer, TProtocol protocol layer, and Foo.write() / read() read-write layer, FooService.Client client class layer, FooService.Processor processing layer, business logic layer. Among them, the Foo.write() / read() read-write layer, ...

Embodiment 2

[0046] refer to image 3 , which shows a flow chart of specific steps of an IDL file-based parsing method provided in Embodiment 2 of the present invention.

[0047] Step 201, acquire user configuration information, and determine an IDL file from the user configuration information.

[0048] For this step, reference may be made to the detailed description of step 101, which will not be repeated here.

[0049] Step 202: Determine an entry IDL file from the IDL file according to the user configuration information.

[0050] Wherein, the entry IDL file is an IDL file defining the service, and generally, the path of the entry IDL file can be specified in the user configuration information.

[0051]Step 203, read the entry IDL file to obtain the target character set.

[0052] Specifically, the file opening and reading interface can be called to read the content of the entry IDL file from the entry IDL file to obtain the target character set.

[0053] Step 204, using a preset pars...

Embodiment 3

[0102] refer to Figure 4, which shows a structural diagram of an IDL file-based parsing device provided in Embodiment 3 of the present invention, and the details are as follows.

[0103] The IDL file determining module 301 is configured to acquire user configuration information, and determine an IDL file from the user configuration information.

[0104] The IDL file parsing module 302 is configured to parse the IDL file by using a preset parsing function stack to obtain an abstract syntax tree.

[0105] A connection class instantiation module 303, configured to extract a connection class from the abstract syntax tree, and instantiate the connection class to obtain a connection class instance.

[0106] A function encapsulation module 304, configured to encapsulate the connection class instance and the abstract syntax tree as a client function.

[0107] In summary, the embodiment of the present invention provides a parsing device based on an IDL file, the device comprising: a...

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 provides an IDL file-based analysis method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining user configuration information, and determining an IDL file from the user configuration information; analyzing the IDL file by adopting a preset analysis function stack to obtain an abstract syntax tree; extracting a connection class from theabstract syntax tree, and instantiating the connection class to obtain a connection class instance; and packaging the connection class instances and the abstract syntax tree into a client function. According to the method, the IDL file can be analyzed through the analysis function stack, and the analysis result is packaged into the client function, so that the compiling automation is realized, the labor cost is reduced, and the accuracy is improved.

Description

technical field [0001] Embodiments of the present invention relate to the technical field of computer software, and in particular to an IDL file-based parsing method, device, electronic equipment, and storage medium. Background technique [0002] Thrift is an open source communication framework for remote calls. It compiles information such as variable type declarations, data structure declarations, service definitions, and exception definitions defined in IDL (Interface Description Language, interface description files) through a built-in compiler. , to implement the calling logic. [0003] In the prior art, during the compilation process, the developer needs to pay attention to the path of the compiled file and manually import the compiled file; and according to the declaration of the method parameter type in the IDL file, convert the parameter to the correct parameter type to realize serialization and transmission. [0004] It can be seen that the prior art requires dev...

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/41G06F9/54
CPCG06F8/427G06F9/547
Inventor 陈泽庆
Owner BEIJING SANKUAI ONLINE TECH CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More