Data interface generation method, device, computer equipment and readable storage medium

By generating data interfaces, multiple functional software are interoperable, the complex problem of functional development operations in the existing technology is solved, flexible adjustment and change of functional logic is realized, and development efficiency is improved.

CN115113852BActive Publication Date: 2024-12-10IAT AUTOMOBILE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210638783.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-07
Publication Date
2024-12-10
Estimated Expiration
2042-06-07

AI Technical Summary

Technical Problem

In the prior art, when functional software is used separately for function development, the operation is complicated, difficult to implement, and the functional logic cannot be flexibly adjusted and changed.

Method used

By generating data interfaces, multiple functional software can be communicated with each other and efficient functional development is achieved. The specific steps include obtaining the data interface in the functional file, creating structures and interface functions, importing the second functional software to generate corresponding data interfaces, and realizing data interoperability.

Benefits of technology

This enables the first functional software to realize functional development when running on the second functional software, simplifies the development process, reduces operational complexity, and improves development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115113852B_ABST
    Figure CN115113852B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, computer equipment and readable storage medium for generating a data interface, wherein the method comprises: obtaining a function file; creating a structure with elements so that the data of the first data interface is stored in the elements; creating a first interface function and a second interface function; wherein the first interface function is used to extract the data of the first data interface in the structure, and the second interface function is used to store data into the structure; importing the first interface function and the second interface function into the second function software so that the second function software generates a second data interface based on the code inheritance tool command of the second function software; wherein the second data interface is the medium for data transmission of the second function software, and the second data interface corresponds to the first interface function and the second interface function respectively. The present application can interoperate multiple function software through data interfaces to achieve efficient function development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data interface generation, and in particular to a method, device, computer equipment and readable storage medium for generating a data interface. Background Art

[0002] With the update and iteration of the automotive industry, the automotive industry is constantly developing towards intelligence and digitalization. With the continuous deepening of research and development, in order to meet the needs of more complex application scenarios, it is necessary to develop the functions of the vehicle's controller.

[0003] In order to develop the functions of the vehicle controller, in early technologies, a functional software (such as MATLAB or Simulink) was usually used for model development, and then the code was automatically generated by the tool, compiled into an executable program and run in the controller. However, the model development was based on the control signal, and the control signal was bound to the controller. The functional logic could not be flexibly adjusted and changed, and the logic implementation could not be flexibly defined.

[0004] In order to solve the above problems, another type of functional software development (such as SOA technology) has gradually emerged in this field. This technical development requires development engineers to directly write C++ code for functional design. However, engineers are required to have certain technical capabilities and can use functional software tools to convert the code into usable C++ code. Moreover, the conversion process is complicated and difficult to implement.

[0005] Therefore, in the prior art, when functional software is used alone to develop functions, the operation is complicated and difficult to implement. Summary of the invention

[0006] The purpose of this application is to provide a method, device, computer equipment and readable storage medium for generating a data interface, which can interconnect multiple functional software through the data interface to achieve efficient functional development.

[0007] According to a first aspect of the present application, a method for generating a data interface is provided, the method comprising:

[0008] Acquire a function file; wherein the function file at least includes a first data interface of the first function software, and the first data interface is a medium for data transmission of the first function software;

[0009] Read data of the first data interface from the function file;

[0010] Creating a structure with elements so that data of the first data interface is stored in the elements; wherein the elements correspond to the first data interface;

[0011] Create a first interface function and a second interface function; wherein the first interface function is used to extract data of the first data interface in the structure, and the second interface function is used to store data into the structure;

[0012] Import the first interface function and the second interface function into the second functional software, so that the second functional software generates a second data interface based on the code inheritance tool command of the second functional software; wherein the second data interface is the medium for data transmission of the second functional software, and the second data interface corresponds to the first interface function and the second interface function respectively.

[0013] Optionally, creating a first interface function and a second interface function includes:

[0014] Setting a first method and a second method for the element; wherein the first method is used to extract data from the first data interface, and the second method is used to store data into the structure;

[0015] A first interface function and a second interface function are created, so that the first interface function calls the first method and the second interface function calls the second method.

[0016] Optionally, the function file also includes a data type corresponding to the first data interface; wherein the data type is used to characterize a set of values ​​of the first data interface and a set of operations defined in the data interface.

[0017] Optionally, reading data of the first data interface from the function file includes:

[0018] Read the data and data type of the first data interface from the function file;

[0019] A structure with elements is created so that data of the first data interface is stored in the elements, including:

[0020] A structure with elements is created so that data of the first data interface and data types are stored in the elements.

[0021] Optionally, the first data interface includes: a Field data interface, a Method data interface, and an Event data interface.

[0022] Optionally, the method further includes: controlling the structure to provide data of a first data interface to the functional module and obtaining data of a functional module interface set by the functional module; wherein the functional module is used to implement the functional logic of the client or the service logic of the server.

[0023] Optionally, the first method is a get method and the second method is a set method.

[0024] According to a second aspect of the present application, a data interface generation device is provided, the device comprising: an acquisition module, used to acquire a function file; wherein the function file comprises at least a first data interface of a first function software, and the first data interface is a medium for data transmission of the first function software; a reading module, used to read data of the first data interface from the function file; a first creation module, used to create a structure with elements, so that the data of the first data interface is stored in the elements; wherein the elements correspond to the first data interface; a second creation module, used to create a first interface function and a second interface function; wherein the first interface function is used to extract the data of the first data interface in the structure, and the second interface function is used to store data into the structure; a generation module, used to import the first interface function and the second interface function into the second function software, so that the second function software generates a second data interface based on the code inheritance tool command of the second function software; wherein the second data interface is a medium for data transmission of the second function software, and the second data interface corresponds to the first interface function and the second interface function respectively.

[0025] Optionally, a second creation module is used to set a first method and a second method for an element; wherein the first method is used to extract data from a first data interface, and the second method is used to store data into a structure; a first interface function and a second interface function are created so that the first interface function calls the first method, and the second interface function calls the second method.

[0026] Optionally, the function file also includes a data type corresponding to the first data interface; wherein the data type is used to characterize a set of values ​​of the first data interface and a set of operations defined in the data interface.

[0027] Optionally, a reading module is used to read the data and data type of the first data interface from the function file; and a first creation module is used to create a structure with elements so that the data and data type of the first data interface are stored in the elements.

[0028] Optionally, the first data interface includes: a Field data interface, a Method data interface, and an Event data interface.

[0029] Optionally, the device also includes: a third creation module, used to control the structure to provide the data of the first data interface to the functional module and obtain the data of the functional module interface set by the functional module; wherein the functional module is used to implement the functional logic of the client or the service logic of the server.

[0030] Optionally, the first method is a get method and the second method is a set method.

[0031] According to a third aspect of the present application, an electronic device is provided, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, and when the program or instruction is executed by the processor, the steps of the method for generating a data interface as shown in the first aspect are implemented.

[0032] According to a fourth aspect of the present application, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method for generating a data interface as shown in the first aspect are implemented.

[0033] In the present application, the CPU can be used as the execution subject of the present application, and the CPU obtains the function file, wherein the function file at least includes the first data interface of the first function software, and the first data interface is the medium for data transmission of the first function software; the CPU reads the data of the first data interface from the function file, and creates a structure with elements so that the data of the first data interface is stored in the elements; wherein the elements correspond to the first data interface. In addition, a first interface function and a second interface function are created; wherein the first interface function is used to extract the data of the first data interface in the structure, and the second interface function is used to store data into the structure; the first interface function and the second interface function are imported into the second function software, so that the second function software generates the second data interface based on the code inheritance tool command of the second function software; wherein the second data interface is the medium for data transmission of the second function software, and the second data interface corresponds to the first interface function and the second interface function respectively. That is, the present application can realize the function development of the first function software by intercommunication of the data interfaces of the first function software and the second function software, so that when the first function software is developed, it only needs to run on the second function software to realize the function development of the first function software. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0035] Figure 1 A flowchart of a method for generating a data interface provided in an embodiment of the present application;

[0036] Figure 2 A schematic diagram of a method for generating a data interface provided in an embodiment of the present application;

[0037] Figure 3 A schematic diagram of the architecture of the Simulink model interface design based on SOA provided in an embodiment of the present application;

[0038] Figure 4 The schematic diagram of the architecture of the Simulink model interface design based on SOA provided by the prior art;

[0039] Figure 5 A flowchart of a method for generating a data interface provided in an embodiment of the present application; and

[0040] Figure 6 A schematic diagram of a device for generating a data interface provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] In order to make the above and other features and advantages of the present application more clear, the present application is further described below in conjunction with the accompanying drawings. It should be understood that the specific embodiments given herein are for the purpose of explaining to those skilled in the art and are only exemplary and not restrictive.

[0042] In the following description, many specific details are set forth to provide a thorough understanding of the present application. However, it will be apparent to one of ordinary skill in the art that specific details are not required to practice the present application. In other cases, well-known steps or services are not described in detail to avoid obscuring the present application.

[0043] Based on the content of the background technology part, it can be known that in the prior art, when functional software is used alone to perform functional development, the operation is complicated and difficult to implement.

[0044] In order to solve the above technical problems, the present application provides a method, device, computer equipment and readable storage medium for generating a data interface. The method for generating a data interface provided by the present application is first described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0045] like Figure 1 As shown, the method for generating a data interface provided by the present application may include:

[0046] Step S11: Acquire a function file; wherein the function file at least includes a first data interface of a first function software, and the first data interface is a medium for data transmission of the first function software.

[0047] Specifically, in the present application, the central processing unit (CPU) can be used as the executor of the present application, that is, the CPU can obtain functional files (such as ARXML files). It should be noted that the first data interface is the medium for data transmission of the first functional software.

[0048] It should be noted that the function file may be a general configuration file or a database file for data transmission and storage.

[0049] Optionally, the first data interface may be a SOA data interface.

[0050] In an optional embodiment, the first data interface may include: a Field data interface, a Method data interface, and an Event data interface.

[0051] Since the first data interface may include all Field data interfaces, Method data interfaces, and Event data interfaces, data interface intercommunication may be performed more comprehensively.

[0052] In order to obtain the data of the first data interface, step S13 needs to be executed.

[0053] Step S13: Reading data of the first data interface from the function file.

[0054] Specifically, in the present application, the CPU reads the data of the first data interface from the function file.

[0055] In order to more accurately represent the meaning of the data, in an optional embodiment, the function file also includes a data type corresponding to the first data interface; wherein the data type is used to characterize a set of values ​​of the first data interface and a set of operations defined in the data interface.

[0056] The function file also includes the data type corresponding to the first data interface. For example, the data interface can be a door status interface, which is used to indicate the door open / closed state, etc. We use 1 to indicate the door is open and 2 to indicate the door is closed. Then only a limited number of states are needed, and it is enough to define them as unsigned integers. Then the data type of the door status interface is an unsigned integer. Another example: the data interface can be an accelerator pedal status interface, which is used to indicate that the accelerator opening is between 0 and 100%. Then any single-precision floating-point number between 0 and 100% is defined to represent the corresponding throttle opening, and the data type of this accelerator pedal status interface is a single-precision floating-point type.

[0057] It should be noted that a data interface can be a general term for a set of values ​​and a set of operations defined on this value. Data types refer to integers, floating-point types, structure types, etc. in programming languages. For example, for a child whose age is X years old, the data interface is "age", where age is an unsigned integer. Therefore, this unsigned integer can be a data type.

[0058] In order to store data better, step S15 needs to be executed.

[0059] Step S15: Create a structure with elements so that the data of the first data interface is stored in the elements; wherein the elements correspond to the first data interface.

[0060] Specifically, in the present application, after the CPU reads the data from the first data interface, a structure with elements is created, and the read data is stored in the corresponding elements. In this way, data can be better stored.

[0061] In an optional embodiment, a structure with elements is created so that the data and data types of the first data interface are stored in the elements.

[0062] By storing all the data types and the data of the first data interface in the element, the corresponding data interface can be found more quickly in the subsequent operation, that is, the operation of extracting or storing data.

[0063] In order to achieve data access, step S17 needs to be executed.

[0064] Step S17: Create a first interface function and a second interface function; wherein the first interface function is used to extract data of the first data interface in the structure, and the second interface function is used to store data into the structure.

[0065] Specifically, in the present application, the CPU can create a first interface function and a second interface function. It should be noted that the first interface function is used to extract data from the first data interface in the structure, and the second interface function is used to store data in the structure. For example: when the data in the structure needs to be extracted to other modules, the first interface function can be used to extract the data to the corresponding module. For another example: if the data in other modules needs to be stored in the structure, the second interface function can be used to store the data in other modules into the structure.

[0066] In order to better implement the access function of the interface function, in an optional embodiment, a first method and a second method are set for the element; wherein the first method is used to extract data from the first data interface, and the second method is used to store data into the structure; a first interface function and a second interface function are created so that the first interface function calls the first method, and the second interface function calls the second method.

[0067] The first method and the second method are set for each element, so that when accessing data, the first interface function and the second interface function only need to call the corresponding methods respectively to access the data in the element. For example: when the data in the structure needs to be extracted to other modules, the first interface function can call the first method to extract the data.

[0068] In an optional embodiment, the first method is a get method, and the second method is a set method.

[0069] Since the set method and get method can be set as private variables controlled by the object, the security of the program is enhanced.

[0070] It should be noted that the function of the set method can be to bind an object property to a function, and when the property value is changed, the corresponding function is executed. The function of the get method can be to bind an object property to a function, and when the property is accessed, the corresponding function is executed.

[0071] In order to implement the functional logic of the client or the combined service logic development of the server, step S19 needs to be executed.

[0072] Step S19: Import the first interface function and the second interface function into the second functional software, so that the second functional software generates a second data interface based on the code inheritance tool command of the second functional software; wherein the second data interface is the medium for data transmission of the second functional software, and the second data interface corresponds to the first interface function and the second interface function respectively.

[0073] Specifically, in the present application, the CPU imports the already set first interface function and the second interface function into the second functional software (such as Simulink software or MATLAB software), and the second functional software uses its own tools, that is, based on the code inheritance tool command, to generate the second data interface (such as Simulink data interface or MATLAB data interface) for the first interface function and the second interface function one by one. In this way, the second data interface can be developed at the first data interface, and data intercommunication can be achieved, thereby realizing the functional logic of the client or the combined service logic development of the server.

[0074] Compared with the prior art, the present application sets a first interface function and a second interface function, and imports the first interface function and the second interface function into the second functional software, thereby generating a second data interface corresponding to the first interface function and the second interface function, and realizing data intercommunication, thereby realizing the functional logic of the client or the combined service logic development of the server. That is, the present application can realize the functional development of the first functional software by intercommunication of the data interface of the first functional software and the second functional software, so that when the first functional software is developed, it only needs to be run on the second functional software to realize the functional development of the first functional software.

[0075] In order to develop the functional logic of the client or the combined service logic of the server, in an optional embodiment, the method further includes:

[0076] The control structure provides the function module with data of the first data interface and obtains data of the function module interface set by the function module; wherein the function module is used to implement the function logic of the client or the service logic of the server.

[0077] The CPU controls the structure to provide the data of the first data interface to the functional module and obtains the data of the functional module interface set by the functional module. It should be noted that the functional module is used to implement the functional logic of the client or the service logic of the server. For example, if the functional module needs any interface data in the structure, the CPU controls the structure to send the data to the functional module. By setting it in this way, the functional logic of the client or the combined service logic of the server can be developed.

[0078] Compared with the prior art, the present application sets a first interface function and a second interface function, and imports the first interface function and the second interface function into the second functional software, thereby generating a second data interface corresponding to the first interface function and the second interface function, and realizing data intercommunication, thereby realizing the functional logic of the client or the combined service logic development of the server. That is, the present application can realize the functional development of the first functional software by intercommunication of the data interface of the first functional software and the second functional software, so that when the first functional software is developed, it only needs to be run on the second functional software to realize the functional development of the first functional software.

[0079] Combination Figure 2 As shown, in an optional embodiment, the present application also provides a method for generating a data module, which may include:

[0080] An ARXML file containing a SOA service interface is input to the CPU; under the AUTOSAR architecture, the ARXML file serves as a general configuration file or database file and plays a key role in data transmission and storage.

[0081] Extract the data interface of SOA service and the corresponding data type from ARXML, including all Event, Method, Field data interfaces and types.

[0082] Create a data module; wherein creating a data module includes creating a Data class; wherein the Data class includes a structure for storing data, each element in the structure corresponds to a data interface of a service, and is used to store data of the service interface; and a get and set method for each structure element; wherein the get method is used to retrieve data from the data structure, and the set method is used to store data into the data structure.

[0083] Creating a data module also includes: creating get and set interface functions for calling get and set methods.

[0084] The code inheritance tool command controlling Simulink generates corresponding Simulink modules for the get interface function and the set interface function one by one.

[0085] Combination Figure 3 and Figure 4 As shown, Figure 3 This is a schematic diagram of the architecture of this application. Figure 4 This is a schematic diagram of the architecture of the prior art. In an optional embodiment, the present application also provides an architecture for implementing the Simulink model interface design based on SOA.

[0086] The architecture may include: a client application layer (Client Application) and a service application layer (Service Application); wherein the service application layer and the client application layer establish a communication relationship through a middleware transport layer (Middleware Transport Layer).

[0087] Both the service application layer and the client application layer can include function modules, data modules and service proxy modules. The data module can establish communication relationships with the function module and the service proxy module respectively. The function of the data module is to obtain the service data interface from the service proxy module and encapsulate it into a data module class. A set method and a get method are set for each service data interface. The get method is used to provide interface data to the function module, and the set method is used to obtain the interface data set by the function module.

[0088] Generate data modules using service interface definition.

[0089] It should be noted that the data module can be a series of header files and C++ source files.

[0090] It should be noted that the function module can be a series of header files and C++ source files, which are used to implement the client's function logic or the service logic of the server (such as composite services, etc.). These function logics are developed based on the Simulink model interface of the service data, and the service interface data is obtained through the get model interface and sent through the set model. The logic is modeled using Simulink, and after the modeling is completed, the code of the function module is generated through the code generation tool.

[0091] The difference between this architecture and the existing technical architecture is that it combines Figure 4 As shown, the service implementation (Service implementation) and service consumer implementation (Service Consumer implementation) in the prior art are refined, designed and functional modules and data modules are formed to achieve data interoperability, thereby facilitating the development of client functional logic or server combined service logic.

[0092] It should be noted that the service consumption implementation uses the service proxy module to obtain the service interface data and build the service application function logic; and the service proxy module forms the service client application. The service implementation uses the service skeleton to obtain the service interface data and build the service provision logic; and the service skeleton forms the service client application.

[0093] Combination Figure 5 As shown, the present application also provides an optional embodiment. The first step: determining the service interface data and type (for example: type 1, service data interface 1 or type 2, service data interface 2), is a process product for implementing subsequent steps; the data module of the second step, including the structure, will produce header files and C++ files including the service data Data class and get functions and set functions (for example: get service data 1 method, set service data 1 method or get service data 2 method, set service data 2 method); the third step will produce a Simulink model interface (for example: get service data 1 model interface, set service data 1 model interface or get service data 2 model interface, set service data 2 model interface).

[0094] like Figure 6 As shown, in an optional embodiment, a data interface generation device is also provided, which may include: an acquisition module 61, used to acquire a function file; wherein the function file includes at least a first data interface of a first function software, and the first data interface is a medium for data transmission of the first function software; a reading module 62, used to read data of the first data interface from the function file; a first creation module 63, used to create a structure with elements, so that the data of the first data interface is stored in the elements; wherein the elements correspond to the first data interface; a second creation module 64, used to create a first interface function and a second interface function; wherein the first interface function is used to extract the data of the first data interface in the structure, and the second interface function is used to store data into the structure; a generation module 65, used to import the first interface function and the second interface function into the second function software, so that the second function software generates a second data interface based on the code inheritance tool command of the second function software; wherein the second data interface is a medium for data transmission of the second function software, and the second data interface corresponds to the first interface function and the second interface function respectively.

[0095] The central processing unit (CPU) can be used as the execution subject of this application, that is, the CPU can obtain the function file (such as ARXML file). It should be noted that the first data interface is the medium for data transmission of the first function software. In order to more accurately represent the meaning of the data, in an optional embodiment, the function file also includes a data type corresponding to the first data interface; wherein the data type is used to characterize the meaning of the first data interface. In which, after the CPU reads the data of the first data interface, a structure with elements is created, and the read data is stored in the corresponding element. In this way, data can be better stored. In which, the CPU can create a first interface function and a second interface function. It should be noted that the first interface function is used to extract the data of the first data interface in the structure, and the second interface function is used to store data in the structure. For example: when the data in the structure wants to be extracted into other modules, the first interface function can be used to extract the data to the corresponding module. For another example: if the data in other modules wants to be stored in the structure, the second interface function can be used to store the data in other modules into the structure. Among them, the CPU imports the already set first interface function and the second interface function into the second functional software (such as Simulink software or MATLAB software), and the second functional software uses its own tools, that is, based on the code inheritance tool command, to generate the second data interface (such as Simulink data interface or MATLAB data interface) for the first interface function and the second interface function one by one. In this way, the second data interface can be developed at the first data interface, and data intercommunication can be achieved, thereby realizing the functional logic of the client or the combined service logic development of the server.

[0096] Optionally, a second creation module 64 is used to set a first method and a second method for an element; wherein the first method is used to extract data from a first data interface, and the second method is used to store data into a structure; and a first interface function and a second interface function are created so that the first interface function calls the first method, and the second interface function calls the second method.

[0097] The first method and the second method are set for each element, so that when accessing data, the first interface function and the second interface function only need to call the corresponding methods respectively to access the data in the element. For example: when the data in the structure needs to be extracted to other modules, the first interface function can call the first method to extract the data.

[0098] Optionally, the function file also includes a data type corresponding to the first data interface; wherein the data type is used to characterize a set of values ​​of the first data interface and a set of operations defined in the data interface.

[0099] The function file also includes the data type corresponding to the first data interface. For example, the data interface can be a door status interface, which is used to indicate the door open / closed state, etc. We use 1 to indicate the door is open and 2 to indicate the door is closed. Then only a limited number of states are needed, and it is enough to define them as unsigned integers. Then the data type of the door status interface is an unsigned integer. Another example: the data interface can be an accelerator pedal status interface, which is used to indicate that the accelerator opening is between 0 and 100%. Then any single-precision floating-point number between 0 and 100% is defined to represent the corresponding throttle opening, and the data type of this accelerator pedal status interface is a single-precision floating-point type.

[0100] Optionally, the reading module 62 is used to read the data and data type of the first data interface from the function file; the first creating module 63 is used to create a structure with elements so that the data and data type of the first data interface are stored in the elements.

[0101] By storing all the data types and the data of the first data interface in the element, the corresponding data interface can be found more quickly in the subsequent operation, that is, the operation of extracting or storing data.

[0102] Optionally, the first data interface includes: a Field data interface, a Method data interface, and an Event data interface.

[0103] Since the first data interface may include all Field data interfaces, Method data interfaces, and Event data interfaces, data interface intercommunication may be performed more comprehensively.

[0104] Optionally, the device also includes: a third creation module, used to control the structure to provide data of the first data interface to the functional module and obtain data of the functional module interface set by the functional module; wherein the functional module is used to implement the functional logic of the client or the service logic of the server.

[0105] The CPU controls the structure to provide the data of the first data interface to the functional module and obtains the data of the functional module interface set by the functional module. It should be noted that the functional module is used to implement the functional logic of the client or the service logic of the server. For example, if the functional module needs any interface data in the structure, the CPU controls the structure to send the data to the functional module. By setting it in this way, the functional logic of the client or the combined service logic of the server can be developed.

[0106] Optionally, the first method is a get method and the second method is a set method.

[0107] Since the set method and get method can be set as private variables controlled by the object, the security of the program is enhanced.

[0108] Compared with the prior art, the present application sets a first interface function and a second interface function, and imports the first interface function and the second interface function into the second functional software, thereby generating a second data interface corresponding to the first interface function and the second interface function, and realizing data intercommunication, thereby realizing the functional logic of the client or the combined service logic development of the server. That is, the present application can realize the functional development of the first functional software by intercommunication of the data interface of the first functional software and the second functional software, so that when the first functional software is developed, it only needs to be run on the second functional software to realize the functional development of the first functional software.

[0109] It should be understood that the specific features, services and details described hereinabove with respect to the method of the present application may also be similarly applied to the device and system of the present application, or vice versa. In addition, each step of the method of the present application described above may be performed by a corresponding component or unit of the device or system of the present application.

[0110] It should be understood that each module / unit of the device of the present application can be implemented in whole or in part by software, hardware, firmware or a combination thereof. Each of the modules / units can be embedded in the processor of the computer device in the form of hardware or firmware or independent of the processor, or can be stored in the memory of the computer device in the form of software for the processor to call to execute the services of the modules / units. Each of the modules / units can be implemented as an independent component or module, or two or more modules / units can be implemented as a single component or module.

[0111] In one embodiment, a computer device is provided, which includes a memory and a processor, wherein the memory stores computer instructions executable by the processor, and the computer instructions instruct the processor to execute each step of the method of the present application when executed by the processor. The computer device can be a server, a terminal, or any other electronic device with necessary computing and / or processing capabilities in a broad sense. In one embodiment, the computer device may include a processor, a memory, a network interface, a communication interface, etc. connected via a system bus. The processor of the computer device can be used to provide necessary computing, processing and / or control capabilities. The memory of the computer device may include a non-volatile storage medium and an internal memory. A service system, a computer program, etc. may be stored in or on the non-volatile storage medium. The internal memory can provide an environment for the operation of the service system and the computer program in the non-volatile storage medium. The network interface and the communication interface of the computer device can be used to connect and communicate with external devices via a network.

[0112] The present application may be implemented as a computer-readable storage medium having a computer program stored thereon, which causes the steps of the method of the present application to be executed when executed by a processor. In one embodiment, the computer program is distributed on a plurality of computer devices or processors coupled to a network so that the computer program is stored, accessed and executed in a distributed manner by one or more computer devices or processors. A single method step / service, or two or more method steps / services, may be performed by a single computer device or processor or by two or more computer devices or processors. One or more method steps / services may be performed by one or more computer devices or processors, and one or more other method steps / services may be performed by one or more other computer devices or processors. One or more computer devices or processors may perform a single method step / service, or perform two or more method steps / services.

[0113] It will be appreciated by a person of ordinary skill in the art that the steps of the method of the present application can be performed by instructing related hardware such as a computer device or a processor through a computer program, and the computer program can be stored in a non-temporary computer-readable storage medium, and the computer program causes the steps of the method of the present application to be performed when it is executed. Depending on the circumstances, any reference to memory, storage, database or other media herein may include non-volatile and / or volatile memory. Examples of non-volatile memory include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory, magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk, etc. Examples of volatile memory include random access memory (RAM), external cache memory, etc.

[0114] The various technical features described above can be combined arbitrarily. Although all possible combinations of these technical features are not described, any combination of these technical features should be considered to be covered by this specification as long as there is no contradiction in such combination.

[0115] Although the present application is described in conjunction with the embodiments, it should be understood by those skilled in the art that the above description and the accompanying drawings are only exemplary and non-restrictive, and the present application is not limited to the disclosed embodiments. Various modifications and variations are possible without departing from the spirit of the present application.

Claims

1. A method for generating a data interface, It is characterized in that The method comprises: Acquire a function file; wherein the function file at least includes a first data interface of a first function software, and the first data interface is a medium for data transmission of the first function software; Reading data of the first data interface from the function file; Creating a structure with elements so that data of the first data interface is stored in the elements; wherein the elements correspond to the first data interface; Create a first interface function and a second interface function; wherein the first interface function is used to extract data of the first data interface in the structure, and the second interface function is used to store data into the structure; The creating of the first interface function and the second interface function comprises: setting a first method and a second method for the element; wherein the first method is used to bind the object attribute to the function, when the attribute is accessed, the corresponding function is executed to extract the data of the first data interface, and the second method is used to bind the object attribute to the function, when the attribute value is changed, the corresponding function is executed to store data into the structure; creating the first interface function and the second interface function, so that the first interface function calls the first method, and the second interface function calls the second method; Import the first interface function and the second interface function into the second functional software, so that the second functional software generates a second data interface based on the code inheritance tool command of the second functional software; wherein the second data interface is the medium for data transmission of the second functional software, and the second data interface corresponds to the first interface function and the second interface function respectively.

2. The method for generating a data interface according to claim 1, It is characterized in that The function file also includes a data type corresponding to the first data interface; wherein the data type is used to characterize a set of values ​​of the first data interface and a set of operations defined in the data interface.

3. The method for generating a data interface according to claim 2, It is characterized in that The step of reading the data of the first data interface from the function file comprises: Read the data and data type of the first data interface from the function file; The step of creating a structure with elements so that the data of the first data interface is stored in the elements includes: A structure with elements is created so that data and data types of the first data interface are stored in the elements.

4. The method for generating a data interface according to claim 1, It is characterized in that The first data interface includes: a Field data interface, a Method data interface and an Event data interface.

5. The method for generating a data interface according to claim 1, It is characterized in that The method further comprises: The structure is controlled to provide the data of the first data interface to the functional module and to obtain the data of the functional module interface set by the functional module; wherein the functional module is used to implement the functional logic of the client or the service logic of the server.

6. The method for generating a data interface according to claim 1, It is characterized in that The first method is a get method, and the second method is a set method.

7. A device for generating a data interface, It is characterized in that The device comprises: An acquisition module, used to acquire a function file; wherein the function file at least includes a first data interface of a first function software, and the first data interface is a medium for data transmission of the first function software; A reading module, used for reading data of the first data interface from the function file; A first creation module, used for creating a structure with elements, so that the data of the first data interface is stored in the elements; wherein the elements correspond to the first data interface; The second creation module is used to create a first interface function and a second interface function; wherein the first interface function is used to extract the data of the first data interface in the structure, and the second interface function is used to store data into the structure; the creation of the first interface function and the second interface function includes: setting a first method and a second method for the element; wherein the first method is used to bind the object attribute to the function, and when the attribute is accessed, the corresponding function is executed to extract the data of the first data interface, and the second method is used to bind the object attribute to the function, and when the attribute value is changed, the corresponding function is executed to store data into the structure; the first interface function and the second interface function are created so that the first interface function calls the first method, and the second interface function calls the second method; A generation module is used to import the first interface function and the second interface function into the second functional software, so that the second functional software generates a second data interface based on the code inheritance tool command of the second functional software; wherein the second data interface is the medium for data transmission of the second functional software, and the second data interface corresponds to the first interface function and the second interface function respectively.

8. An electronic device, It is characterized in that The electronic device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method for generating a data interface according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method for generating a data interface according to any one of claims 1 to 6 is implemented.