Methods and apparatus for automatically generating code

By automatically generating code, the header files of the target business are parsed using mapping relationships to generate interface specifications, sub-services, or adaptation code. This solves the problem of low efficiency in manual code development and achieves efficient code generation and quality assurance.

CN119829045BActive Publication Date: 2025-10-28ZHEJIANG DAHUA TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411838947.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-10-28
Estimated Expiration
2044-12-12

AI Technical Summary

Technical Problem

In existing interconnected systems, the development of device access services requires manual code development, which leads to low efficiency, especially when business evolves rapidly and access needs increase, consuming a lot of manpower and failing to guarantee quality.

Method used

By obtaining the header file of the target business and using the preset mapping relationship, the interface specification code, sub-service code or adaptation code is automatically generated. This includes generating the target code based on the mapping relationship between the data type and data exchange format of the header file, the mapping relationship between the structure information and the sub-service information, and the correspondence between the interface and the function.

Benefits of technology

It improved code development efficiency, reduced the consumption of human resources, ensured code quality, and adapted to the needs of rapidly changing business.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829045B_ABST
    Figure CN119829045B_ABST
Patent Text Reader

Abstract

This invention provides a method and apparatus for automatically generating code, comprising: obtaining a first header file of a target business; and generating target code through a preset mapping relationship and the first header file, wherein the target code includes: interface specification code, sub-service code, or adaptation code. This invention solves the problem of low efficiency in manual code development, thereby improving the efficiency of code development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network software service generation technology, and more specifically, to a method and apparatus for automatically generating code. Background Technology

[0002] With the rapid development of the Internet, the Internet of Things (IoT), and the Industrial Internet of Things (IIoT), interconnection between systems, between systems and devices, and between devices is inevitable. In existing interconnection systems, the development of device access services mostly requires manual code development, which is not conducive to subsequent maintenance. Especially in scenarios where business evolves rapidly and access needs increase significantly, it requires a large amount of manpower, resulting in low work efficiency and unreliable quality.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This invention provides a method and apparatus for automatically generating code, thereby at least solving the problem of low efficiency in manually developing code in related technologies.

[0005] According to an embodiment of the present invention, a method for automatically generating code is provided, comprising: obtaining a first header file of a target service; generating target code through a preset mapping relationship and the first header file, wherein the target code includes: interface specification code, sub-service code, or adaptation code.

[0006] In an exemplary embodiment, generating target code using a preset mapping relationship and the first header file includes: generating the interface specification code based on the first mapping relationship and the first header file; or, generating the sub-service code based on the second mapping relationship and the first header file; or, generating the adaptation code for the first header file and the second header file based on the third mapping relationship, the first header file, and the second header file; wherein the preset mapping relationship includes: the first mapping relationship, the second mapping relationship, and the third mapping relationship.

[0007] In an exemplary embodiment, generating corresponding interface specification code based on a first mapping relationship and a first header file includes: generating the interface specification code based on a mapping relationship between the data type of the first header file and the field types of the data exchange format, wherein the first mapping relationship records the mapping relationship between the data type of the code used in the first header file and the field types of the data exchange format.

[0008] In an exemplary embodiment, generating sub-service code based on a second mapping relationship and a first header file includes: parsing the first header file to generate intermediate representation structure information; and generating the sub-service code based on the mapping relationship between each structure information and each sub-service information in the intermediate representation structure information, wherein the second mapping relationship records the mapping relationship between the structure information and the sub-service information.

[0009] In an exemplary embodiment, generating adaptation code for the first header file and the second header file based on the third mapping relationship, the first header file, and the second header file includes: generating the adaptation code based on the correspondence between each interface in the first header file and each function in the second header file.

[0010] In an exemplary embodiment, generating the adaptation code based on the correspondence between each interface in the first header file and each function in the second header file includes: mapping the parameters of each function in the second header file to the corresponding input and output parameters of the corresponding interface in the first header file based on the number of interfaces in the first header file and the number of functions in the second header file.

[0011] According to another embodiment of the present invention, an apparatus for automatically generating code is provided, comprising: an acquisition module for acquiring a first header file of a target service; and a generation module for generating target code through a preset mapping relationship and the first header file, wherein the target code includes: interface specification code, sub-service code, or adaptation code.

[0012] According to yet another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program, when executed by a processor, implements the steps of the method described in any of the preceding claims.

[0013] According to yet another embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0014] According to yet another embodiment of the present invention, a computer program product is also provided, comprising a computer program that, when executed by a processor, implements the steps of the method described in any of the preceding claims.

[0015] This invention obtains the first header file of the target business; and generates target code based on a preset mapping relationship and the first header file. The target code includes interface specification code, sub-service code, or adaptation code. This achieves the goal of automatically generating code. Therefore, it solves the problem of low efficiency in manual code development and improves the efficiency of code development. Attached Figure Description

[0016] Figure 1 This is a hardware structure block diagram of a mobile terminal for an automatic code generation method according to an embodiment of the present invention.

[0017] Figure 2 This is a flowchart of a method for automatically generating code according to an embodiment of the present invention;

[0018] Figure 3 This is a schematic diagram of the header file mapping relationship according to an embodiment of the present invention. Figure 1 ;

[0019] Figure 4 This is a schematic diagram of the header file mapping relationship according to an embodiment of the present invention. Figure 2 ;

[0020] Figure 5 This is a schematic diagram of the header file mapping relationship according to an embodiment of the present invention. Figure 3 ;

[0021] Figure 6 This is a schematic diagram of secondary packaging development according to an embodiment of the present invention;

[0022] Figure 7 This is a general flowchart of a method for automatically generating code according to an embodiment of the present invention;

[0023] Figure 8 This is a structural block diagram of an apparatus for automatically generating code according to an embodiment of the present invention; Detailed Implementation

[0024] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples.

[0025] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0026] The embodiments of the automatically generated code method provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for an automatic code generation method according to an embodiment of the present invention. Figure 1As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0027] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the automatic code generation method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, thereby implementing the aforementioned method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0028] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0029] This embodiment provides a method for automatically generating code that runs on the aforementioned mobile terminal or network architecture. Figure 2 This is a flowchart of a method for automatically generating code according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:

[0030] Step S202: Obtain the first header file of the target business;

[0031] The first header file mentioned above is a C++ file formed by structurally parsing the header files of the target business implementation based on its own code architecture style and C++ syntax. It forms a custom header file intermediate expression structure data, which is responsible for component namespaces, interface commands, interface input and output parameters, interface parameter data structure information, etc.

[0032] Step S204: Generate target code using a preset mapping relationship and the first header file, wherein the target code includes: interface specification code, sub-service code, or adaptation code.

[0033] The above mapping relationships include a first mapping relationship, a second mapping relationship, and a third mapping relationship. The above target code includes interface specification code, sub-service code, or adaptation code. The first and second mapping relationships are combined with the first header file to generate interface specification code and sub-service code, respectively. The third mapping relationship is combined with the first header file or a third-party header file to generate adaptation code.

[0034] Specifically, generating target code through a preset mapping relationship and the first header file includes: generating the interface specification code based on the first mapping relationship and the first header file; or, generating the sub-service code based on the second mapping relationship and the first header file; or, generating the adaptation code for the first header file and the second header file based on the third mapping relationship, the first header file, and the second header file; wherein the preset mapping relationship includes: the first mapping relationship, the second mapping relationship, and the third mapping relationship.

[0035] As an optional implementation, generating corresponding interface specification code based on the first mapping relationship and the first header file includes: generating the interface specification code based on the mapping relationship between the data type of the first header file and the field type of the data exchange format, wherein the first mapping relationship records the mapping relationship between the data type of the code used in the first header file and the field type of the data exchange format.

[0036] The aforementioned first mapping relationship records the mapping between the C / C++ data types in the first header file and the corresponding JSON field types in the service application programming interface (API). This first mapping relationship and the first header file generate the aforementioned interface specification code. This interface specification code is a series of specifications and conventions followed when defining interfaces in programming, including interface naming conventions, interface method naming conventions, interface parameter conventions, and interface return value conventions.

[0037] As an optional implementation, generating sub-service code based on the second mapping relationship and the first header file includes: parsing the first header file to generate intermediate expression structure information; and generating the sub-service code based on the mapping relationship between each structure information and each sub-service information in the intermediate expression structure information, wherein the second mapping relationship records the mapping relationship between the structure information and the sub-service information.

[0038] The intermediate expression structure information mentioned above includes macro definitions, naming conventions, component names, parameter descriptions, and interface definitions. The sub-service code described above is for ease of management and maintenance, dividing the system into multiple independent service units, each responsible for handling specific functions or business logic. These independent service units are referred to as the sub-services mentioned above.

[0039] The second mapping relationship described above records the mapping relationship between each structural information in the intermediate expression structure information and each sub-service information. The second mapping relationship includes the following:

[0040] Mapping method definition 1: Component name in header file => Sub-service name;

[0041] Mapping method definition 2: Component name.interface name => sub-service API interface name in the header file (to avoid service conflicts);

[0042] Mapping method definition 3: In the header file, append Asyn to the name of the asynchronous interface => sub-service API interface;

[0043] Mapping method definition 4: Subscribe to callback interface name in the header file => Sub-service API interface name + notify;

[0044] Mapping method definition 5: In API requests, the method is always used to identify the interface service; params is used to identify the parameter service; object is used to identify the business object address; id is used to identify the request identifier; and session is used to identify the session identifier.

[0045] Mapping method definition 6: The API request always uses "result" to identify the response result, and everything else remains the same as the request;

[0046] Based on the second mapping relationship and the first header file mentioned above, the sub-service code is generated according to the following steps.

[0047] Step 1: Generate the corresponding sub-service registration slot based on the RPC communication framework.

[0048] Step 2: Input the structured data of the C++ business interface into the sub-service generator, and generate the corresponding service API according to the generation mapping.

[0049] Step 3: Based on the C++ business interface and the corresponding generation method, input the data into the sub-service generator and service slot generator to generate the sub-services and service slots.

[0050] Step 4: For multiple sub-services, perform round-robin calls to generate sub-services respectively, forming a set of sub-services.

[0051] As an optional implementation, generating adaptation code for the first header file and the second header file based on the third mapping relationship, the first header file, and the second header file includes: generating the adaptation code based on the correspondence between each interface in the first header file and each function in the second header file.

[0052] Specifically, the correspondence between each interface and each function in the second header file, and the generation of the adaptation code, includes: mapping the parameters of each function in the second header file to the corresponding input and output parameters of the corresponding interface in the first header file according to the number of interfaces in the first header file and the number of functions in the second header file.

[0053] The second header file mentioned above is the documentation from a third-party company (other than our company) that implements the business logic. The adapter code mentioned above is used to connect our company's software system with the third-party company's software system. This adapter code is typically used to resolve interface incompatibility or data format discrepancies between different systems, ensuring they can communicate and interact correctly.

[0054] The above third mapping relationship includes the following three contents:

[0055] Figure 3 This is a schematic diagram of the header file mapping relationship according to an embodiment of the present invention. Figure 1 ,like Figure 3 As shown, header file A is the first header file mentioned above, and header file B is the second header file mentioned above. The number of functions in the second header file is the same as the number of interfaces in the first header file. Therefore, the parameters in the functions of the second header file are mapped one by one to the input / output parameters in the first header file. Figure 3 For example, parameter 1 in the second header file is mapped to input / output parameter A1 in the first header file, parameter 2 in the second header file is mapped to input / output parameter A2 in the first header file, and parameter 3 in the second header file is mapped to output parameter A3 in the first header file.

[0056] Figure 4 This is a schematic diagram of the header file service mapping relationship according to an embodiment of the present invention. Figure 2 ,like Figure 4As shown, header file A is the first header file mentioned above, and header file B is the second header file mentioned above. Since the number of interfaces in the first header file is greater than the number of functions in the second header file, the parameters in the functions of the second header file will be mapped to the input / output parameters of multiple interfaces in the first header file. Figure 4 For example, parameter 1 in the second header file is mapped to the input / output parameter A1 of interface 1 in the first header file, parameter 2 in the second header file is mapped to the input / output parameter B1 of interface 2 in the first header file, parameter 3 in the second header file is mapped to the input / output parameter B2 of interface 2 in the first header file, parameter 4 in the second header file is mapped to the input / output parameter A2 of interface 1 in the first header file, parameter 5 in the second header file is mapped to the output parameter A3 of interface 1 in the first header file, and parameter 6 in the second header file is mapped to the output parameter B3 of interface 2 in the first header file.

[0057] Figure 5 This is a schematic diagram of the header file mapping relationship according to an embodiment of the present invention. Figure 3 ,like Figure 5 As shown, header file A is the first header file mentioned above, and header file B is the second header file mentioned above. The number of interfaces in the first header file is less than the number of functions in the second header file. Therefore, the parameters of multiple functions in the second header file are mapped to the interfaces in the first header file respectively. Figure 5 For example, parameter 1 of function 1 in the second header file is mapped to the input / output parameter A1 of interface 1 in the first header file; parameter 2 of function 1 in the second header file is mapped to the output parameter A3 of interface 1 in the first header file; parameter 3 of function 1 in the second header file is mapped to the input / output parameter B2 of interface 1 in the first header file; parameter 1 of function 2 in the second header file is mapped to the input / output parameter A2 of interface 1 in the first header file; parameter 2 of function 2 in the second header file is mapped to the output parameter B3 of interface 1 in the first header file; and parameter 3 of function 2 in the second header file is mapped to the input / output parameter B1 of interface 1 in the first header file.

[0058] As an optional implementation method, Figure 6 This is a schematic diagram of secondary encapsulation development according to an embodiment of the present invention. Each business service has a custom C / C++ header file. In scenarios involving interoperability between systems, a third party provides the required C / C++ header file format. One party needs to provide a system access SDK to perform secondary encapsulation development according to the service access header file format of the other party. By using the header files between the two system services to define the header file method, rapid development and integration of each sub-service can be achieved. The schematic diagram of secondary encapsulation development is as follows. Figure 6 As shown.

[0059] As an alternative implementation, when evolving and extending the published service API specification, incompatibility issues may arise in the header file implementation for a single business interface.

[0060] Figure 7 This is a general flowchart of a method for automatically generating code according to an embodiment of the present invention, such as... Figure 7 As shown, the process includes the following:

[0061] S701: Input terminal for C++ header files;

[0062] S702: The header file parsing engine parses the above header files. The parsed structured data includes namespaces, class names, function names, parameter types, number of parameters, input and output parameters, function comments, function return values, callback functions, etc.

[0063] S703: Store the structured data of the above header file;

[0064] S704: Modeling by generation method, which includes service name, API name, parameter name, self-service N, etc.

[0065] S705: Generator Output. Includes a service API generator to generate sub-service APIs, a sub-service generator to generate sub-service source code; and a service registration generator to generate sub-service registration slots by combining the structured data from S1103.

[0066] Optionally, the entity performing the above steps may be a background processor or other devices with similar processing capabilities, or a machine that integrates at least an image acquisition device and a data processing device. The image acquisition device may include an image acquisition module such as a camera, and the data processing device may include a terminal such as a computer or a mobile phone, but is not limited thereto.

[0067] Through the above steps, the first header file of the target business is obtained; target code is generated using a preset mapping relationship and the first header file, wherein the target code includes: interface specification code, sub-service code, or adaptation code. This solves the problem of low efficiency in manual code development in the solution technology and improves the efficiency of code development.

[0068] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0069] This embodiment also provides an apparatus for automatically generating code, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0070] Figure 8 This is a structural block diagram of an apparatus for automatically generating code according to an embodiment of the present invention, such as... Figure 8 As shown, the device includes an acquisition module 802 for acquiring the first header file of the target service; and a generation module 804 for generating target code through a preset mapping relationship and the first header file, wherein the target code includes: interface specification code, sub-service code, or adaptation code.

[0071] In an exemplary embodiment, the above-described apparatus is further configured to generate the interface specification code based on the first mapping relationship and the first header file; or, generate the sub-service code based on the second mapping relationship and the first header file; or, generate the adaptation code for the first header file and the second header file based on the third mapping relationship, the first header file, and the second header file; wherein the preset mapping relationship includes: the first mapping relationship, the second mapping relationship, and the third mapping relationship.

[0072] In an exemplary embodiment, the above-described apparatus is further configured to generate the interface specification code based on the mapping relationship between the data type of the first header file and the field types of the data exchange format, wherein the first mapping relationship records the mapping relationship between the data type of the code used by the first header file and the field types of the data exchange format.

[0073] In an exemplary embodiment, the above-described apparatus is further configured to parse the first header file to generate intermediate representation structure information; and generate the sub-service code according to the mapping relationship between each structure information and each sub-service information in the intermediate representation structure information, wherein the second mapping relationship records the mapping relationship between the structure information and the sub-service information.

[0074] In an exemplary embodiment, the above-described apparatus is further configured to generate the adaptation code based on the correspondence between each interface in the first header file and each function in the second header file.

[0075] In an exemplary embodiment, the above-described apparatus is further configured to map the parameters of each function in the second header file to the corresponding input and output parameters of the corresponding interface in the first header file according to the number of interfaces in the first header file and the number of functions in the second header file.

[0076] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0077] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any of the preceding claims.

[0078] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0079] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0080] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0081] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0082] Embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the steps of the methods described in various embodiments of the present application.

[0083] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0084] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for automatically generating code, characterized in that, include: Obtain the first header file of the target business; The target code is generated by using a preset mapping relationship and the first header file, wherein the target code includes: interface specification code, sub-service code, or adaptation code; The preset mapping relationships include: a first mapping relationship, a second mapping relationship, and a third mapping relationship; The target code is generated by a preset mapping relationship and the first header file, including: generating the adaptation code of the first header file and the second header file according to the third mapping relationship, the first header file and the second header file, including: mapping the parameters of each function in the second header file to the corresponding input and output parameters of the corresponding interface in the first header file according to the number of interfaces in the first header file and the number of functions in the second header file.

2. The method according to claim 1, characterized in that, The method of generating target code using a preset mapping relationship and the first header file also includes: Based on the first mapping relationship and the first header file, generate the interface specification code; or... The sub-service code is generated based on the second mapping relationship and the first header file.

3. The method according to claim 2, characterized in that, Based on the first mapping relationship and the first header file, generate the corresponding interface specification code, including: The interface specification code is generated based on the mapping relationship between the data type of the first header file and the field type of the data exchange format. The first mapping relationship records the mapping relationship between the data type of the code used in the first header file and the field type of the data exchange format.

4. The method according to claim 2, characterized in that, Based on the second mapping relationship and the first header file, sub-service code is generated, including: The first header file is parsed to generate intermediate representation structure information; The sub-service code is generated based on the mapping relationship between each structural information and each sub-service information in the intermediate expression structural information, wherein the second mapping relationship records the mapping relationship between the structural information and the sub-service information.

5. An apparatus for automatically generating code, characterized in that, include: The acquisition module is used to acquire the first header file of the target business; The generation module is used to generate target code based on a preset mapping relationship and the first header file, wherein the target code includes: interface specification code, sub-service code, or adaptation code; The preset mapping relationships include: a first mapping relationship, a second mapping relationship, and a third mapping relationship; The generation module is further configured to generate the adaptation code for the first header file and the second header file based on the third mapping relationship, the first header file, and the second header file, including: mapping the parameters of each function in the second header file to the corresponding input and output parameters of the corresponding interface in the first header file based on the number of interfaces in the first header file and the number of functions in the second header file.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 4.

7. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method described in any one of claims 1 to 4.

8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Method and device for generating remote procedure call (RPC) code

    CN103235718A

  • Software interface adaptation method, device and system

    CN114281336A

  • Code generation method and device based on configuration file and medium

    CN117992028A