Application program interface generation device, method, storage medium and system

Through the application interface generation device, the interface definition file, cross-application communication interface and chip configuration file are used to generate and call the interface, which solves the problem of cross-application calling complexity and independent maintenance, improves the efficiency of interface generation and calling, and reduces the cost. .

CN118426876BActive Publication Date: 2024-09-17GUANGZHOU SIX CIRCLE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410895460.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-09-17
Estimated Expiration
2044-07-05

AI Technical Summary

Technical Problem

As the number of applications increases, cross-application calling interfaces and joint debugging become complex. Existing application program interfaces are usually developed and maintained independently by respective companies, resulting in high user development costs and low maintenance efficiency.

Method used

An application program interface generation device is provided, which includes an interface definition file acquisition module, a cross-application communication interface generation module, a chip configuration file acquisition module, and an application interface generation and calling module. Through these modules, the cross-application communication interface is generated and called, reducing development costs. and maintenance costs.

Benefits of technology

It improves the efficiency of generating and calling application program interfaces, reduces development and maintenance costs, and enables efficient calling and sharing of cross-application interfaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118426876B
    Figure CN118426876B
Patent Text Reader

Abstract

The present invention relates to an application program interface generation device, method, storage medium and system. By using an interface definition file acquisition module to respond to a call request for at least one application function, at least one interface definition file corresponding to the at least one application function is acquired; a cross-application communication interface generation module is used to generate a cross-application communication interface according to the at least one interface definition file; a chip configuration file acquisition module is used to acquire a target chip configuration file corresponding to the target chip information of a device that issues a call request, thereby satisfying the call of different chips; an application program interface generation and calling module is used to generate and call at least one application program interface according to the interface definition file, the target chip configuration file and the cross-application communication interface, thereby calling the service module function provided by the corresponding chip. The present application can improve the efficiency of application program interface generation and calling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software development, and in particular to an application program interface generation device, method, storage medium and system. Background Art

[0002] An application programming interface (API) can be used to interact with a system without having to understand the implementation details of that system. External applications can use the services and data of the corresponding system through the API without the need for additional development, thereby improving application development efficiency.

[0003] As the number of applications continues to increase, cross-application interface calling and joint debugging become more and more complicated, and existing application program interfaces are usually independently developed and maintained by their respective companies, resulting in high user development costs and low maintenance efficiency. Summary of the invention

[0004] The embodiments of the present application provide an application program interface generation device, method, storage medium and system, which can improve the efficiency of application program interface generation.

[0005] In a first aspect, an embodiment of the present application provides an application program interface generation device, including:

[0006] an interface definition file acquisition module, configured to acquire, in response to a call request for at least one application function, at least one interface definition file corresponding to the at least one application function; wherein the call request includes target chip information of a device issuing the call request;

[0007] A cross-application communication interface generation module, used to generate a cross-application communication interface according to the at least one interface definition file; wherein the cross-application communication interface is used for different applications to call the generated application program interface;

[0008] A chip configuration file acquisition module, used to acquire a target chip configuration file corresponding to the target chip information;

[0009] The application program interface generation and calling module is used to generate and call at least one application program interface according to the interface definition file, the target chip configuration file and the cross-application communication interface, so as to call the service module function provided by the corresponding chip.

[0010] Optionally, the device further comprises:

[0011] The annotation information adding module is used to add corresponding annotation information to the target data in the interface definition file after acquiring at least one interface definition file corresponding to the at least one application interface; wherein the annotation information is used to prompt the meaning of the target data in the interface definition file.

[0012] In an embodiment of the present application, by adding annotation information to the target data in the interface definition file, the annotation information can be used by developers to understand the meaning of the target data in the interface definition file, thereby facilitating the developers to further develop or maintain the target data.

[0013] Optionally, the cross-application communication interface generation module obtains an automatic generation script, and uses the automatic generation script to traverse the at least one interface definition file to generate a cross-application communication interface.

[0014] In an embodiment of the present application, the cross-application communication interface module obtains an automatically generated script and uses the automatically generated script to traverse at least one interface definition file, thereby automatically generating a cross-application communication interface, so that different applications can call the application program interface through the cross-application communication interface, thereby improving the calling efficiency of the application program interface.

[0015] Optionally, the device further comprises:

[0016] A first file package generating module, configured to generate a file package according to the interface definition file, the target chip configuration file, the cross-application communication interface and the at least one application program interface;

[0017] The file package uploading module is used to upload the file package to the target server.

[0018] In an embodiment of the present application, the first file package generation module packages the files involved in the application interface generation process into a file package, and uploads the file package to the target server, thereby facilitating other users to download the file package from the target server, thereby realizing the sharing of the file package.

[0019] Optionally, also include:

[0020] A project creation module, used to create a project for each application function, and store the interface definition file, target chip configuration file, cross-application communication interface and application program interface corresponding to each project in a storage area corresponding to the project;

[0021] The second file package generating module is used for acquiring files in the storage area corresponding to the target project and generating a file package in response to a file package generating instruction for the target project.

[0022] In an embodiment of the present application, the second file package generation module can generate file packages of one or more projects according to user needs, so that the user can call one or more application functions based on the file package, meet the user's various usage needs, and improve the calling efficiency of the application program interface.

[0023] Optionally, the project creation module is further used to generate project information corresponding to the project when creating a project for each application function;

[0024] The second file package generation module is further used to respond to a file package generation instruction for a target project, obtain files in a storage area corresponding to the target project and generate a file package including a version identifier; wherein the version identifier is used to indicate a version of the project.

[0025] In an embodiment of the present application, a version identifier is generated based on the project information of the created project, thereby generating a file package including the version identifier, thereby facilitating developers to quickly determine the version of the file package based on the version identifier, and further facilitating developers to update and maintain the version of the file package, thereby improving the development and debugging efficiency of application program interface calls.

[0026] Optionally, also include:

[0027] The interception module is used to call an interception program to intercept a call request to at least one application function.

[0028] The present application intercepts the call request and implements the call of at least one application program interface through the application program interface device of the present application after intercepting the call request, thereby avoiding application program interface call errors and improving application program interface call efficiency.

[0029] In a second aspect, an embodiment of the present application provides a method for generating an application program interface, including:

[0030] In response to a call request for at least one application function, obtaining at least one interface definition file corresponding to the at least one application function; wherein the call request includes target chip information of a device issuing the call request;

[0031] Generate a cross-application communication interface according to the at least one interface definition file; wherein the cross-application communication interface is used for different applications to call the generated application program interface;

[0032] Obtaining a target chip configuration file corresponding to the target chip information;

[0033] At least one application program interface is generated and called according to the interface definition file, the target chip configuration file and the cross-application communication interface, so as to call the service module function provided by the corresponding chip.

[0034] In a third aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the application program interface generation method as described in any one of the above.

[0035] In a fourth aspect, an embodiment of the present application provides a vehicle-mounted system, comprising an application program interface generation device as described in any one of the above.

[0036] In an embodiment of the present application, an interface definition file acquisition module is utilized to respond to a call request for at least one application function to obtain at least one interface definition file corresponding to the at least one application function; a cross-application communication interface generation module is utilized to generate a cross-application communication interface based on the at least one interface definition file; a chip configuration file acquisition module is utilized to obtain a target chip configuration file corresponding to the target chip information of the device that issues the call request, thereby satisfying the calls of different chips; an application program interface generation and calling module is utilized to generate and call at least one application program interface based on the interface definition file, the target chip configuration file and the cross-application communication interface, thereby calling the service module function provided by the corresponding chip, and then the business function can be realized by calling the application program interface. The present application can improve the efficiency of application program interface generation and calling.

[0037] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A schematic diagram of the structure of an application program interface generation device in one embodiment of the present invention;

[0039] Figure 2 A schematic diagram of an application scenario of an application program interface generation device in one embodiment of the present invention;

[0040] Figure 3 A flowchart of a method for generating an application program interface in one embodiment of the present invention;

[0041] Figure 4 The figure is a schematic diagram of the structure of a vehicle-mounted system in one embodiment of the present invention. DETAILED DESCRIPTION

[0042] In order to make the objectives, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0043] It should be clear that the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present application.

[0044] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the embodiments of the present application. The singular forms of "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0045] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims. In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and do not have to be used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances.

[0046] In addition, in the description of this application, unless otherwise specified, "several" means two or more. "And / or" describes the corresponding relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0047] Middleware is a type of software that sits between application systems and system software. It uses the basic services (functions) provided by the system software to connect various parts of the application system or different applications on the network, thereby achieving the purpose of resource sharing and function sharing.

[0048] Application Programming Interface (API) is a relatively common middleware. Users can use the services and data of the corresponding application through the API. However, existing APIs are usually independently developed and maintained by their respective companies, with high development costs and low maintenance efficiency.

[0049] The embodiments of the present application can be applied in the automotive field, specifically in vehicle-mounted systems. With the development of technology, the number of applications installed in vehicle-mounted systems continues to increase. Different applications are usually independently developed and maintained by their respective companies, resulting in increasingly complex cross-application interface calls and joint debugging, high vehicle-mounted system development costs, and low maintenance efficiency.

[0050] The in-vehicle system, also known as the in-vehicle infotainment system (IVI for short), is an in-vehicle comprehensive information processing system that uses a dedicated in-vehicle central processor, based on the body bus system and Internet services. The in-vehicle system can realize a series of applications including three-dimensional navigation, real-time traffic conditions, IPTV, assisted driving, fault detection, vehicle information, body control, mobile office, wireless communication, online entertainment functions and TSP services, which greatly improves the level of vehicle electrification, networking and intelligence.

[0051] The embodiment of the present application provides an application interface generation device, which can be used to implement the call and joint debugging of different applications on the vehicle system, reduce the development and maintenance costs of the vehicle system, and improve the development and maintenance efficiency of the application interface of the vehicle system. The device uses the interface definition file acquisition module to respond to the call request for at least one application function, obtains at least one interface definition file corresponding to the at least one application function; uses the cross-application communication interface generation module to generate a cross-application communication interface according to the at least one interface definition file; uses the chip configuration file acquisition module to obtain the target chip configuration file corresponding to the target chip information of the device that issued the call request, so as to meet the call of different chips, and uses the application interface generation and calling module to generate and call at least one application interface according to the interface definition file, the target chip configuration file and the cross-application communication interface, so as to call the service module function provided by the corresponding chip, and then can realize its business function by calling the application interface. The present application can improve the efficiency of application interface generation and calling.

[0052] See also Figure 1 , the present application provides an application program interface generation device, comprising:

[0053] The interface definition file acquisition module 110 is used to obtain at least one interface definition file corresponding to the at least one application function in response to a call request for the at least one application function;

[0054] The call request includes chip information of the device that issues the call request;

[0055] The cross-application communication interface generation module 120 is used to generate a cross-application communication interface according to the at least one interface definition file; wherein the cross-application communication interface is used for different applications to call the generated application program interface;

[0056] A chip configuration file acquisition module 130 is used to acquire a target chip configuration file corresponding to the target chip information;

[0057] The application program interface generation and calling module 140 is used to generate and call at least one application program interface according to the interface definition file, the target chip configuration file and the cross-application communication interface, so as to call the service module function provided by the corresponding chip.

[0058] The call request may be a request sent by a device such as a mobile phone or a laptop computer to call an application function.

[0059] The interface definition is used to specify the format of information exchange between the front-end and back-end. The interface definition usually includes information such as interface name, interface method, interface address, request parameters and response parameters. Among them, the interface name refers to the name or identifier of the interface, which is used to distinguish different interfaces. The interface method refers to the method provided by the interface, including GET, POST, PUT, DELETE, etc. The interface address is the access address of the interface. The request parameters are the input parameters required by the interface, including parameter name, parameter type, parameter description, etc. The response parameters are the output results returned by the interface, including the type, name, description, etc. of the return value.

[0060] Different application programming interfaces can be used to implement different application functions, such as System API corresponding to system functions, Media API corresponding to media functions, Bluetooth API corresponding to Bluetooth functions, Radio API corresponding to radio functions, and so on.

[0061] The interface definition file is a file input in advance by the user, or may be a file written by the user in real time.

[0062] The chip configuration file is used to implement the configuration of different chips. Each chip corresponds to a chip configuration file. In this application, the chip configuration file can be an API lib library corresponding to the chip information. The application function adaptation of different chips is achieved by referencing the API lib library corresponding to the chip.

[0063] Specifically, the database may store chip configuration files corresponding to a plurality of chips. When acquiring the target chip configuration file, the target chip configuration file corresponding to the target chip information is acquired from the database according to the target chip information.

[0064] A service module refers to a module with specific functions divided according to different business needs or service types in software, systems or platforms. Each service module is responsible for processing specific tasks or workflows. In this application, the service module provided by the corresponding chip is called by calling the application program interface to implement the corresponding function.

[0065] In an embodiment of the present application, an interface definition file acquisition module is utilized to respond to a call request for at least one application function to obtain at least one interface definition file corresponding to the at least one application function; a cross-application communication interface generation module is utilized to generate a cross-application communication interface based on the at least one interface definition file; a chip configuration file acquisition module is utilized to obtain a target chip configuration file corresponding to the target chip information of the device that issues the call request, thereby satisfying the calls of different chips; an application program interface generation and calling module is utilized to generate and call at least one application program interface based on the interface definition file, the target chip configuration file and the cross-application communication interface, thereby calling the service module function provided by the corresponding chip, and then its business function can be realized by calling the application program interface. The present application can improve the efficiency of application program interface generation and calling.

[0066] In one embodiment, the application program interface generating device further includes:

[0067] The annotation information adding module is used to add corresponding annotation information to the target data in the interface definition file after acquiring at least one interface definition file corresponding to the at least one application interface; wherein the annotation information is used to prompt the meaning of the target data in the interface definition file.

[0068] The annotation information can help developers understand the meaning of the target data in the interface definition file, facilitate the documentation of the code, and thus facilitate developers to further develop or maintain the target data, thereby improving the development and maintenance efficiency of developers.

[0069] The target data of the present application may be part of the data in the interface definition file preset by the user, for example, the interface class, method body (method name, return value, input parameters), etc.

[0070] In an embodiment of the present application, by adding annotation information to the target data in the interface definition file, the annotation information can be used by developers to understand the meaning of the target data in the interface definition file, thereby facilitating the developers to further develop or maintain the target data.

[0071] The cross-application communication interface can be connected to one or more applications, and one or more applications can implement the call of the application program interface generated by the embodiment of the present application through the cross-application communication interface.

[0072] When the cross-application communication interface generation module 120 generates the cross-application communication interface, the user may write a cross-application communication interface generation program according to the at least one interface definition file to obtain the cross-application communication interface.

[0073] Alternatively, in another embodiment, the cross-application communication interface generation module 120 obtains a preset automatic generation script, and uses the automatic generation script to traverse the at least one interface definition file to generate a cross-application communication interface.

[0074] The automatically generated script may be a script pre-entered by the user and may be used to generate a cross-application communication interface. The automatically generated script may include generation code for the cross-application communication interface. The cross-application communication interface may implement calls to the application program interface by different applications. The cross-application communication interface may be an AIDL interface.

[0075] Specifically, the automatic generation script can use the automatic generation script to traverse the at least one interface definition file to generate an AIDL interface file and a Binder class corresponding to the AIDL interface, so that a cross-application communication interface can be created according to the AIDL interface file and the Binder class.

[0076] The cross-application communication interface can implement the calls of different applications to the application program interface according to the cross-application call logic pre-written by the user. Among them, the cross-application call logic can be written for the public base class library Base and can be used by reference or inheritance. The public base class library Base is an existing public programming framework. The public base class library Base provides rich classes for other classes in .NET to inherit and expand.

[0077] In an embodiment of the present application, the cross-application communication interface module obtains an automatically generated script and uses the automatically generated script to traverse at least one interface definition file, thereby automatically generating a cross-application communication interface, so that different applications can call the application program interface through the cross-application communication interface, thereby improving the calling efficiency of the application program interface.

[0078] In one embodiment, the application program interface generating device further includes:

[0079] A first file package generating module, configured to generate a file package according to the interface definition file, the target chip configuration file, the cross-application communication interface and the at least one application program interface;

[0080] The file package uploading module is used to upload the file package to the target server.

[0081] The file package may include files used in at least one application interface generation process, such as interface definition files, AIDL templates, Binder implementation classes, BaseXxxService service base classes, and IVIXxxManager interface call entry classes, etc., where Xxx represents the functions corresponding to the application interface, such as Bluetooth, media, radio, etc. The file package may be in jar format, aar format, or so format.

[0082] The target server may be a server specified by the user for uploading. For example, in the embodiment of the present application, the target server may be a Maven server.

[0083] After the file package is uploaded to the target server, the client communicating with the target server can download the file package from the target server, thereby realizing the sharing of the file package.

[0084] In an embodiment of the present application, the first file package generation module packages the files involved in the application interface generation process into a file package, and uploads the file package to the target server, thereby facilitating other users to download the file package from the target server, thereby realizing the sharing of the file package.

[0085] In one embodiment, the application program interface generation device of the embodiment of the present application further includes:

[0086] A project creation module, used to create a project for each application function, and store the interface definition file, target chip configuration file, cross-application communication interface and application program interface corresponding to each project in a storage area corresponding to the project;

[0087] The second file package generating module is used for acquiring files in the storage area corresponding to the target project and generating a file package in response to a file package generating instruction for the target project.

[0088] After the project is created, each project has a corresponding storage area. The interface definition files, target chip configuration files, cross-application communication interfaces, and application program interfaces involved in the process of generating the application program interface are stored in the storage area of ​​the corresponding project.

[0089] The target project may be one, multiple or all projects, and the second file package generation instruction may be used to generate file packages for one, multiple or all projects.

[0090] Specifically, when the target project is one project, the second file package generation module generates a file package corresponding to the single project by packaging the files in the storage area corresponding to the project; when the target project is multiple projects, the file packages corresponding to the multiple projects are generated by packaging the files in the storage area corresponding to the multiple projects; when the target project is all projects, the file packages corresponding to all projects are generated by packaging the files in the storage areas of all projects.

[0091] In an embodiment of the present application, the second file package generation module can generate file packages of one or more projects according to user needs, so that the user can call one or more application programming interfaces based on the file package, thereby meeting the user's various usage needs and improving the calling efficiency of the application programming interface.

[0092] In one embodiment, the project creation module is further used to generate project information corresponding to the project when creating a project for each application function;

[0093] The second file package generation module is further used to respond to a file package generation instruction for a target project, obtain files in a storage area corresponding to the target project and generate a file package including a version identifier; wherein the version identifier is used to indicate a version of the project.

[0094] Project information is used to indicate the functions implemented by the current project, such as added functions, modified content, or updated parts of code, etc. Project information may include the type of modification, the scope of impact, and the corresponding events that occurred.

[0095] The version identifier can be a character, a number, or a combination of characters and numbers, and can be set according to the actual application requirements of the user. Generate a file package including the version identifier, specifically, write the version identifier into the file package, such as when the application is on an Android system, the version identifier can be written into the BuildConfig class in the file package, the BuildConfig class is a configuration file in the Android system, and the configuration file cannot be modified after it is generated.

[0096] In an embodiment of the present application, a version identifier is generated based on the project information of the created project, thereby generating a file package including the version identifier, thereby facilitating developers to quickly determine the version of the file package based on the version identifier, and further facilitating developers to update and maintain the version of the file package, thereby improving the development and debugging efficiency of application program interface calls.

[0097] In one embodiment, it further includes:

[0098] The interception module is used to call an interception program to intercept a call request to at least one application function.

[0099] The interception program may be an existing interception program such as an application program interface agent to implement the interception of the call request.

[0100] The interceptor can be used to prevent the call request from directly accessing the existing application program interface, thereby avoiding the call error caused by the incompatibility of the device issuing the call request with the existing application program interface.

[0101] The present application intercepts the call request and implements the call of at least one application program interface through the application program interface device of the present application after intercepting the call request, thereby avoiding application program interface call errors and improving application program interface call efficiency.

[0102] The application program interface generation device of the present application can be applied to an in-vehicle infotainment system to implement the use of the functions of the in-vehicle infotainment system.

[0103] like Figure 2 As shown, the application program interface generation device of the present application can generate a CoreAPI corresponding to Launcher, a Media API corresponding to multimedia, a Bluetooth API corresponding to Bluetooth phone, and a Radio API corresponding to the radio function. The application can realize its business functions through the API generated by the present application. For different chips, the chip configuration file acquisition module of the present application can call the IVI API lib library of the corresponding chip to realize its business functions based on the API.

[0104] This application can realize cross-chip and cross-application calls of application interfaces, meet the functional implementation of different application scenarios, and improve the efficient reuse of the system. This application uses an application program interface generation device to highly isolate the application layer and the chip layer, thereby improving the portability of various applications.

[0105] See also Figure 3 The present application also provides a method for generating an application program interface, the method comprising:

[0106] S110: In response to a call request for at least one application function, obtaining at least one interface definition file corresponding to the at least one application function; wherein the call request includes target chip information of a device issuing the call request;

[0107] S120: Generate a cross-application communication interface according to the at least one interface definition file; wherein the cross-application communication interface is used for different applications to call the generated application program interface;

[0108] S130: Acquire a target chip configuration file corresponding to the target chip information;

[0109] S140: Generate and call at least one application program interface according to the interface definition file, the target chip configuration file and the cross-application communication interface, so as to call a service module function provided by a corresponding chip.

[0110] In one embodiment, the method further comprises:

[0111] After acquiring at least one interface definition file corresponding to the at least one application program interface, corresponding annotation information is added to the target data in the interface definition file; wherein the annotation information is used to indicate the meaning of the target data in the interface definition file.

[0112] In one embodiment, the step of generating a cross-application communication interface specifically includes:

[0113] An automatic generation script is obtained, and the at least one interface definition file is traversed using the automatic generation script to generate a cross-application communication interface.

[0114] In one embodiment, the method further comprises:

[0115] Generate a file package according to the interface definition file, the target chip configuration file, the cross-application communication interface and the at least one application program interface;

[0116] The file package is uploaded to the target server.

[0117] In one embodiment, obtaining at least one interface definition file corresponding to the at least one application program interface specifically includes:

[0118] Create a project for each application function, and store the interface definition file, target chip configuration file, cross-application communication interface and application program interface corresponding to each project in the storage area corresponding to the project;

[0119] In response to a file package generation instruction for a target project, files in a storage area corresponding to the target project are acquired and a file package is generated.

[0120] In one embodiment, a project is created for each application program interface, further comprising:

[0121] Generate project information corresponding to the project;

[0122] Acquire files in the storage area corresponding to the target project and generate a file package, including:

[0123] The files in the storage area corresponding to the target project are acquired and a file package including a version identifier is generated; wherein the version identifier is used to indicate the version of the project.

[0124] In one embodiment, the method further comprises:

[0125] The call interceptor intercepts a call request to at least one application function.

[0126] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the application program interface generation method as described in any one of the above.

[0127] The present application may take the form of a computer program product implemented on one or more storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-readable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include but are not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0128] See also Figure 4 The present application also provides a vehicle-mounted system 200, comprising an application program interface generation device 100 as described in any one of the above items.

[0129] The present invention is not limited to the above-mentioned embodiments. If various changes or modifications to the present invention do not depart from the spirit and scope of the present invention, and if these changes and modifications fall within the scope of the claims and equivalent technologies of the present invention, the present invention is also intended to include these changes and modifications.

Claims

1. An application program interface generation device, characterized in that: include: an interface definition file acquisition module, configured to acquire, in response to a call request for at least one application function, at least one interface definition file corresponding to the at least one application function; wherein the call request includes target chip information of a device issuing the call request; A cross-application communication interface generation module, used to generate a cross-application communication interface according to the at least one interface definition file; wherein the cross-application communication interface is used for different applications to call the generated application program interface; A chip configuration file acquisition module is used to acquire a target chip configuration file corresponding to the target chip information from a database; the database stores chip configuration files corresponding to multiple chips, and the target chip configuration file is used to implement application function adaptation of the target chip; The application program interface generation and calling module is used to generate and call at least one application program interface according to the interface definition file, the target chip configuration file and the cross-application communication interface, so as to call the service module function provided by the corresponding chip.

2. The application program interface generation device according to claim 1, characterized in that: Also includes: The annotation information adding module is used to add corresponding annotation information to the target data in the interface definition file after acquiring at least one interface definition file corresponding to the at least one application interface; wherein the annotation information is used to prompt the meaning of the target data in the interface definition file.

3. The application program interface generation device according to claim 1, characterized in that: The cross-application communication interface generation module obtains an automatic generation script, and uses the automatic generation script to traverse the at least one interface definition file to generate a cross-application communication interface.

4. The application program interface generation device according to claim 1, characterized in that: Also includes: A first file package generating module, configured to generate a file package according to the interface definition file, the target chip configuration file, the cross-application communication interface and the at least one application program interface; The file package uploading module is used to upload the file package to the target server.

5. The application program interface generation device according to claim 1, characterized in that: Also includes: A project creation module, used to create a project for each application function, and store the interface definition file, target chip configuration file, cross-application communication interface and application program interface corresponding to each project in a storage area corresponding to the project; The second file package generating module is used for acquiring files in the storage area corresponding to the target project and generating a file package in response to a file package generating instruction for the target project.

6. The application program interface generation device according to claim 5, characterized in that: The project creation module is also used to generate project information corresponding to the project when creating a project for each application function; The second file package generation module is further used to respond to a file package generation instruction for a target project, obtain files in a storage area corresponding to the target project and generate a file package including a version identifier; wherein the version identifier is used to indicate a version of the project.

7. The application program interface generation device according to claim 1, characterized in that: Also includes: The interception module is used to call an interception program to intercept a call request to at least one application function.

8. A method for generating an application program interface, characterized in that: include: In response to a call request for at least one application function, obtaining at least one interface definition file corresponding to the at least one application function; wherein the call request includes target chip information of a device issuing the call request; Generate a cross-application communication interface according to the at least one interface definition file; wherein the cross-application communication interface is used for different applications to call the generated application program interface; Acquire a target chip configuration file corresponding to the target chip information from a database; The database stores chip configuration files corresponding to a plurality of chips, and the target chip configuration file is used to implement application function adaptation of the target chip; At least one application program interface is generated and called according to the interface definition file, the target chip configuration file and the cross-application communication interface, so as to call the service module function provided by the corresponding chip.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the application program interface generation method as claimed in claim 8 are implemented.

10. A vehicle-mounted system, characterized in that: It comprises an application program interface generating device as described in any one of claims 1-7.