A middleware for supporting the integration of multiple categories of peripherals and its control method

By designing a middleware that supports the integration of multiple categories of peripherals, using the equipment bus, drive abstraction layer and peripheral adaptation layer, the problems of high coupling, high maintenance cost, poor scalability and high testing difficulty in the existing technology are solved, and low coupling, reduced maintenance cost, improved scalability and simplified testing are achieved.

CN119311618BActive Publication Date: 2025-05-27CIVIL AVIATION CARES OF XIAMEN LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, the peripherals and the application system on the front-end of the user adopt one-to-one docking method, resulting in high coupling, high maintenance costs, poor scalability and high testing difficulties.

Method used

Design a middleware, including the device bus, the driver abstraction layer and the peripheral adaptation layer, to realize standardized interface communication and data transmission between peripherals and application systems through virtual channels and unified interfaces.

Benefits of technology

It reduces the coupling between peripherals and application systems, simplifies the access and maintenance of peripherals, improves the flexibility and scalability of the system, and reduces the test complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311618B_ABST
    Figure CN119311618B_ABST
Patent Text Reader

Abstract

The present invention discloses a middleware for supporting the integration of multiple categories of peripherals and its control method. The middleware is arranged between the application system and the peripherals. The middleware includes a device bus, a driver abstraction layer, and a peripheral adaptation layer. The application system sends general instructions to the device bus through a virtual channel. The device bus calls the corresponding virtual slot to send the general instructions to the unified interface of the driver abstraction layer. The peripheral adaptation layer interfaces with the peripherals and calls the corresponding adapters to convert the general instructions into special instructions recognized by the corresponding peripherals. The peripheral adaptation layer also receives the data obtained by the peripherals, converts the data obtained by the peripherals into a unified standard data format through the adapters of the corresponding peripherals, and sends it to the unified interface of the driver abstraction layer. Then, the peripheral data is sent to the application system through the virtual slot and the virtual channel. The present invention uses the middleware as a bridge to connect the application system and the peripherals, realizing standardized interface communication and data transmission, and solving the problems described in the background technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer technology, and in particular relates to a middleware supporting the integration of multiple categories of peripherals and a control method thereof. Background Art

[0002] The front-end application system for airport security checks will use a variety of different types of external devices (hereinafter referred to as peripherals) at the same time, such as ID card readers, RFID readers, scanners, face cameras, printers, all-in-one machines (all-in-one machines with multiple reading functions), etc. Figure 1 As shown, in the prior art, a one-to-one connection is adopted between the peripheral device and the user front-end application system. This solution has the following defects:

[0003] 1. High coupling: Each peripheral needs to develop its own interface and driver, resulting in high coupling between the various parts of the system;

[0004] 2. High maintenance cost: Peripherals of different brands and models may use different communication protocols and data formats, which increases the complexity of development and maintenance;

[0005] 3. Poor scalability: When introducing new peripherals, the interface needs to be redesigned and developed, which hinders the flexibility and scalability of the system;

[0006] 4. Difficulty in testing: The integration and testing of each peripheral needs to be performed separately, resulting in a huge overall testing workload and increasing the risk of errors. Summary of the invention

[0007] The purpose of the present invention is to provide a middleware and a control method thereof that supports the integration of multiple categories of peripherals, design the middleware between the application system and the peripherals, use the middleware as a bridge to connect the application system and the peripherals, realize standardized interface communication and data transmission, and solve the problems described in the background technology.

[0008] To achieve the above object, the present invention provides a middleware supporting the integration of multiple categories of peripherals, wherein the middleware is arranged between the application system and the peripherals, and the middleware includes a device bus, a driver abstraction layer and a peripheral adaptation layer;

[0009] The device bus allocates a virtual channel to each peripheral, and the application system sends a general instruction to the device bus through the virtual channel;

[0010] The driver abstraction layer abstracts the driver details of the same category of peripherals and encapsulates the driver details into a unified interface; the device bus also provides a virtual slot for connecting the virtual channel and the unified interface of the driver abstraction layer, the virtual slot stores the configuration information of the peripherals, and the device bus calls the corresponding virtual slot to send the general instruction to the unified interface of the driver abstraction layer;

[0011] The driver abstraction layer interacts with the peripheral adaptation layer through a unified interface and sends general instructions to the peripheral adaptation layer;

[0012] The peripheral adaptation layer connects to the peripheral and calls the corresponding adapter to convert the general instruction into a special instruction recognized by the corresponding peripheral;

[0013] The peripheral adaptation layer also receives data acquired by the peripheral, converts the data acquired by the peripheral into a unified standard data format through the adapter corresponding to the peripheral, and sends it to the unified interface of the driver abstraction layer, and then sends the peripheral data to the application system through the virtual slot and virtual channel;

[0014] The virtual channel of the device bus is also connected to the simulation test system to send test instructions to the peripheral device for functional testing.

[0015] Furthermore, a physical slot is provided between the peripheral adaptation layer and the peripheral, and the peripheral is connected to the peripheral adaptation layer via the physical slot. The physical slot identifies the type of the connected peripheral and transmits the peripheral information to the peripheral adaptation layer.

[0016] Furthermore, the peripheral device information includes device type, device model, communication protocol, status information and data acquired by the peripheral device.

[0017] Furthermore, the peripheral adaptation layer calls the adapter to convert the communication protocol of the peripheral into a unified standard format so that the application system can process data from different peripherals in a consistent manner. The communication protocol includes:

[0018] USB, RS232: devices used for serial communication;

[0019] TCP / IP: equipment used for network connection;

[0020] MQTT, WebSocket: used for communication between IoT devices.

[0021] Furthermore, the virtual channel is used to simulate the behavior of an actual physical connection, to achieve logical isolation between peripherals, and logical connection between peripherals and application systems.

[0022] Furthermore, the driver details abstracted by the driver abstraction layer include loading initialize(), starting start(), executing commands executeCommand(), getting status getStatus(), sending data sendData(), reading data readData(), and uninstalling reset().

[0023] Furthermore, the application system and the simulation test system are connected to the device bus via a TCP channel, and a virtual channel is provided in the TCP channel.

[0024] Furthermore, the simulation test system sends test instructions to the device bus through a virtual channel. The device bus calls the virtual slot of the corresponding peripheral according to the peripheral information of the test instruction, and sends the test instruction to the unified interface of the driver abstraction layer through the virtual slot. The driver abstraction layer sends the test instruction to the peripheral adaptation layer through the unified interface. The peripheral adaptation layer calls the adapter of the corresponding peripheral to convert the test instruction into actual instruction of the peripheral, and sends the actual instruction to the peripheral for functional testing.

[0025] The present invention also provides a control method for middleware supporting multi-category peripheral integration, comprising the following steps:

[0026] S1, check whether there is an adapter matching the peripheral device in the peripheral device adaptation layer, if yes, proceed to the next step, if not, add the corresponding adapter in the peripheral device adaptation layer, and save the adaptation information of the corresponding peripheral device to the virtual slot;

[0027] S2, connect the peripherals to the middleware through the physical slot;

[0028] S3, perform peripheral drive control or simulation test control;

[0029] S3.1, the drive control of the peripherals includes the following steps:

[0030] S3.1.1. The application system issues general instructions through the virtual channel. The device bus calls the corresponding virtual slot according to the peripheral information in the general instructions and sends the general instructions to the unified interface of the driver abstraction layer.

[0031] S3.1.2, the driver abstraction layer sends the general instructions to the peripheral adaptation layer through a unified interface;

[0032] S3.1.3, the peripheral adaptation layer calls the corresponding adapter, converts the general instruction into a special instruction recognized by the corresponding peripheral, and then sends the special instruction to the peripheral to drive the peripheral to execute the instruction;

[0033] S3.1.4, after the peripheral executes the instruction to obtain data, it sends the obtained data to the corresponding adapter in the peripheral adaptation layer. The adapter converts the data obtained by the peripheral into a unified standard data format, and then sends it to the unified interface of the driver abstraction layer. Then, the unified format data is sent to the application system through the virtual slot and virtual channel;

[0034] S3.2, the simulation test control of the peripherals includes the following steps:

[0035] S3.2.1, the simulation test system sends the test instruction to the device bus through the virtual channel, the device bus obtains the virtual slot of the corresponding peripheral according to the peripheral information of the test instruction, and sends the test instruction to the unified interface of the driver abstraction layer through the virtual slot;

[0036] S3.2.2, the driver abstraction layer sends the test command to the peripheral adaptation layer through a unified interface;

[0037] S3.2.3. The peripheral adaptation layer calls the adapter of the corresponding peripheral to convert the test instruction into an actual instruction that can be recognized by the peripheral, and then sends the actual instruction to the peripheral for functional testing.

[0038] After adopting the above scheme, the beneficial effects of the present invention are:

[0039] 1. Low coupling: The middleware decouples peripherals from the application system. Different types of peripherals can be connected by configuring the corresponding adapters in advance in the peripheral adaptation layer. There is no need to develop corresponding interfaces and drivers for each peripheral separately, so that the application system no longer depends on the implementation details of specific peripherals, thereby improving the flexibility of the application system.

[0040] 2. Reduce maintenance costs: Through unified communication protocols and data formats, the development and maintenance of different peripherals are simplified, and the cost of technical support and updates is reduced.

[0041] 3. Improve test efficiency: The device bus is also connected to the simulation test system through a virtual channel. The simulation test system can send test instructions to the peripherals through the middleware, so that the peripherals can perform functional tests. The functional tests of the peripherals only need to be performed in the middleware. The application system does not need to be changed and no integration tests are required. Moreover, the tests in the application system can be performed in parallel with the tests in the middleware, reducing the test time and complexity.

[0042] 4. Enhanced scalability: The access of new peripherals only requires the configuration of corresponding adapters in the peripheral adaptation layer, which greatly improves the system's scalability and adaptability.

[0043] 5. Improve the security of the system: Peripherals must call specific adapters to access the application system. Before the peripherals are connected, the corresponding configurator must be configured in the peripheral adaptation layer in advance. Otherwise, the peripherals cannot be connected to the application system, preventing users from arbitrarily using unsafe, unauthorized and unadapted peripherals to access the application system.

[0044] 6. Enhanced user experience: The user front end can use and uniformly manage multiple peripherals more smoothly, improving the convenience of operation and the reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A framework diagram for the existing peripheral docking application system;

[0046] Figure 2 The framework diagram of the peripheral docking application system of the present invention;

[0047] Figure 3 It is the overall framework diagram of the present invention.

[0048] Description of labels:

[0049] 1. Application system; 2. Middleware; 21. Device bus; 22. Driver abstraction layer; 23. Peripheral adaptation layer; 24. Virtual slot; 25. Physical slot; 3. Peripheral; 4. TCP channel; 41. Virtual channel. DETAILED DESCRIPTION

[0050] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0051] like Figure 2 and Figure 3 As shown, the present invention provides a middleware supporting the integration of multiple categories of peripherals. The middleware 2 is arranged between the application system 1 and the peripheral 3. The middleware 2 includes a device bus 21, a driver abstraction layer 22 and a peripheral adaptation layer 23.

[0052] The application system 1 is connected to the device bus 21 through the TCP (Transmission Control Protocol) channel 4. The application system 1 can choose to use the WebSocket (a network communication protocol built on TCP, which provides two-way communication capabilities and aims to solve the stateless and one-way communication problems of HTTP) based on HTTP (Hypertext Transfer Protocol) or the Socket (Socket is a programming interface for network communication, which provides a method for data transmission between two programs. Socket can be based on different transport layer protocols, such as TCP, UDP, etc.) communication protocol based on TCP to establish a connection with the device bus 21. The browser application system 1 generally uses WebSocket, and the desktop application system 1 generally uses Socket, which is a Socket communication protocol based on TCP.

[0053] The device bus 21 is responsible for coordinating and managing the communication and data flow of each peripheral device 3, and assigning a virtual channel 41 to each peripheral device 3. The virtual channel 41 is located in the TCP channel 4. The application system 1 sends general instructions to the device bus 21 through the virtual channel 41; the virtual channel 41 simulates a physical connection to achieve logical isolation between peripheral devices 3 and logical connection between peripheral devices 3 and application system 1. Through this channel, data transmission between the device and application system 1 can remain independent and reliable, ensuring the orderly transmission and stability of data, so that multiple devices can be connected at the same time without conflict.

[0054] The device bus 21 also provides a virtual slot 24 for connecting the virtual channel 41 and the unified interface of the driver abstraction layer 22. The virtual slot 24 is a logical representation of the physical slot 25. The middleware 2 of the present invention completes the initialization configuration such as the configuration of the peripheral 3 model and the selection of the physical interface before the peripheral 3 is inserted into the physical slot 25. The virtual slot 24 saves the basic information and physical interface information of the peripheral 3 to ensure smooth management and use before and after the device is connected. After the application system 1 issues a general instruction through the virtual channel 41, the device bus 21 calls the corresponding virtual slot 24 and sends the general instruction to the unified interface of the driver abstraction layer 22, so that the application system 1 does not need to directly manage the peripheral 3, but configures and manages the peripheral 3 through the virtual slot 24, which not only improves the flexibility of the system, but also simplifies the access and configuration process of the peripheral 3.

[0055] Before the peripheral 3 is connected, the driver abstraction layer 22 abstracts the driver details of the peripherals 3 of the same category and encapsulates the driver details into a unified interface. Usually, each type of peripheral 3 has a type of interface (for example, an ID card reader has a type of interface, a face camera has a type of interface, and the same type of peripherals 3 refers to peripherals 3 with consistent functions, such as barcode scanners of different brands, which have the same functions, such as scanning codes or reading data). Therefore, the peripherals 3 of the same category will have the same driver details, that is, the driving method. These driver details are encapsulated into a unified interface to connect the virtual slot 24 and the peripheral adaptation layer 23. In fact, some implementation details of the driver peripheral 3 are hidden from the upper layer, and only the commonly used driver details are encapsulated into a unified interface, so that the application system 1 can only use the driver peripheral 3 to execute specific general instructions. The abstracted driver details can be loading initialize(), starting start() , execute command executeCommand(), get status getStatus(), send data sendData(), read data readData(), uninstall reset(), so that the unified interface of the driver abstraction layer 22 can enable the application system 1 to drive peripherals 3 of different types and brands without adjustment.

[0056] The driver abstraction layer 22 interacts with the peripheral adaptation layer 23 through a unified interface and sends general instructions to the peripheral adaptation layer 23. The peripheral adaptation layer 23 is provided with an adapter corresponding to each peripheral 3. The adapter is pre-configured in the peripheral adaptation layer 23 according to the peripheral driver SDK (software development kit) provided by the manufacturer of the peripheral 3 before the peripheral 3 is connected. After receiving the general instruction, the peripheral adaptation layer 23 calls the corresponding adapter to convert the general instruction into a special instruction that can be recognized by the corresponding peripheral 3, and then sends the special instruction to the peripheral 3 to drive the peripheral 3 to execute the instruction.

[0057] In addition to being able to convert the general instructions issued by the application system 1 into special instructions that can be recognized by the corresponding peripheral 3, the adapter can also convert the data obtained by the peripheral 3 into the unified standard data format required by the application system 1, so that after the peripheral 3 executes the instruction to obtain the data, the data is sent to the peripheral adaptation layer 23, and the corresponding adapter in the peripheral adaptation layer 23 can convert the peripheral 3 data into a unified standard data format and send it to the unified interface of the driver abstraction layer 22, and then send the peripheral 3 data to the application system 1 through the virtual slot 24 and the virtual channel 41, and the application system 1 processes it. Therefore, the peripheral 3 and the application system 1 can be decoupled through the adapter in the peripheral adaptation layer 23, and the application system 1 can drive multiple peripherals 3 without the need to develop corresponding interfaces and drivers for each peripheral 3. Moreover, the corresponding adapter must be called when the peripheral 3 is connected to the application system 1, so the corresponding configurator must be configured in the peripheral adaptation layer 23 before the peripheral 3 is connected, otherwise the peripheral 3 cannot be connected to the application system 1, so as to prevent users from arbitrarily using unsafe, unauthorized and unadapted peripherals 3 to access the application system 1.

[0058] The data format acquired by the peripheral device 3 may be in JSON, XML, binary or other formats, and the adapter may convert the data acquired by the peripheral device 3 into a unified JSON format for easy use by the application system 1 .

[0059] Furthermore, the virtual channel 41 of the device bus 21 is also connected to the simulation test system in the same way as the application system 1. The simulation test system can send test instructions to the device bus 21 through the virtual channel 41. The device bus 21 obtains the virtual slot 24 corresponding to the peripheral 3 according to the peripheral 3 information of the test instruction, and sends the test instruction to the unified interface of the driver abstraction layer 22 through the virtual slot 24. The driver abstraction layer 22 sends the test instruction to the peripheral adaptation layer 23 through the unified interface. The peripheral adaptation layer 23 calls the adapter corresponding to the peripheral 3 to convert the test instruction into the actual instruction of the peripheral 3, and sends the actual instruction to the peripheral 3 for functional testing. Therefore, the functional test of the peripheral 3 only needs to be performed in the middleware 2, without passing through the application system 1. The application system 1 does not need to be changed and no longer needs to be integrated tested. Moreover, the test in the application system 1 can be performed in parallel with the test in the middleware 2, which reduces the test time and complexity.

[0060] Specifically, a physical slot 25 is provided between the peripheral device adaptation layer 23 and the peripheral device 3. The physical slot 25 is a physical location or port for actually installing the peripheral device 3, ensuring that the physical connection of all peripheral devices 3 is reliable and laying a foundation for subsequent data transmission. After the peripheral device 3 is inserted into the physical slot 25, it can be connected to the peripheral device adaptation layer 23. The physical slot 25 can identify the type of the connected peripheral device 3 and pass the peripheral device 3 information to the peripheral device adaptation layer 23. The peripheral device 3 information includes the device type, device model, communication protocol, status information and data acquired by the peripheral device 3.

[0061] The peripheral adaptation layer 23 calls the adapter and converts the communication protocol of the peripheral 3 into a unified standard format. The communication protocol is a specific communication protocol that is usually followed between the peripheral 3 and the computer system. The peripheral adaptation layer 23 needs to understand and follow these protocols to ensure the correct transmission and processing of data, so that the application system 1 can process data from different peripherals 3 in a consistent manner. There are many types of communication protocols, such as:

[0062] USB, RS232: Traditional devices used for serial communication;

[0063] TCP / IP: for network-connected devices such as webcams and RFID readers;

[0064] MQTT, WebSocket: used for communication between IoT devices.

[0065] The present invention also provides a control method for middleware supporting the integration of multiple categories of peripherals, which can perform drive control and simulation test control of the peripheral 3, and specifically includes the following steps:

[0066] S1, check whether there is an adapter matching the peripheral 3 in the peripheral adaptation layer 23, if yes, proceed to the next step, if not, configure the peripheral 3 in the middleware 2, add the corresponding adapter to the peripheral adaptation layer 23, and save the configuration information in the virtual slot 24, the configuration information includes the device identification, driver and version, peripheral type, vendor and other initialization parameters;

[0067] S2, connect the peripheral device 3 to the middleware 2 through the physical slot 25;

[0068] S3, performing drive control or simulation test control of peripheral device 3;

[0069] S3.1, the drive control of peripheral 3 includes the following steps:

[0070] S3.1.1, the application system 1 issues general instructions, such as start or stop instructions, through the virtual channel 41, and the device bus 21 calls the corresponding virtual slot 24 according to the peripheral 3 information in the general instruction, and sends the general instruction to the unified interface of the driver abstraction layer 22;

[0071] S3.1.2, the driver abstraction layer 22 sends the general instruction to the peripheral adaptation layer 23 through the unified interface;

[0072] S3.1.3, the peripheral adaptation layer 23 calls the corresponding adapter (for example, if the peripheral 3 is a Shensi SS628 ID card reader, the adapter called is ShensiIDCardReaderDriverAdapter), converts the general instruction into a special instruction that can be recognized by the corresponding peripheral 3, and then sends the special instruction to the peripheral 3 to drive the peripheral 3 to execute the instruction, that is, drive the peripheral 3 to start or stop;

[0073] S3.1.4, after the peripheral 3 executes the instruction to obtain data, it sends the obtained data to the corresponding adapter in the peripheral adaptation layer 23. If the peripheral 3 is a barcode scanner, the obtained data can be the document data obtained by the barcode scanner. If the peripheral 3 is a face camera, the obtained data can be the face image data. Then, the adapter converts the data obtained by the peripheral 3 into a unified standard data format, and then sends it to the unified interface of the driver abstraction layer 22. Then, the unified format data is sent to the application system 1 through the virtual slot 24 and the virtual channel 41, and processed by the application system 1. It should be noted that the peripheral adaptation layer 23 has already called the adapter corresponding to the peripheral 3 in step S3.1.3, and the adapter has been matched with the corresponding peripheral 3. At this time, there is no need to call the adapter again, and the data obtained by the peripheral 3 is directly sent to the corresponding adapter.

[0074] S3.2, the simulation test control method of the peripheral 3 is similar to the step of the application system 1 sending instructions to control the peripheral 3, and specifically includes the following steps:

[0075] S3.2.1, the simulation test system sends a test instruction to the device bus 21 through the virtual channel 41, the device bus 21 obtains the virtual slot 24 corresponding to the peripheral 3 according to the peripheral 3 information of the test instruction, and sends the test instruction to the unified interface of the driver abstraction layer 22 through the virtual slot 24;

[0076] S3.2.2, the driver abstraction layer 22 sends the test instruction to the peripheral adaptation layer 23 through the unified interface;

[0077] S3.2.3. The peripheral adaptation layer 23 calls the adapter corresponding to the peripheral 3 to convert the test instruction into an actual instruction that can be recognized by the peripheral 3, and then sends the actual instruction to the peripheral 3 for functional testing.

[0078] The above description is only a preferred embodiment of the present invention and is not a limitation on the design of this case. Any equivalent changes made based on the design key of this case shall fall within the protection scope of this case.

Claims

1. A middleware supporting the integration of multiple categories of peripherals, characterized by: The middleware is arranged between the application system and the peripherals, and includes a device bus, a driver abstraction layer and a peripheral adaptation layer. A physical slot is arranged between the peripheral adaptation layer and the peripherals, and the peripherals are connected to the peripheral adaptation layer through the physical slot. The physical slot identifies the type of the connected peripherals and transmits the peripheral information to the peripheral adaptation layer. The device bus allocates a virtual channel to each peripheral, and the virtual channel is used to simulate the behavior of actual physical connection, realize the logical isolation between peripherals and the logical connection between peripherals and application systems, and the application system sends general instructions to the device bus through the virtual channel; The driver abstraction layer abstracts the driver details of the same category of peripherals and encapsulates the driver details into a unified interface; the device bus also provides a virtual slot for docking the virtual channel and the unified interface of the driver abstraction layer, the virtual slot is a logical representation of the physical slot, the middleware completes the configuration of the peripheral model and the initialization configuration of the selection of the physical interface before the peripheral is inserted into the physical slot, the virtual slot stores the configuration information of the peripheral, and the device bus calls the corresponding virtual slot to send the general instruction to the unified interface of the driver abstraction layer; The driver abstraction layer interacts with the peripheral adaptation layer through a unified interface and sends general instructions to the peripheral adaptation layer; The peripheral adaptation layer connects to the peripheral and calls the corresponding adapter to convert the general instruction into a special instruction recognized by the corresponding peripheral; The peripheral adaptation layer calls the adapter and converts the communication protocol of the peripheral into a unified standard format. The peripheral adaptation layer also receives data acquired by the peripheral, converts the data acquired by the peripheral into a unified standard data format through the adapter corresponding to the peripheral, and sends it to the unified interface of the driver abstraction layer, and then sends the peripheral data to the application system through the virtual slot and the virtual channel; The virtual channel of the device bus is also connected to the simulation test system to send test instructions to the peripheral device for functional testing.

2. The middleware supporting the integration of multiple categories of peripherals as claimed in claim 1, characterized in that: The peripheral device information includes device type, device model, communication protocol, status information and data acquired by the peripheral device.

3. The middleware supporting the integration of multiple categories of peripherals as claimed in claim 2, characterized in that: The communication protocol includes: USB, RS232: devices used for serial communication; TCP / IP: equipment used for network connection; MQTT, WebSocket: used for communication between IoT devices.

4. The middleware supporting the integration of multiple categories of peripherals as claimed in claim 1, characterized in that: The driver details abstracted by the driver abstraction layer include loading initialize(), starting start(), executing commands executeCommand(), getting status getStatus(), sending data sendData(), reading data readData(), and uninstalling reset().

5. The middleware supporting the integration of multiple categories of peripherals as claimed in claim 1, characterized in that: The application system and the simulation test system are connected to the device bus via a TCP channel, and a virtual channel is provided in the TCP channel.

6. The middleware supporting the integration of multiple categories of peripherals as claimed in claim 1, characterized in that: The simulation test system sends a test instruction to the device bus through a virtual channel. The device bus calls the virtual slot of the corresponding peripheral according to the peripheral information of the test instruction, and sends the test instruction to the unified interface of the driver abstraction layer through the virtual slot. The driver abstraction layer sends the test instruction to the peripheral adaptation layer through the unified interface. The peripheral adaptation layer calls the adapter of the corresponding peripheral to convert the test instruction into an actual instruction of the peripheral, and sends the actual instruction to the peripheral for functional testing.

7. A method for controlling middleware supporting multi-category peripheral integration according to any one of claims 1 to 6, comprising the following steps: S1, check whether there is an adapter matching the peripheral device in the peripheral device adaptation layer, if yes, proceed to the next step, if not, add the corresponding adapter in the peripheral device adaptation layer, and save the adaptation information of the corresponding peripheral device to the virtual slot; S2, connect the peripherals to the middleware through the physical slot; S3, perform peripheral drive control or simulation test control; S3.1, the drive control of the peripherals includes the following steps: S3.1.

1. The application system issues general instructions through the virtual channel. The device bus calls the corresponding virtual slot according to the peripheral information in the general instructions and sends the general instructions to the unified interface of the driver abstraction layer. S3.1.2, the driver abstraction layer sends the general instructions to the peripheral adaptation layer through the unified interface; S3.1.3, the peripheral adaptation layer calls the corresponding adapter, converts the general instruction into a special instruction recognized by the corresponding peripheral, and then sends the special instruction to the peripheral to drive the peripheral to execute the instruction; S3.1.4, after the peripheral executes the instruction to obtain data, it sends the obtained data to the corresponding adapter in the peripheral adaptation layer. The adapter converts the data obtained by the peripheral into a unified standard data format, and then sends it to the unified interface of the driver abstraction layer. Then, the unified format data is sent to the application system through the virtual slot and virtual channel; S3.2, the simulation test control of the peripherals includes the following steps: S3.2.1, the simulation test system sends the test instruction to the device bus through the virtual channel, the device bus obtains the virtual slot of the corresponding peripheral according to the peripheral information of the test instruction, and sends the test instruction to the unified interface of the driver abstraction layer through the virtual slot; S3.2.2, the driver abstraction layer sends the test command to the peripheral adaptation layer through a unified interface; S3.2.

3. The peripheral adaptation layer calls the adapter of the corresponding peripheral to convert the test instruction into an actual instruction that can be recognized by the peripheral, and then sends the actual instruction to the peripheral for functional testing.

Citation Information

Patent Citations

  • Middleware and device for data display and control method

    CN115454422A

  • Design method and system of full-motion flight simulator interface

    CN117851314A