Multi-adapter compatible library file module, calling method, calling system and device

The multi-adapter compatible library file module simplifies APP integration with diverse automotive adapters by using submodules for device interaction, enhancing development efficiency and flexibility.

JP7556614B2Active Publication Date: 2024-09-26SHANGHAI TOSUN TECH LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2023540727
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-08-02
Filing Date
2022-08-02
Publication Date
2024-09-26
Estimated Expiration
2042-08-02

AI Technical Summary

Technical Problem

Existing automotive application programs (APPs) face difficulties in supporting multiple manufacturers' APIs with different representations, leading to complex development, inflexibility, and increased software work when adding new manufacturers, along with potential defects in API calls.

Method used

A multi-adapter compatible library file module and system that includes submodules for reading device serial numbers, channel information, baud rates, and message handling, allowing the APP to interact with various manufacturers without needing to modify its architecture.

Benefits of technology

Enables seamless integration with adapters from multiple manufacturers, improving development efficiency and reducing errors by abstracting adapter details, enabling flexible and scalable software platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007556614000001
    Figure 0007556614000001
  • Figure 0007556614000002
    Figure 0007556614000002
  • Figure 0007556614000003
    Figure 0007556614000003
Patent Text Reader

Abstract

The present invention belongs to the field of adapter compatibility, and specifically relates to a multi-adapter compatible library file module, a calling method, a calling system, and a device. The calling method for multi-adapter compatibility is as follows. The abstraction of the adapter is realized in the upper layer APP by constructing a library file module for each manufacturer, having an application program obtain message information of the device through the library file module, and disconnecting the device after obtaining the message information. The upper layer APP derives a general-purpose API interface and creates a library file for each manufacturer's adapter. The API of the manufacturer's adapter is called to realize the API interface of the upper layer APP. The APP does not need to know the details of any of the manufacturer's adapters, and can use the adapter function just by loading the library file. Not only can it support adapters of all manufacturers on the market, but it can also support any new manufacturer's adapter by increasing the library file at the same time, which greatly improves the development efficiency of the application program.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to the field of adapter compatibility technology, and more particularly to a multi-adapter compatibility library file module, a calling method, a calling system and a device. [Background technology]

[0002] In the application of automotive tools, it is often necessary to use one or several existing equipment from different manufacturers simultaneously or alternately. The general approach is to develop a high-level APP (application program) that simultaneously supports the APIs of Manufacturer A, Manufacturer B and Manufacturer C, and configure the mapping method so that the APP can freely communicate with the hardware of these three manufacturers. This design causes the following problems: When designing an APP, it is necessary to simultaneously understand the API expression formats and calling methods of Maker A, Maker B, and Maker C, and to include the API calling algorithms of these three makers in the APP, which increases the difficulty and workload of developing the APP itself. The APP architecture cannot support dynamic addition of new manufacturers, such as emerging devices from manufacturers D and E, because their APIs have distinct representation formats different from those of manufacturers A, B, and C. The architecture of the APP itself is characterized by its inflexibility and difficulty in expansion.

[0003] When an APP needs to support devices from new manufacturers, such as manufacturers D and E, the implementation logic of the APP must be modified and the API calling algorithms of manufacturers D and E must be introduced into the existing framework, which changes the APP, increasing the amount of work required for the software during the change and potentially introducing defects that affect the calling of APIs of supported manufacturers.

[0004] Therefore, it is necessary to design a new multi-adapter compatible library file module, calling method, calling system and device based on the above technical problems. Summary of the Invention

[0005] An object of the present invention is to provide a multi-adapter compatible library file module, a calling method, a calling system and a device.

[0006] In order to solve the above technical problems, the present invention provides a library file module for multi-adapter compatibility, which includes: The submodules are: read serial number submodule, read channel number submodule, read channel type submodule, read channel baud rate submodule, write channel baud rate submodule, connect submodule, send message submodule, receive message submodule and disconnect submodule. Furthermore, the sub-module for reading the serial number is suitable for reading the device API from the library file and returning the device serial number to the application program. The sub-module for reading the channel number is suitable for reading the device API from the library file, and returning the physical channel number of the device to the application program. The read channel type sub-module is adapted to read the device API from the library file and return the specific channel type of the device to the application program. The read channel baud rate sub-module is adapted to read the device API from the library file and return the baud rate of a specific channel to the application program. The write channel baud rate sub-module is adapted to call the device API from the library file and write the baud rate given by the APP to the device. The connection sub-module is suitable for realizing the connection between the APP and the device by calling the device API from the library file. The message sending sub-module is adapted to call the device API from the library file and write to the device the message given to the APP that needs to be sent. The message receiving sub-module is adapted to call the device API from the library file and return the messages that the device has read from all channels to the application program. The disconnection sub-module is suitable for disconnecting the device from the application program by calling the device API from the library file.

[0007] In a second aspect, the present invention further provides a calling method for multi-adapter compatibility, comprising: Build library file modules for each manufacturer. The application program obtains the message information of the device through the library file module; and After obtaining the message information, the connection with the device is cut off.

[0008] In addition, the methods for building library file modules for each manufacturer listed above include: The library file module includes a sub-module for reading serial number, a sub-module for reading channel number, a sub-module for reading channel type, a sub-module for reading channel baud rate, a sub-module for writing channel baud rate, a connection sub-module, a message sending sub-module, a message receiving sub-module and a disconnection sub-module. The read serial number sub-module is suitable for reading a device API from the library file and returning the device serial number to the application program. The sub-module for reading the channel number is suitable for reading the device API from the library file, and returning the physical channel number of the device to the application program. The read channel type sub-module is adapted to read the device API from the library file and return the specific channel type of the device to the application program. The read channel baud rate sub-module is adapted to read the device API from the library file and return the baud rate of a specific channel to the application program. The sub-module for writing the channel baud rate is adapted to call the device API from the library file and write the baud rate given by the APP to the device. The connection sub-module is suitable for realizing the connection between the APP and the device by calling the device API from the library file. The message sending sub-module is adapted to call the device API from the library file and write to the device the message given to the APP that needs to be sent. The message receiving sub-module is adapted to call the device API from the library file and return the messages that the device has read from all channels to the application program. The disconnection sub-module is suitable for disconnecting the device from the application program by calling the device API from the library file.

[0009] In addition, the method for the application program to obtain message information of the device through the library file module includes: The application program obtains the message information of the device through the library file module corresponding to the manufacturer, namely: The functions of the sub-module for reading the serial number, the sub-module for reading the channel number, the sub-module for reading the channel type, the sub-module for reading the baud rate of the channel, the sub-module for writing the baud rate of the channel, the connection sub-module, the message sending sub-module, and the message receiving sub-module are sequentially realized to obtain the message information.

[0010] Furthermore, the method for disconnecting the device after obtaining the message information includes: After obtaining the message information, the disconnection sub-module disconnects the connection between the application program and the device.

[0011] In a third aspect, the present invention further provides a calling system for multi-adapter compatibility, comprising: A library file module is constructed for each manufacturer. A message information acquisition module, in which the application program acquires the message information of the device through the library file module; and A disconnection module disconnects the connection with the device after obtaining the message information.

[0012] In a fourth aspect, the present invention further provides a multi-adapter compatible device, comprising: A control module and a plurality of interface modules electrically connected to the control module. The interface module is adapted to connect to an adapter. The control module is adapted to receive message information sent from a device via the adapter.

[0013] In a fifth aspect, the present invention further provides a multi-adapter compatible system, comprising: It is a multi-adapter compatible device and higher-end model. The host machine is adapted to receive message information sent from the multi-adapter compatible device, and analyze the message information.

[0014] The effects of the present invention are as follows. The present invention realizes adapter abstraction in the upper layer APP by constructing a library file module for each manufacturer, having the application program obtain message information of the device through the library file module, and disconnecting the device after obtaining the message information. The upper layer APP derives a generic API interface and creates a library file for each manufacturer's adapter. The API of the manufacturer's adapter is called to realize the API interface of the upper layer APP. The APP does not need to know the details of any of the manufacturer's adapters, and can use the adapter's functions just by loading the library file. Not only can it support adapters of all manufacturers on the market, but it can also support any new manufacturer's adapter by increasing the library file at the same time, greatly improving the development efficiency of application programs.

[0015] Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the invention. The objectives and other advantages of the invention will be realized and obtained by the structure particularly pointed out in the description and drawings.

[0016] In order to make the above objects, features and advantages of the present invention more comprehensible, preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. [Brief description of the drawings]

[0017] In order to more clearly describe the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly describe the drawings that need to be used in the description of the specific embodiments or the prior art. The drawings in the following description are some embodiments of the present invention, and it is obvious that those skilled in the art can obtain other drawings from these drawings without creative efforts.

[0018] [Figure 1] FIG. 1 is a flow chart of a multi-adapter compatible calling method according to the present invention. [Diagram 2] FIG. 2 is a principle schematic diagram of a multi-adapter compatible calling method according to the present invention. [Diagram 3] FIG. 3 is a block diagram showing the principle of a multi-adapter compatible calling system according to the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0019] In order to make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention are described clearly and completely in the following in conjunction with the accompanying drawings, but it is obvious that the described embodiments are only some of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art on the basis of the embodiments of the present invention without creative labor are all within the scope of protection of the present invention.

[0020] Example 1 The first embodiment provides a library file module for multi-adapter compatibility, which may include, but is not limited to, a submodule for reading serial numbers, a submodule for reading channel numbers, a submodule for reading channel types, a submodule for reading channel baud rates, a submodule for writing channel baud rates, a submodule for connecting, a submodule for sending messages, a submodule for receiving messages, and a submodule for disconnecting. The API of the manufacturer adapter is called by the library file module, thereby realizing the API interface of the upper layer APP (application program). The APP does not need to know the details of any of the manufacturer adapters, and can use the adapter functions just by loading the library file. The APP does not need any modification after development is completed, and can support all the adapters of all the manufacturers on the market, and can also support any new adapters of any manufacturers by increasing the library file at the same time, greatly improving the development efficiency of the application program. It reduces the workload and reduces the possibility of errors.

[0021] In this embodiment, each time the APP loads a library file module, it calls a set of specific callback functions (submodules of corresponding functions) in the library file module. These callback functions are called in real time when the APP is executed. The types and number of callback functions depend on the functions of the APP. The submodule functions and quantities in the library file module have different implementations for different manufacturers, and the same manufacturer can realize library file modules with the same functions but different implementations by different developers. The read serial number submodule is suitable for reading the device API from the library file and returning the serial number of the device to the application program. The read channel number submodule is suitable for reading the device API from the library file and returning the physical channel number of the device to the application program. The read channel type submodule is suitable for reading the device API from the library file and returning the type of a specific channel of the device (such as CAN channel, or LIN channel, or Ethernet channel) to the application program. The read channel baud rate submodule is suitable for reading the device API from the library file and returning the baud rate of a specific channel to the application program. The write channel baud rate sub-module is suitable for calling a device API from a library file and writing the baud rate given by the APP to the device. The connection sub-module is suitable for realizing the connection between the APP and the device by calling the device API from a library file. The message sending sub-module is suitable for calling a device API from a library file and writing the message that needs to be sent given by the APP to the device. The message receiving sub-module is suitable for calling a device API from a library file and returning the messages read by the device from all channels to the application program.The disconnect sub-module is suitable for disconnecting the device from the application program by calling the device API from the library file.

[0022] Example 2 FIG. 1 is a flow chart of a multi-adapter compatible calling method according to the present invention. As shown in FIG. 1, on the basis of the first embodiment, the second embodiment further provides a calling method for multi-adapter compatibility, which includes constructing a library file module for each manufacturer, an application program obtaining message information of the device through the library file module, and disconnecting the device after obtaining the message information. The design process of the multi-adapter upper layer software (the execution process of the calling method for multi-adapter compatibility) is hardware independent, and there is no need to know in advance the existence of any manufacturer in the design process, and a software platform that is generally applicable to all adapters can be developed and completed, and the manufacturer can independently complete the device support. The upper layer software architecture constructed by the calling method for multi-adapter compatibility has a clear and flexible interface, and can call different types of automobile adapters by loading a library file (library file module), and can also respond to newly emerged automobile adapters. The entire process does not require modification of the APP, thereby opening up the connection ability of the APP as a software platform and unifying the compatibility method in the automobile adapter field.

[0023] In this embodiment, the library file module can use the library file module in the first embodiment to build a library file module corresponding to a manufacturer.

[0024] In this embodiment, the multi-adapter compatibility calling method is bottom-up, which obtains the characteristics of the device API, creates an interface program, and the interface program realizes the interface functions required by the upper layer of the multi-adapter software, and finally loads and executes it in the multi-adapter software. The bottom-up method makes the upper layer software independent of the hardware, and does not need to be modified once development is completed, thereby realizing software platformization, and new adapters produced by new manufacturers can always be added to the same software platform.

[0025] FIG. 2 is a schematic diagram illustrating the principle of the multi-adapter compatible calling method according to the present invention. In this embodiment, the method of constructing the library file modules of each manufacturer is as follows: The library file module may include, but is not limited to, a submodule for reading serial number, a submodule for reading channel number, a submodule for reading channel type, a submodule for reading channel baud rate, a submodule for writing channel baud rate, a submodule for connecting, a submodule for sending message, a submodule for receiving message, and a submodule for disconnecting. The submodule for reading serial number is suitable for reading device API from library file and returning device serial number to application program. The submodule for reading channel number is suitable for reading device API from library file and returning device physical channel number to application program. The submodule for reading channel type is suitable for reading device API from library file and returning device specific channel type to application program. The submodule for reading channel baud rate is suitable for reading device API from library file and returning device specific channel baud rate to application program. The submodule for writing channel baud rate is suitable for calling device API from library file and writing device given baud rate to APP to device. The connection sub-module is suitable for realizing the connection between the APP and the device by calling the device API from the library file. The message sending sub-module is suitable for calling the device API from the library file and writing the message given by the APP that needs to be sent to the device. The message receiving sub-module is suitable for calling the device API from the library file and returning the messages read by the device from all channels to the application program. The disconnection sub-module is suitable for disconnecting the device from the application program by calling the device API from the library file.As shown in Figure 2, take library file A as an example. It contains sub-modules corresponding to various API call algorithms of manufacturer A on the left side and sub-modules corresponding to the callback function functions of the APP on the right side, which realize most of the two configurations and serve as the API for the interface between the external manufacturer's device and the APP.

[0026] As shown in Fig. 2, in this embodiment, the method of the application program obtaining the message information of the device through the library file module is as follows: The application program obtains the message information of the device through the library file module corresponding to the manufacturer, that is, sequentially realizes the functions of the sub-module for reading serial number, the sub-module for reading channel number, the sub-module for reading channel type, the sub-module for reading channel baud rate, the sub-module for writing channel baud rate, the connection sub-module, the message sending sub-module, and the message receiving sub-module to obtain the message information.

[0027] In this embodiment, the method for disconnecting the device after obtaining the message information includes: after obtaining the message information, the disconnection sub-module realizes disconnecting the application program and the device.

[0028] Example 3 FIG. 3 is a block diagram showing the principle of a multi-adapter compatible calling system according to the present invention. As shown in FIG. 3, in addition to the second embodiment, the third embodiment further provides a multi-adapter compatible calling system, which includes: A library file module is constructed for each manufacturer. A message information obtaining module, in which the application program obtains the message information of the device through a library file module; and A disconnection module disconnects the device after obtaining the message information.

[0029] Example 4 In addition to Example 3, Example 4 further provides a multi-adapter compatible device, including: A control module and a plurality of interface modules electrically connected to the control module. The interface module is adapted to connect to an adapter. The control module is adapted to receive message information sent from the device via the adapter. In this embodiment, the control module can integrate the functions of each module in the multi-adapter compatible calling system, and call the API calling algorithms of various manufacturers and the callback function functions of the APP according to the APP.

[0030] Example 5 In addition to the fourth embodiment, the fifth embodiment further provides a multi-adapter compatible system, which includes a multi-adapter compatible device and a host machine. The host machine is suitable for receiving message information sent from the multi-adapter compatible device and analyzing the message information.

[0031] In this embodiment, the above-mentioned multi-adapter compatible device can use the multi-adapter compatible device in embodiment 4, and the upper machine can obtain message information sent from the device through the multi-adapter compatible device based on the functions and needs of the APP, and perform analysis processing on the message.

[0032] In summary, the present invention realizes adapter abstraction in the upper layer APP by constructing a library file module for each manufacturer, having the application program obtain message information of the device through the library file module, and disconnecting the device after obtaining the message information. The upper layer APP derives a generic API interface and creates a library file for each manufacturer's adapter. The API of the manufacturer's adapter is called to realize the API interface of the upper layer APP. The APP does not need to know the details of any of the manufacturer's adapters, and can use the adapter's functions just by loading the library file. Not only can it support adapters of all manufacturers on the market, but it can also support any new manufacturer's adapter by increasing the library file at the same time, which greatly improves the development efficiency of application programs.

[0033] In some embodiments provided by the present application, it is to be understood that the disclosed devices and methods may be realized in other manners. The above-described device embodiments are merely illustrative, and for example, the flowcharts and block diagrams in the drawings show possible architectures, functions, and operations of devices, methods, and computer program products according to several embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, program segment, or part of code including one or more executable instructions for performing a certain logical function. It should be noted that in some alternative implementations, the functions shown in the blocks may occur in a different order from the order shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and may sometimes be executed in a reverse order depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts may be realized in a dedicated hardware-based system that executes a certain function or operation, or may be realized in a combination of dedicated hardware and computer instructions.

[0034] In addition, each functional module in each embodiment of the present invention may be integrated together to form a single independent part, each module may exist alone, or two or more modules may be integrated to form a single independent part.

[0035] The above functions can be realized in the form of software functional modules and stored in a computer readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention essentially or the part that contributes to the prior art or the part of the technical solution can be expressed in the form of a software product. The computer software product is stored in a storage medium and contains a number of commands to make a computer device (which may be a personal computer, a server, or a network device, etc.) perform all or part of the steps of the method in each embodiment of the present invention. The above storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk, optical disk, etc., which can store various program codes.

[0036] Taking the above-mentioned ideal embodiment of the present invention as a hint, those skilled in the art can make various changes and modifications without departing from the technical spirit of the present invention based on the above description. The technical scope of the present invention is not limited to the contents of the specification, but should be determined based on the scope of the claims.

Claims

1. A multi-adapter compatible library file module, Including a serial number reading sub-module, a channel number reading sub-module, a channel type reading sub-module, a channel baud rate reading sub-module, a channel baud rate writing sub-module, a connection sub-module, a message sending sub-module, a message receiving sub-module and a disconnection sub-module; 1 is a multi-adapter compatible library file module.

2. The sub-module for reading the serial number is adapted to read a device API from a library file and return the device serial number to an application program; The sub-module for reading the channel number is adapted to read the device API from the library file and return the physical channel number of the device to the application program; The channel type reading sub-module is adapted to read the device API from the library file and return a specific channel type of the device to the application program; The sub-module for reading the baud rate of the channel is adapted to read the device API from the library file and return the baud rate of a specific channel to the application program; a sub-module for writing the baud rate of the channel is adapted to call the device API from the library file and write the baud rate given by the APP to the device; The connection submodule is adapted to realize a connection between the APP and the device by calling the device API from the library file; The message sending sub-module is adapted to call the device API from the library file and write a message given by the APP that needs to be sent to the device; The message receiving sub-module is adapted to call the device API from the library file and return the messages read by the device from all channels to the application program; the disconnection submodule is adapted to disconnect the device from the application program by calling the device API from the library file; 2. The multi-adapter compatibility library file module according to claim 1.

3. A multi-adapter compatible calling method, comprising: Building library file modules for each manufacturer, The application program obtains message information of the device through the library file module; disconnecting the device after obtaining the message information; The method for constructing the library file module of each manufacturer includes: The library file module includes a serial number read sub-module, a channel number read sub-module, a channel type read sub-module, a channel baud rate read sub-module, a channel baud rate write sub-module, a connection sub-module, a message sending sub-module, a message receiving sub-module, and a disconnection sub-module; The sub-module for reading the serial number is adapted to read a device API from the library file and return the serial number of the device to the application program; The sub-module for reading the number of channels is adapted to read the device API from the library file and return the number of physical channels of the device to the application program; The channel type reading sub-module is adapted to read the device API from the library file and return a specific channel type of the device to the application program; The sub-module for reading a baud rate of the channel is adapted to read the device API from the library file and return the baud rate of a specific channel to the application program; a sub-module for writing a baud rate of the channel, the sub-module being adapted to call the device API from the library file and write the baud rate given by the APP to the device; the connection submodule is adapted to realize a connection between the APP and the device by calling the device API from the library file; The message sending sub-module is adapted to call the device API from the library file and write a message given by the APP to the device that needs to be sent; The message receiving sub-module is adapted to call the device API from the library file and return the messages read by the device from all channels to the application program; The method for calling a multi-adapter compatibility device, wherein the disconnection sub-module is adapted to disconnect the device from the application program by calling the device API from the library file.

4. The method for the application program to obtain message information of the device through the library file module includes: The application program obtains the message information of the device through the library file module corresponding to the manufacturer, namely: The multi-adapter compatibility calling method of claim 3, characterized in that the functions of a sub-module for reading the serial number, a sub-module for reading the number of channels, a sub-module for reading the channel type, a sub-module for reading the baud rate of the channel, a sub-module for writing the baud rate of the channel, the connection sub-module, the message sending sub-module, and the message receiving sub-module are sequentially realized to obtain the message information.

5. The method for disconnecting the device after obtaining the message information includes: After obtaining the message information, the disconnection sub-module disconnects the connection between the application program and the device; 5. The multi-adapter compatible calling method according to claim 4, further comprising:

Citation Information

Patent Citations

  • Extensible Internet of Things underlying equipment adapter and construction method

    CN112202874A

  • Method for controlling and managing an electronic device, and control system applying the method

    JP2017530483A

  • Information processing apparatus, method of controlling information processing apparatus, and program

    JP2020004158A