CN114610317A - Code conversion method, device, equipment and storage medium - Google Patents

Code conversion method, device, equipment and storage medium Download PDF

Info

Publication number
CN114610317A
CN114610317A CN202210262337.4A CN202210262337A CN114610317A CN 114610317 A CN114610317 A CN 114610317A CN 202210262337 A CN202210262337 A CN 202210262337A CN 114610317 A CN114610317 A CN 114610317A
Authority
CN
China
Prior art keywords
code
type
file
code file
conversion
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
CN202210262337.4A
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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202210262337.4A priority Critical patent/CN114610317A/en
Publication of CN114610317A publication Critical patent/CN114610317A/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
    • G06F8/42Syntactic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code

Abstract

The present disclosure relates to a transcoding method, the method comprising: reading a first code file, and carrying out syntactic analysis on the first code file to determine a syntactic type included in the first code file, wherein the first code file is written by a first programming language; and calling a target conversion code in a preset conversion code according to the grammar type included in the first code file to convert the first code file to obtain a second code file, wherein the second code file is written by a second programming language, the preset conversion code is used for converting the code written by the first programming language into the code written by the second programming language, and the second programming language is different from the first programming language.

Description

Code conversion method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method, an apparatus, a device, and a storage medium for transcoding.
Background
With the progress of internet technology, a framework mode for internet product development is endless. In the process of developing internet products, a back-end developer usually defines a data pattern and the like used by a front-end service according to an interface description provided by an application service, and the front-end developer acquires data by using query statements corresponding to the data pattern so as to display the data to a user.
In the related art, if a new requirement of an internet product occurs, an application service developer provides a new interface description according to the new requirement, and a back-end developer modifies or newly builds a data mode corresponding to the new interface description for a front-end service to use. Because the application service developer and the back-end developer usually use different programming languages, whenever the interface description of the application service is updated, the corresponding data mode in the back-end service needs to be modified synchronously, which wastes time and labor and has low development efficiency.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, the present disclosure provides a method of transcoding, the method comprising:
reading a first code file, and performing syntax analysis on the first code file to determine a syntax type included in the first code file, wherein the first code file is written by a first programming language;
and calling a target conversion code in a preset conversion code according to the grammar type included in the first code file to convert the first code file to obtain a second code file, wherein the second code file is written by a second programming language, the preset conversion code is used for converting the code written by the first programming language into the code written by the second programming language, and the second programming language is different from the first programming language.
In a second aspect, the present disclosure provides a transcoding apparatus, the apparatus comprising:
the reading module is used for reading a first code file, analyzing the grammar of the first code file and determining the grammar type included in the first code file, wherein the first code file is written by a first programming language;
the conversion module is used for calling a target conversion code in a preset conversion code according to the grammar type included in the first code file to convert the first code file to obtain a second code file, wherein the second code file is written by a second programming language, the preset conversion code is used for converting a code written by the first programming language into a code written by the second programming language, and the second programming language is different from the first programming language.
In a third aspect, the present disclosure provides an electronic device comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to implement the steps of the method of the first aspect.
In a fourth aspect, the present disclosure provides a non-transitory computer readable medium having stored thereon a computer program which, when executed by a processing apparatus, implements the steps of the method of the first aspect.
The present disclosure calls a target translation code in a preset translation code to automatically translate a first code file written in a first programming language according to a syntax type included in the first code file, thereby generating a second code file written in a second programming language. In the process, the code can be automatically converted without manual intervention, that is, by adopting the method disclosed by the invention, when the interface description of the application service is updated, the code can be automatically converted to generate a synchronized code file without manually synchronizing the updated content to the back-end service, so that the development efficiency is improved.
In addition, the code conversion method disclosed by the invention does not need manual intervention, and the styles of the generated code files are uniform, so that the development inconvenience caused by different code writing styles of different developers in the development process can be avoided.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale. In the drawings:
fig. 1 is a flowchart illustrating a transcoding method according to an exemplary embodiment of the present disclosure.
Fig. 2 is a flowchart illustrating an internet product development according to an exemplary embodiment of the present disclosure.
Fig. 3 is a flowchart illustrating an internet product development according to another exemplary embodiment of the present disclosure.
Fig. 4 is a flowchart illustrating a transcoding method according to another exemplary embodiment of the present disclosure.
Fig. 5 is a block diagram illustrating a transcoding apparatus according to an exemplary embodiment of the present disclosure.
Fig. 6 is a block diagram illustrating an electronic device according to an exemplary embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
All actions of acquiring signals, information or data in the present disclosure are performed under the premise of complying with the corresponding data protection regulation policy of the country of the location and obtaining the authorization given by the owner of the corresponding device.
In the related art, different technology types can be selected for different internet products to develop the products. For example, referring to fig. 2, fig. 2 is a flow chart illustrating an internet product development according to an exemplary embodiment of the present disclosure.
As shown in fig. 2, for a product related to front-end and back-end development, an application service developer may define an IDL (Interface Definition Language) through a thread to provide an Interface specification (i.e., thread IDL) used by the back-end. On this basis, a back-end developer can obtain data (data corresponding to the thread IDL) stored by the application service by performing thread RPC communication with the application service, and write a corresponding data pattern (GraphQL Schema) according to an interface description (thread IDL) provided by the application service, so as to be used by the front-end service. Based on this, the front-end developer can perform GraphQL HTTP communication with the back-end service, obtain back-end data (i.e., data corresponding to the thread IDL) corresponding to the GraphQL Schema, and display the data to the internet user.
Among them, thread is an interface description language and binary communication protocol, which is used to define and create cross-language services, and can be used as a Remote Procedure Call (RPC) framework. The application service is the bottom service for processing business logic, and an application service developer can define IDL through Thrift to provide interface description. Graph ql (graph Query language) is an open source Query language for API (Application Programming Interface). The back-end service is an API service responding to the front-end service request, and a back-end developer can define Schema through GraphQL to provide a data mode.
In the product development process, whenever a new demand occurs to an internet product, an application service developer will provide a new IDL according to the new demand, and accordingly, a backend developer will also modify or newly create a graph ql Schema corresponding to the new IDL. However, in the face of internet products with very rapid updating iteration, the manual format code synchronization method is time-consuming and labor-consuming, and the development efficiency is low.
In view of the above, the embodiments of the present disclosure provide a transcoding method to solve the problems in the related art.
Fig. 1 is a flowchart illustrating a transcoding method according to an exemplary embodiment of the present disclosure. Referring to fig. 1, the transcoding method may be applied to a terminal device, the method including:
step S101, reading the first code file, and performing syntax analysis on the first code file to determine a syntax type included in the first code file.
Wherein the first code file is written in a first programming language.
It should be noted that the first code file may be a thread file in application service development, where an interface description (thread IDL) for the backend service is defined in the thread file. The thread file is written in the thread language without any doubt.
In a particular implementation, the first code file may be entered manually. Or, in the case of monitoring whether the update exists in the swift IDL, if it is monitored that the update exists in the swift IDL, the updated file (i.e., the first code file) may be actively acquired.
For example, after reading the first code file, the first code file may be parsed in the following manner to determine the syntax type included in the first code file:
and determining an abstract syntax tree corresponding to the first code file, and determining the syntax type included by the first code file according to the syntax type represented by the nodes on the abstract syntax tree.
The Abstract Syntax Tree (AST) is an Abstract representation of the Syntax structure of the source code. It represents the syntactic structure of the programming language in the form of a tree, where each node on the tree represents a structure (i.e., syntactic type) in the source code.
It should be noted that the abstract syntax tree of the first code file may be determined by a syntax parser (e.g., antlr4, Another Tool for Language Recognition 4). On this basis, the syntax type characterized by the node on the abstract syntax tree can be determined by traversing the node on the abstract syntax tree, and the syntax type included in the first code file is determined.
Step S102, according to the grammar type included in the first code file, the target conversion code is called in the preset conversion code to convert the first code file, and the second code file is obtained.
Wherein the second code file is written by a second programming language, the preset conversion code is used for converting the code written by the first programming language into the code written by the second programming language, and the second programming language is different from the first programming language.
It should be noted that the second code file may be a GraphQL file in the development of the back-end service, where a data Schema (GraphQL Schema) available for the front-end service is defined. Undoubtedly, the GraphQL file is written in the GraphQL language. It should be further understood that the preset conversion code may be a code conversion rule established by analyzing syntax rules of the first and second programming languages for converting the code written by the first programming language into the code written by the second programming language. The pre-set translation code may also be different for different first and second programming languages.
Because, under different programming language frameworks, the code blocks corresponding to the same syntax type (usually, a plurality of code blocks are included in the code file) are usually in different expressions. Therefore, according to the grammar type included in the first code file, the expression form of the grammar type under different programming language frameworks can be determined, and therefore the corresponding target conversion code can be determined. It should be appreciated that after determining representations of all grammar types that the first code file may include in the first programming language and the second programming language framework, predetermined translation code may be determined that includes target translation code corresponding to each grammar type that the first code file may include.
For example, after determining the grammar type included in the first code file, the target translation code corresponding to the grammar type may be called in the preset translation code to translate the first code file to obtain the second code file.
The present disclosure calls a target translation code in a preset translation code to automatically translate a first code file written in a first programming language according to a syntax type included in the first code file, thereby generating a second code file written in a second programming language. In the process, the code can be automatically converted without manual intervention, that is, by adopting the method disclosed by the invention, when the interface description of the application service is updated, the code can be automatically converted to generate a synchronized code file without manually synchronizing the updated content to the back-end service, so that the development efficiency is improved.
In addition, the code conversion method disclosed by the invention does not need manual intervention, and the styles of the generated code files are uniform, so that the development inconvenience caused by different code writing styles of different developers in the development process can be avoided.
Referring to fig. 3, fig. 3 is a flowchart illustrating an internet product development according to another exemplary embodiment of the present disclosure. As shown in fig. 3, the transcoding method provided by the embodiment of the present disclosure may be applied to a development process of a back-end service, so as to automatically convert the thread IDL provided by the application service into a graph ql Schema for use by a front-end service.
In the related art, if a new requirement arises for an internet product, for example, a requirement for displaying user authentication information in a page browsed by a user, the new requirement may be implemented by the following steps:
step A: and the application service developer provides an inquiry interface of the user authentication data according to the new requirement, and updates the interface description of the inquiry interface to the Thrift IDL.
And B, step B: and the back-end developer generates a frame code according to the latest IDL, and writes a service code to obtain user authentication data.
And C: and the back-end developer modifies the GraphQL Schema corresponding to the page browsed by the user according to the latest IDL, or, under the condition that the GraphQL Schema corresponding to the page browsed by the user does not exist, newly establishes the GraphQL Schema so as to provide the corresponding field definition of the user authentication information.
Step D: and B, the back-end developer generates a frame code according to the latest Schema, writes a service code, and assembles the user authentication data acquired in the step B into authentication information for the front-end service to inquire and acquire the authentication information.
And E, step E: and the front-end developer writes a front-end code according to the latest Schema to acquire the authentication information and display the authentication information to the user.
On the basis of the steps, the code conversion method can simplify the step C, realize the automatic conversion of the Thrift IDL into the GraphQL Schema, and further improve the development efficiency. By adopting the method, the updated content is not required to be manually synchronized to the back-end service by a back-end developer when the interface description of the application service is updated, and the code can be automatically converted to generate a synchronized code file, so that the development efficiency is improved.
Optionally, according to a syntax type included in the first code file, invoking target translation code in preset translation code to translate the first code file includes:
when the grammar type included in the first code file is a structure body type or a service type, determining the grammar subtype included in the structure body type or the service type;
and when the structure type or the grammar subtype included by the service type is the data type, calling a data type conversion code in a preset conversion code to convert the first code file according to the data type.
It should be noted that the first code file includes various syntax types, such as a structure type (struct), a service type (service), a declaration type (typedef), and a header type (include). Typically, each grammar type corresponds to at least one grammar type name, and grammar types (e.g., structure types or service types) also include grammar subtypes and grammar subtype names. Wherein, the grammar subtype may be a data type, and the data type may include: dictionary type (i.e. map in Thrift), scalar type (i.e. scalar in Thrift), enumeration type (i.e. enum in Thrift), and list type (i.e. list, set in Thrift), etc. Grammar type names and grammar subtype names are typically custom-defined by developers on an as-needed basis.
For example, under the framework of the thread language, the code block a1 included in the first code file may be as follows:
Figure BDA0003550540280000091
the syntax type included in the code block is a structure type (i.e., struct), and the type name of the structure type is TrafficEnv. The structure type comprises grammar subtypes of: boolean type (boolean) and string type (string), the type names of the grammar subtypes being: open and Env. These syntax subtypes all belong to the scalar type (scalar).
Because the conversion rules of different data types under the two programming language frameworks are usually different, the corresponding data type conversion code can be determined according to the data type, and the data type conversion code (namely, the target conversion code) is called in the preset conversion code to convert the first code file. According to different data types, the data type conversion code may include: dictionary type conversion code, scalar type conversion code, enumerated type conversion code, and list type conversion code, among others.
Example one, when the data type is a dictionary type, the dictionary type conversion code is called in the preset conversion code to convert the first code file.
Wherein the dictionary type conversion code is used to convert dictionary type codes written by a first programming language into list type codes written by a second programming language.
Note that, in the GraphQL language, there is no dictionary type, and there is a list type. In general, a dictionary type includes a key-value pair < key, value > having a mapping relationship, a list type includes a list element < element > that can nest a structure type < key, value > containing two variables. Under the framework of the thread language, the structure type containing two variables can be shown as follows:
Figure BDA0003550540280000101
namely < element > < key, value >. Since key-value pairs in dictionary types and list elements in list types may be set to the same data type, e.g., a string type. Therefore, when the data type is a dictionary type, the dictionary type written by the Thrift language can be converted into a list type code written by the GraphQL language according to the dictionary type conversion code, wherein the list element of the list type nests a structure type containing two variables, and the data types of the two variables are the same as the data types of the key value pairs in the dictionary type.
For example, under the framework of the thread language, the code block B1 included in the first code file may be as follows:
struct Base{
1:optional map<string,string>Extra,
}
the grammar type included in the code block is a structure type (struct), and the grammar subtype included in the grammar type is a dictionary type (map) in the data type. Based on the piece of code, a grammar subtype may be determined to be a data type, and the data type is a dictionary type. On the basis, dictionary type conversion code can be called in preset conversion code to convert the code block B1 of the first code file, so as to obtain a code block B2 included in the second code file under the GraphQL language framework, where the code block B2 can be as follows:
Figure BDA0003550540280000111
in this process, the dictionary type code written in the Thrift language is converted into the list type code written in the GraphQL language based on the dictionary type conversion code. It should also be noted that there is a namespace (namespace) in the framework of the Thrift language, which, like the package in java, provides a way to organize (isolate) the code. That is, in the framework of the Thrift language, homonym structure types are allowed to exist in different namespaces. However, there is no namespace in the GraphQL language framework, nor is there allowed for homonym structure types. On the basis, in order to avoid naming conflict of the same name structure type after the first code file written by the Thrift language is converted into the second code file written by the GraphQL language, the structure type under the framework of the Thrift language can be renamed. As shown in the example above where code block B1 is converted to code block B2, the transcoding process for both the structure type and the dictionary type may involve structures that need to be renamed (structure type base, and structure types that nest to list elements during the conversion of the dictionary type to the list type).
Optionally, according to a syntax type included in the first code file, invoking a target translation code in a preset translation code to translate the first code file, further comprising:
and calling name conversion codes in the preset conversion codes to convert the first code file when the grammar type included in the first code file is a preset grammar type.
The name conversion code is used for reading a type name of a preset grammar type, adding a preset name to the type name and obtaining the type name after converting the code corresponding to the type name. The preset name may include a preset prefix name and/or a preset suffix name.
It is to be understood that the preset grammar types may include a structure type and a dictionary type. As shown in the above example i, in the case of converting the code block B1 into the code block B2, when the syntax type included in the first code file is determined to be the preset syntax type, name conversion codes may be called in the preset conversion codes to convert the first code file, so that a preset name is added based on the type names of the structure type and the dictionary type in the first code file, and a type name obtained by converting the type name is obtained. Wherein the preset suffix name may be determined according to a physical path of the first code file. For example "_ IN _ cpputil _ service _ rpc _ idl __ base" IN example one, the preset suffix name may be determined from the physical storage path "cpputil/service _ rpc _ idl/base. Specifically, replacing "/" in the physical storage path with "_" to obtain a replaced character string, and adding the replaced character string as a preset suffix name to the type name of the structure type in the first code file, so as to obtain the type name after the code corresponding to the type name is converted.
It should be noted that, in the process of transcoding the dictionary type, since the transformation of the dictionary type can be realized by nesting a structure type containing two variables in a list element of the list type, the process also involves renaming the structure type. In this case, in order to avoid a naming conflict of the structure type, a preset prefix name and a preset suffix name may be added to the structure type nested in the list element. For example, in the second code file of example one, the type name of the structure type nested into the list element is: "ThriftMap _ BY _ Extra _ OF _ Base _ IN _ cpputil _ service _ rpc _ idl __ Base", from which it can be seen that the preset prefix name is "ThriftMap _ BY _" and the preset suffix name is "_ OF _ Base _ IN _ cpputil _ service _ rpc _ idl __ Base". The preset suffix name can be determined according to a physical storage path of the first code file, and the preset prefix name is used for identifying that a structure type corresponding to the type name is obtained by converting a dictionary type (map) in the Thrift language. In a specific implementation, the preset prefix name and the preset suffix name are respectively added to the type name of the dictionary type in the first code file, so that the type name of the code corresponding to the type name after conversion can be obtained.
And example two, when the data type is a scalar type, calling scalar type conversion codes in preset conversion codes to convert the first code file.
The scalar type conversion code is used for converting the scalar type code written in the first programming language into the scalar type code written in the second programming language according to preset type mapping information.
It should be noted that under the framework of the thread language, the scalar type (scalar) may include data types such as boolean type (bool), byte type (byte), 16-bit integer (i16), 32-bit integer (i32), 64-bit integer (i64), and 64-bit floating point (double). Under the GraphQL language framework, scalar types may include data types such as Boolean type (Boolean), Byte type (Byte), 16-bit integer (Int16), 32-bit integer (Int), 64-bit integer (Int64), and 64-bit floating point type (Float), and scalar type (scalar) may also be a custom type that may be parsed into 32-bit integers according to the needs of developers. On this basis, scalar type translation code may include code blocks as shown below:
Figure BDA0003550540280000131
wherein the preset type mapping information is characterized in the code block. Using this piece of code for transcoding, it is possible to map "i 64" in the Thrift language to "Int 64" in the GraphQL language. And in the same way, the scalar type conversion code is called in the preset conversion code to convert the first code file, and the scalar type code written by the first programming language can be converted into the scalar type code written by the second programming language.
For example, by calling scalar type conversion code to convert the code block a1 included in the first code file, the code block a2 included in the second code file under the GraphQL language framework can be obtained, and the code block a2 is as follows:
Figure BDA0003550540280000141
and in the third example, when the data type is an enumeration type, invoking an enumeration type conversion code in the preset conversion code to convert the first code file.
Wherein the enumeration type conversion code is used for converting the enumeration type code written by the first programming language into a preset scalar type code written by the second programming language.
It should be noted that, under the framework of the thread language, the enumerated types are essentially 32-bit integer types. Whereas under the GraphQL language framework, an enumerated type is essentially a string type. Therefore, when the data type is an enumeration type, the enumeration type code in the first code file can be converted into a preset scalar type code. Wherein the preset scalar type code may be a 32-bit integer (i.e., int in GraphQL). In a particular implementation, an enumerated type code written in a first programming language may be converted to a scalar type (scalar) written in a second programming language, and the scalar type may be parsed in 32-bit integers.
It is understood that the data types also include list types, character string types, and other data types, and the meaning of the data types under the framework of the Thrift language and the framework of the GraphQL language is basically consistent. On the basis, when the data type is other data types such as a list type, the code format in the first code file can be modified according to the code format of the GraphQL language, and then the converted second code file can be obtained.
Optionally, according to a syntax type included in the first code file, invoking a target translation code in a preset translation code to translate the first code file, further comprising:
and when the grammar type included in the first code file is a declaration type, calling alias conversion codes in preset conversion codes to convert the first code file.
Wherein the alias translation code is to:
determining a grammar subtype included in the declaration type and a type alias of the grammar subtype;
finding a target grammar type matched with the type alias from the first code file, and modifying the target grammar type into a grammar subtype;
and calling the data type conversion code in the preset conversion code to convert the first code file according to the data type of the grammar subtype.
It should be noted that the declaration type (typedef) is used to define a simple alias for a complex declaration, and after defining an alias, the alias definition variable may be employed.
For example, under the framework of the thread language, the code block C1 included in the first code file may be as follows:
typedef string JsonDict
JsonDict verify_result
wherein, the first line of the code block includes a syntax type of declaration type (typedef), the syntax subtype of declaration type includes a string type (string), and the type alias of the string type is json dit, that is, json dit is equivalent to the string type. The second line of the code block includes a syntax type of jsondit, and the type name of the syntax type is verify _ result. This code block defines the type alias jsondit for the string type and defines the variable verify _ result with the jsondit.
It should be understood that JsonDict has no corresponding meaning in the GraphQL language (i.e., JsonDict cannot be equated with a string type in the GraphQL language). Therefore, when the grammar type included in the first code file is a declaration type, alias conversion codes can be called in the preset conversion codes to convert the first code file, so that a target grammar type (JsonDict) matched with the type alias (JsonDict) can be found in the first code file, the target grammar type is modified into a grammar subtype (string), and data type conversion codes are called in the preset conversion codes to convert the first code file according to the data type of the grammar subtype. Wherein, according to the data type conversion code, the character String type (String) written by the Thrift language can be converted into the character String type (String) written by the GraphQL language. Thus, after the code block C1 included in the first code file is converted, the code block C2 included in the second code file under the GraphQL language framework can be obtained, and the code block C2 is as follows:
verify_result:String
optionally, according to a syntax type included in the first code file, invoking a target translation code in a preset translation code to translate the first code file, further comprising:
and when the grammar type included in the first code file is the header file type, calling a header file conversion code in a preset conversion code to convert the first code file.
The method comprises the steps of reading a target code file associated with a head file type by a head file conversion code, taking the target code file as a first code file, returning to execute the step of performing syntax analysis on the first code file to determine a syntax type included in the first code file, and calling the target conversion code in a preset conversion code to convert the first code file according to the syntax type included in the first code file to obtain a second code file.
It should be noted that a header file type (include) is used to embed a specified header file in a source file. That is, the header file type is associated with another thread file (i.e., object code file) embedded in the first code file, and the data in the thread file can be used by the first code file. On the basis, the target code file associated with the header file type can be used as the first code file, and the step of converting the first code file is returned to be executed, so that the target code file can be converted to obtain the second code file.
It is understood that the syntax type also includes comment type (comment), etc., and the meanings of these syntax types under the framework of the Thrift language and the framework of the GraphQL language are substantially identical. On the basis, when the grammar type is other grammar types such as a comment type, the code format in the first code file can be modified according to the code format of the GraphQL language, and then the converted second code file can be obtained.
Alternatively, the first programming language may be a thread language and the second programming language may be a GraphQL language.
It should be noted that, since the framework of the thread language allows the existence of the files with the same name, the framework of the GraphQL language does not allow the files with the same name. Therefore, in the process of converting the first code file written by the first programming language into the second code file written by the second programming language, the second code file can also be renamed so as to avoid the naming conflict of the files with the same name. The renaming method can refer to the renaming process of the structure type, namely, taking the physical storage path where the first code file is located as a preset suffix name, and adding the preset suffix name into the file name of the first code file. Of course, other renaming approaches may be taken to avoid naming conflicts, and the present disclosure is not limited in this regard.
The present disclosure calls a target translation code in a preset translation code to automatically translate a first code file written in a first programming language according to a syntax type included in the first code file, thereby generating a second code file written in a second programming language. In the process, the codes can be automatically converted without manual intervention, that is, by adopting the method disclosed by the invention, when the interface description of the application service is updated, the codes can be automatically converted to generate a synchronized code file without manually synchronizing the updated content to the back-end service, so that the development efficiency is improved.
In addition, the code conversion method disclosed by the invention does not need manual intervention, and the styles of the generated code files are uniform, so that the development inconvenience caused by different code writing styles of different developers in the development process can be avoided.
Referring to fig. 4, fig. 4 is a flowchart illustrating a transcoding method according to another exemplary embodiment of the present disclosure. As shown in fig. 4, in the transcoding method provided by the embodiment of the present disclosure, a thread file input by a user is received, the thread file is read, and a file name of the thread is recorded (stored in a memory space). Then, the syntax analysis is performed on the thread file by using an antlr (other Tool for Language recognition), the syntax type included in the thread file is determined, and different transcoding processes are performed according to the syntax type. And after the code corresponding to the grammar type included by the Thrift is converted, writing the converted code into the GraphQL Schema to obtain a GraphQL file after code conversion.
Wherein, the syntax analysis is performed on the Thrift file by using the antlr, so as to obtain an abstract syntax tree of the Thrift file, and each node on the abstract syntax tree represents a structure (i.e. syntax type) in the source code. When the syntax type included in the thread file is a structure type (struct) or a service type (service), the type name (field _ name) of the syntax subtype and a syntax subtype included in the structure type or the service type may be determined by reading information on the function node (func) and the field node (field). Grammar subtypes may include list type (list/set), dictionary type (map), scalar type (scalar), enumeration type (enum), and declaration type (typedef), among others. And calling a target conversion code corresponding to the grammar subtype from the preset conversion codes according to different grammar subtypes to convert the Thrift file to obtain the GraphQL file. When the grammar type included in the thread file is an enumeration type, recording the type name of the enumeration type (storing the type name into a memory space), and performing corresponding code conversion. When the syntax type included in the thread is the declaration type, recording a type alias (stored in the memory space) defined by the declaration type, and performing corresponding code conversion. And when the grammar type included by the thread is a header file type (include), reading an object code file (header file) associated with the header file type, returning to read the object code file, and transcoding the object code file. In addition, when the syntax type included in the thread file is the comment type, adjusting the code corresponding to the comment type according to the comment format of the GraphQL, and obtaining the converted comment code. In the process of converting the Thrift file, uniformly renaming the structure bodies possibly having naming conflict, and renaming the Thrift file to finally obtain the GraphQL file after code conversion.
The specific embodiments of the above steps have been exemplified in detail above, and are not described again here. It is also to be understood that while for simplicity of description, the above-described method embodiments are described as a series of acts or combinations of acts, those skilled in the art will recognize that the above-described embodiments are preferred embodiments and that the steps involved are not necessarily essential to the disclosure.
The present disclosure calls a target translation code in a preset translation code to automatically translate a first code file written in a first programming language according to a syntax type included in the first code file, thereby generating a second code file written in a second programming language. In the process, the code can be automatically converted without manual intervention, that is, by adopting the method disclosed by the invention, when the interface description of the application service is updated, the code can be automatically converted to generate a synchronized code file without manually synchronizing the updated content to the back-end service, so that the development efficiency is improved.
In addition, the code conversion method disclosed by the invention does not need manual intervention, and the styles of the generated code files are uniform, so that the development inconvenience caused by different code writing styles of different developers in the development process can be avoided.
Based on the same concept, the embodiment of the present disclosure also provides a transcoding device, which may become part or all of an electronic device through software, hardware or a combination of both. Fig. 5 is a block diagram illustrating a transcoding apparatus according to an exemplary embodiment of the present disclosure. Referring to fig. 5, the transcoding apparatus 200 may include:
the reading module 201 is configured to read a first code file, perform syntax analysis on the first code file, and determine a syntax type included in the first code file, where the first code file is written in a first programming language;
the conversion module 202 is configured to invoke a target conversion code in a preset conversion code according to a syntax type included in the first code file to convert the first code file to obtain a second code file, where the second code file is written in a second programming language, the preset conversion code is used to convert a code written in the first programming language into a code written in the second programming language, and the second programming language is different from the first programming language.
The present disclosure calls a target translation code in a preset translation code to automatically translate a first code file written in a first programming language according to a syntax type included in the first code file, thereby generating a second code file written in a second programming language. In the process, the code can be automatically converted without manual intervention, that is, by adopting the device disclosed by the invention, when the interface description of the application service is updated, the code can be automatically converted to generate a synchronized code file without manually synchronizing the updated content to the back-end service, so that the development efficiency is improved.
In addition, the code conversion device disclosed by the invention does not need manual intervention, and the styles of the generated code files are uniform, so that the development inconvenience caused by different code writing styles of different developers in the development process can be avoided.
Optionally, the conversion module 202 is further configured to:
when the grammar type included in the first code file is a structure body type or a service type, determining the grammar subtype included in the structure body type or the service type;
and when the grammar subtype included by the structure type or the service type is the data type, calling a data type conversion code in a preset conversion code to convert the first code file according to the data type.
Optionally, the conversion module 202 is further configured to:
when the data type is a dictionary type, dictionary type conversion codes for converting dictionary type codes written in a first programming language into list type codes written in a second programming language are called in preset conversion codes to convert the first code file.
Optionally, the conversion module 202 is further configured to:
and when the data type is a scalar type, calling scalar type conversion codes in preset conversion codes to convert the first code file, wherein the scalar type conversion codes are used for converting the scalar type codes written in the first programming language into the scalar type codes written in the second programming language according to preset type mapping information.
Optionally, the conversion module 202 is further configured to:
when the data type is an enumeration type, invoking an enumeration type conversion code in a preset conversion code to convert the first code file, wherein the enumeration type conversion code is used for converting the enumeration type code written by the first programming language into a preset scalar type code written by the second programming language.
Optionally, the conversion module 202 is further configured to:
when the grammar type included in the first code file is a statement type, calling an alias conversion code in a preset conversion code to convert the first code file;
wherein the alias translation code is to:
determining a grammar subtype included in the declaration type and a type alias of the grammar subtype;
finding a target grammar type matched with the type alias from the first code file, and modifying the target grammar type into a grammar subtype;
and calling the data type conversion code in the preset conversion code to convert the first code file according to the data type of the grammar subtype.
Optionally, the conversion module 202 is further configured to:
and when the grammar type included in the first code file is the preset grammar type, calling a name conversion code in the preset conversion code to convert the first code file, wherein the name conversion code is used for reading the type name of the preset grammar type and adding the preset name to the type name to obtain the type name after converting the code corresponding to the type name.
Optionally, the conversion module 202 is further configured to:
when the grammar type included in the first code file is a header file type, a header file conversion code is called in a preset conversion code to convert the first code file, the header file conversion code is used for reading a target code file associated with the header file type, the target code file is used as the first code file, the step of performing grammar analysis on the first code file to determine the grammar type included in the first code file is returned, and the step of calling the target conversion code in the preset conversion code to convert the first code file according to the grammar type included in the first code file to obtain the second code file.
Optionally, the first programming language is a thread language, and the second programming language is a GraphQL language.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Based on the same concept, the present disclosure also provides a non-transitory computer-readable medium having stored thereon a computer program that, when executed by a processing device, implements the steps of the above transcoding method.
Based on the same concept, an embodiment of the present disclosure further provides an electronic device, including:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to implement the steps of the above transcoding method.
Referring now to FIG. 6, a block diagram of an electronic device 300 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the electronic device 300 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 301 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)302 or a program loaded from a storage means 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data necessary for the operation of the electronic apparatus 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device 300 to communicate wirelessly or by wire with other devices to exchange data. While fig. 6 illustrates an electronic device 300 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 309, or installed from the storage means 308, or installed from the ROM 302. The computer program, when executed by the processing device 301, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. 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 of the computer readable storage medium may include, but are not limited to: 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 present disclosure, 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. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either 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. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the communication may be performed using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: reading a first code file, and performing syntax analysis on the first code file to determine a syntax type included in the first code file, wherein the first code file is written by a first programming language; and calling a target conversion code in a preset conversion code according to the grammar type included in the first code file to convert the first code file to obtain a second code file, wherein the second code file is written by a second programming language, the preset conversion code is used for converting the code written by the first programming language into the code written by the second programming language, and the second programming language is different from the first programming language.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program 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).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. Wherein the name of a module in some cases does not constitute a limitation on the module itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims (12)

1. A method of transcoding, the method comprising:
reading a first code file, and performing syntax analysis on the first code file to determine a syntax type included in the first code file, wherein the first code file is written by a first programming language;
and calling a target conversion code in a preset conversion code according to the grammar type included in the first code file to convert the first code file to obtain a second code file, wherein the second code file is written by a second programming language, the preset conversion code is used for converting the code written by the first programming language into the code written by the second programming language, and the second programming language is different from the first programming language.
2. The method of claim 1, wherein the invoking target translation code in preset translation code to translate the first code file according to the syntax type included in the first code file comprises:
when the grammar type included in the first code file is a structure body type or a service type, determining a grammar subtype included in the structure body type or the service type;
and when the syntax subtype included by the structure type or the service type is a data type, calling a data type conversion code in a preset conversion code to convert the first code file according to the data type.
3. The method of claim 2, wherein said invoking data type conversion code in preset conversion code to convert said first code file according to said data type comprises:
and when the data type is a dictionary type, calling a dictionary type conversion code in a preset conversion code to convert the first code file, wherein the dictionary type conversion code is used for converting the dictionary type code written by the first programming language into a list type code written by the second programming language.
4. The method of claim 2, wherein said invoking data type conversion code in preset conversion code to convert said first code file according to said data type comprises:
and when the data type is a scalar type, calling a scalar type conversion code in a preset conversion code to convert the first code file, wherein the scalar type conversion code is used for converting the scalar type code written in the first programming language into a scalar type code written in the second programming language according to preset type mapping information.
5. The method of claim 2, wherein said invoking data type conversion code in preset conversion code to convert said first code file according to said data type comprises:
when the data type is an enumeration type, invoking an enumeration type conversion code in a preset conversion code to convert the first code file, wherein the enumeration type conversion code is used for converting the enumeration type code written by the first programming language into a preset scalar type code written by the second programming language.
6. The method according to any one of claims 1 to 5, wherein the step of calling target translation code in preset translation code to translate the first code file according to the syntax type included in the first code file comprises:
when the grammar type included in the first code file is a statement type, calling an alias conversion code in a preset conversion code to convert the first code file;
wherein the alias translation code is to:
determining a grammar subtype included in the declaration type and a type alias for the grammar subtype;
finding a target grammar type matched with the type alias from the first code file, and modifying the target grammar type into the grammar subtype;
and calling a data type conversion code in a preset conversion code to convert the first code file according to the data type of the grammar subtype.
7. The method according to any one of claims 1 to 5, wherein the invoking target conversion code in preset conversion code according to the syntax type included in the first code file to convert the first code file comprises:
and when the grammar type included in the first code file is a preset grammar type, calling a name conversion code in a preset conversion code to convert the first code file, wherein the name conversion code is used for reading the type name of the preset grammar type and adding the preset name to the type name to obtain the type name after converting the code corresponding to the type name.
8. The method according to any one of claims 1 to 5, wherein the step of calling target translation code in preset translation code to translate the first code file according to the syntax type included in the first code file comprises:
when the grammar type included in the first code file is a header file type, a header file conversion code is called in a preset conversion code to convert the first code file, the header file conversion code is used for reading a target code file associated with the header file type, the target code file is used as the first code file, the step of determining the grammar type included in the first code file by performing grammar analysis on the first code file is returned to be executed, and the step of converting the first code file by calling the target conversion code in the preset conversion code according to the grammar type included in the first code file to obtain a second code file is also returned to be executed.
9. The method according to any one of claims 1-5, wherein the first programming language is a Thrift language and the second programming language is a GraphQL language.
10. A transcoding apparatus, comprising:
the reading module is used for reading a first code file, analyzing the grammar of the first code file and determining the grammar type included in the first code file, wherein the first code file is written by a first programming language;
the conversion module is used for calling a target conversion code in a preset conversion code according to the grammar type included in the first code file to convert the first code file to obtain a second code file, wherein the second code file is written by a second programming language, the preset conversion code is used for converting a code written by the first programming language into a code written by the second programming language, and the second programming language is different from the first programming language.
11. An electronic device, comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to carry out the steps of the method according to any one of claims 1 to 9.
12. A non-transitory computer readable medium, on which a computer program is stored, characterized in that the program, when executed by a processing device, implements the steps of the method of any one of claims 1-9.
CN202210262337.4A 2022-03-16 2022-03-16 Code conversion method, device, equipment and storage medium Pending CN114610317A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210262337.4A CN114610317A (en) 2022-03-16 2022-03-16 Code conversion method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210262337.4A CN114610317A (en) 2022-03-16 2022-03-16 Code conversion method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114610317A true CN114610317A (en) 2022-06-10

Family

ID=81863183

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210262337.4A Pending CN114610317A (en) 2022-03-16 2022-03-16 Code conversion method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114610317A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116346913A (en) * 2023-02-16 2023-06-27 南京时祺科技有限公司 Block chain network method capable of dividing regions based on big data information
CN117172214A (en) * 2023-11-02 2023-12-05 企查查科技股份有限公司 API file conversion method, system and computer storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116346913A (en) * 2023-02-16 2023-06-27 南京时祺科技有限公司 Block chain network method capable of dividing regions based on big data information
CN117172214A (en) * 2023-11-02 2023-12-05 企查查科技股份有限公司 API file conversion method, system and computer storage medium

Similar Documents

Publication Publication Date Title
CN114610317A (en) Code conversion method, device, equipment and storage medium
CN111290760B (en) Application program compiling method and device, electronic equipment and storage medium
CN111930534A (en) Data calling method and device and electronic equipment
CN110764748B (en) Code calling method, device, terminal and storage medium
CN111324342B (en) Method, device, medium and electronic equipment for generating interface layer code
WO2022105563A1 (en) Indexed file generation method, terminal device, electronic device, and medium
CN112214408A (en) Dependency conflict detection method and device, electronic equipment and computer readable medium
CN111338944B (en) Remote Procedure Call (RPC) interface testing method, device, medium and equipment
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN110960855A (en) Communication protocol code updating method and device, electronic equipment and storage medium
CN113407165B (en) SDK generation and self-upgrade method, device, readable medium and equipment
CN112416303B (en) Software development kit hot repair method and device and electronic equipment
CN113220281A (en) Information generation method and device, terminal equipment and storage medium
CN110704050B (en) Module initializing method and device, electronic equipment and computer readable storage medium
CN111752644A (en) Interface simulation method, device, equipment and storage medium
CN116860286A (en) Page dynamic update method, device, electronic equipment and computer readable medium
CN116226189A (en) Cache data query method, device, electronic equipment and computer readable medium
CN111324336B (en) Method, device, terminal and storage medium for implementing dependency injection
CN112230986A (en) Project file generation method and device, electronic equipment and computer readable medium
CN111240657A (en) Method and device for generating SDK and electronic equipment
CN111797009A (en) Method and device for detecting code compatibility and electronic equipment
CN111414161A (en) Method, device, medium and electronic equipment for generating ID L file
CN112445820A (en) Data conversion method and device
CN111221513B (en) Method, device, medium and electronic equipment for adjusting cascading style sheet
CN111625232B (en) Method and device for generating application program installation package, readable medium and electronic equipment

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