Intelligent gateway and multi-split air conditioning system
By designing a real-time communication driver module and middleware at the operating system kernel layer, the problem of increased hardware and software costs in central air conditioning systems was solved, real-time communication and intelligent requirements were met, and overall costs were reduced.
Patent Information
- Application Number
- CN202410666765.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2025-11-28
AI Technical Summary
The current central air conditioning system uses a combination of Linux system and MCU communication board, which increases hardware costs, software development and maintenance costs, and cannot meet the requirements of real-time and intelligence.
A smart gateway was designed, which includes a real-time communication middleware and a real-time communication driver module. It is deployed at the operating system kernel layer and realizes real-time communication through interrupt handling, reducing the dependence on the MCU communication board.
It enables the real-time requirements of the communication bus to be met within a single operating system, reduces hardware costs, simplifies software development and maintenance, and reduces programming costs.
Smart Images

Figure CN121037162A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of communication technology, in particular to an intelligent gateway and a multi-connected air conditioning system. BACKGROUND
[0002] At present, in a central air conditioning system, a serial port twisted pair is generally used for communication, and a HomeBus special industrial control protocol is generally used for communication. The protocol has a very high real-time requirement for communication, and generally requires that the message receiver must reply ACK (generally within 5ms) as soon as the message is received. Therefore, in order to realize the centralized control of the central air conditioning system, the centralized control gateway of the existing central air conditioning system generally uses an embedded single-chip microcomputer (MCU) system to realize the centralized control.
[0003] However, with the development of intelligent household appliances, the intelligent centralized control requirement of the central air conditioning system is getting higher and higher, especially the requirements of edge computing and big data operation. Therefore, the single-function MCU system cannot meet the diversified intelligent needs of users, such as not supporting screen operation and single communication means. Therefore, it is increasingly required to use a Linux system as a basis to create a new intelligent centralized control gateway of the central air conditioning system.
[0004] However, the HomeBus communication protocol used in the existing central air conditioning system has a very high real-time requirement, and the existing Linux system cannot meet this real-time requirement. In order to solve this problem, the intelligent centralized control gateway of the central air conditioning system generally uses a Linux system main control board and an MCU communication board. The Linux system board is responsible for edge computing and other non-real-time applications, and realizes other more intelligent needs. The MCU communication board is responsible for realizing the HomeBus protocol to meet the real-time communication needs between air conditioning units.
[0005] However, this method greatly increases the hardware cost, needs two circuit boards, greatly increases the software development and maintenance cost, needs to develop and maintain the Linux system software and the MCU communication board software, and increases the software burning cost during product production, and needs to burn two software. SUMMARY
[0006] The present application provides an intelligent gateway, which solves the technical problem of cost increase caused by the use of a system board and a communication board in the prior art.
[0007] To achieve the above purpose, the present application adopts the following technical solutions:
[0008] The present application provides an intelligent gateway, which includes:
[0009] A real-time communication middleware, which includes:
[0010] a user application interface deployed in a user layer of the operating system, configured to provide a calling interface for a user application program;
[0011] a system call interface deployed in a kernel layer of the operating system, configured to provide a calling interface for the operating system; the system call interface communicates with the user application interface;
[0012] The intelligent gateway further comprises:
[0013] a real-time communication driving module deployed in the kernel layer of the operating system, configured to process data from the real-time communication middleware or the communication bus.
[0014] In some embodiments of the present application, the real-time communication driving module is further configured to receive bus data from the communication bus through interrupt processing, and send the received bus data to the real-time communication middleware.
[0015] The real-time communication driving module is further configured to send user data sent by the real-time communication middleware to the communication bus through interrupt processing after receiving the user data.
[0016] In some embodiments of the present application, the real-time communication driving module is further configured to start a data receiving hard interrupt, start a data receiving soft interrupt, read the received bus data from a receiving register after the data receiving soft interrupt is started, and send the received bus data to the real-time communication middleware after the data receiving soft interrupt is started.
[0017] In some embodiments of the present application, the real-time communication driving module is further configured to start a data receiving hard interrupt, start a data receiving soft interrupt, read the received bus data from a receiving register after the data receiving soft interrupt is started, and start a data sending hard interrupt, start a data sending soft interrupt when the data receiving soft interrupt program identifies that the bus data needs to be replied with an ACK, and send the to-be-replied ACK to the communication bus through a sending register by the data sending soft interrupt.
[0018] In some embodiments of the present application, after the data receiving hard interrupt is started, the data receiving hard interrupt bit is masked first, and then the data receiving soft interrupt is started.
[0019] In some embodiments of the present application, the real-time communication driving module is further configured to start a data sending hard interrupt, start a data sending soft interrupt after receiving user data sent by the real-time communication middleware, and send the to-be-sent user data to the communication bus through a sending register by the data sending soft interrupt.
[0020] In some embodiments of the present application, the real-time communication driver module is further configured to, after receiving the user data sent by the real-time communication middleware, check whether there is an ACK being sent, if there is, cache the user data, and if there is not, start a data sending hard interrupt and a data sending soft interrupt, and the data sending soft interrupt sends the user data to be sent to the communication bus through a sending register.
[0021] In some embodiments of the present application, after the data sending soft interrupt is started, the data sending hard interrupt bit is masked first, and then the user data to be sent is sent to the communication bus through the sending register.
[0022] In some embodiments of the present application, the operating system is a Linux operating system.
[0023] The communication bus is a HOMEBUS communication bus.
[0024] The real-time communication driver module is a HOMEBUS real-time communication driver module.
[0025] The real-time communication middleware is a HOMEBUS real-time communication middleware.
[0026] The present application provides a multi-connected air conditioning system comprising the intelligent gateway.
[0027] The intelligent gateway and the multi-connected air conditioning system of the present application have the following technical effects compared with the prior art: the real-time communication driver module disposed in the kernel layer of the operating system can process the bus data from the communication bus in real time, improve the communication efficiency, and meet the real-time requirement of the protocol; the real-time communication middleware comprises a user application interface and a system call interface, the system call interface is disposed in the kernel layer of the operating system and is used to provide a calling interface for the operating system, and the user application interface is disposed in the user layer of the operating system and is used to provide a calling interface for the user application program. Therefore, the intelligent gateway and the multi-connected air conditioning system of the present application realize real-time processing of the communication bus data in the operating system, do not need to additionally set an MCU communication board, reduce the hardware cost, reduce the software development and maintenance cost, reduce the software burning cost, and solve the technical problem of cost increase caused by the system board and the communication board in the prior art.
[0028] Other features and advantages of the present application will become more apparent after reading the specific embodiments of the present application in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort based on these drawings.
[0030] Figure 1 The structural block diagram of one embodiment of the intelligent gateway of the present application;
[0031] Figure 2 The structural block diagram of another embodiment of the intelligent gateway of the present application;
[0032] Figure 3 The structural block diagram of one embodiment of the real-time communication driving module;
[0033] Figure 4 The flow chart of one embodiment of the execution steps of the real-time communication driving module;
[0034] Figure 5 The flow chart of another embodiment of the execution steps of the real-time communication driving module;
[0035] Figure 6 The flow chart of another embodiment of the execution steps of the real-time communication driving module;
[0036] Figure 7 The flow chart of another embodiment of the execution steps of the real-time communication driving module;
[0037] Figure 8 The flow chart of another embodiment of the execution steps of the real-time communication driving module;
[0038] Figure 9 The flow chart of another embodiment of the execution steps of the real-time communication driving module;
[0039] Figure 10 The structural block diagram of the real-time communication driving module;
[0040] Figure 11 The structural block diagram of the real-time communication middleware;
[0041] Figure 12 The flow chart of another embodiment of the execution steps of the real-time communication driving module;
[0042] Figure 13 The flow chart of another embodiment of the execution steps of the real-time communication driving module;
[0043] Figure 14 The communication diagram of the intelligent gateway, the cloud server and the communication bus;
[0044] Figure 15 A structural block diagram of an embodiment of the multi-connected air conditioning system of the present application. DETAILED DESCRIPTION
[0045] The technical solutions in the embodiments of the present application will be clearly and completely described in connection with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort fall within the protection scope of the present application.
[0046] In the description of the present application, it should be understood that the terms "center", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship shown in the drawings based on the orientation or positional relationship shown in the drawings, and are only for the purpose of facilitating the description of the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application.
[0047] The terms "first", "second" are only for descriptive purpose, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, unless otherwise specified, "a plurality of" means two or more.
[0048] In the description of the present application, it should be noted that unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connection" should be understood broadly, for example, it can be fixed connection, or detachable connection, or integrally connected; it can be mechanical connection, or electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, or it can be the communication between two elements. For a person of ordinary skill in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0049] In the present application, unless otherwise explicitly specified and limited, the "above" or "below" of the first feature to the second feature can include that the first and second features are in direct contact, or that the first and second features are not in direct contact but are in contact through another feature between them. Moreover, the "above", "over" and "on" of the first feature to the second feature includes that the first feature is directly above and obliquely above the second feature, or only means that the horizontal height of the first feature is higher than that of the second feature. The "below", "under" and "under" of the first feature to the second feature includes that the first feature is directly below and obliquely below the second feature, or only means that the horizontal height of the first feature is less than that of the second feature.
[0050] The following disclosure provides many different embodiments, or examples, for implementing different structures of the present application. For the purpose of simplicity, the elements and settings of particular examples in the following description are set forth by
[0051] An air conditioner performs a refrigeration cycle and a heating cycle of the air conditioner by using a compressor, a condenser, an expansion valve, and an evaporator, and controls a flow direction of a refrigerant and an opening degree of the expansion valve, etc. by a controller. The refrigeration cycle and the heating cycle include a series of processes involving compression, condensation, expansion, and evaporation, and supply the refrigerant to air that has been adjusted and heat-exchanged.
[0052] The compressor compresses a refrigerant gas in a high-temperature and high-pressure state and discharges the compressed refrigerant gas. The discharged refrigerant gas flows into the condenser. The condenser condenses the compressed refrigerant into a liquid phase, and heat is released to the surrounding environment through the condensation process.
[0053] The expansion valve expands the liquid-phase refrigerant in a high-temperature and high-pressure state condensed in the condenser into a low-pressure liquid-phase refrigerant. The evaporator evaporates the refrigerant expanded in the expansion valve and returns the refrigerant gas in a low-temperature and low-pressure state to the compressor. The evaporator can achieve a refrigeration effect by heat-exchanging with a material to be cooled using latent heat of evaporation of the refrigerant. Throughout the cycle, the air conditioner can adjust the temperature of an indoor space.
[0054] An air conditioner outdoor unit refers to a portion of the refrigeration cycle including the compressor and an outdoor heat exchanger, and an air conditioner indoor unit includes an indoor heat exchanger, and the expansion valve can be provided in the air conditioner outdoor unit or the indoor unit.
[0055] The indoor heat exchanger and the outdoor heat exchanger are used as a condenser or an evaporator. When the indoor heat exchanger is used as a condenser, the air conditioner functions as a heater in a heating mode, and when the indoor heat exchanger is used as an evaporator, the air conditioner functions as a cooler in a cooling mode.
[0056] Embodiment one,
[0057] The intelligent gateway of the embodiment includes a real-time communication middleware and a real-time communication driver module, etc.
[0058] The real-time communication middleware includes a user application interface and a system call interface, as shown in Figure 1 the drawing.
[0059] A user application interface is disposed in a user layer of the operating system, and is configured to provide a calling interface for a user application program.
[0060] A system calling interface is disposed in a kernel layer of the operating system, and is configured to provide a calling interface for the operating system; the system calling interface communicates with the user application interface.
[0061] A real-time communication driving module is disposed in the kernel layer of the operating system, and is configured to process data from the real-time communication middleware or the communication bus.
[0062] The real-time communication driving module is disposed in the kernel layer of the operating system, and can process bus data from the communication bus in real time, without sending the bus data to the user layer for processing, thereby improving communication efficiency and meeting real-time requirements of the communication bus protocol.
[0063] The system calling interface of the real-time communication middleware provides a serial communication interface that meets calling requirements of the operating system; the user application program can operate the serial communication interface in the same way as operating a general serial communication interface, so that the bus data can be transmitted from the kernel layer to the user layer for use by the user application program.
[0064] The user application interface of the real-time communication middleware provides an interface of serial communication function; the user application program uses the interface to set actions of serial communication, obtain states, exchange transmitted and received data, and the like, by operating system calling functions.
[0065] The smart gateway of the embodiment has the operating system installed on the system board, the user application interface of the real-time communication middleware disposed in the user layer of the operating system, the system calling interface of the real-time communication middleware disposed in the kernel layer of the operating system, and the real-time communication driving module, so that the real-time communication bus data is processed in the operating system.
[0066] The smart gateway of the embodiment can process bus data from the communication bus in real time by designing the real-time communication driving module disposed in the kernel layer of the operating system, thereby improving communication efficiency and meeting real-time requirements of the protocol; the real-time communication middleware includes the user application interface and the system calling interface; the system calling interface is disposed in the kernel layer of the operating system, and is configured to provide a calling interface for the operating system; the user application interface is disposed in the user layer of the operating system, and is configured to provide a calling interface for the user application program. Therefore, the smart gateway of the embodiment processes the real-time communication bus data in the operating system, without additionally setting the MCU communication board, thereby reducing hardware cost, software development and maintenance cost, and software burning cost, and solving the technical problem of cost increase caused by the system board and the communication board in the prior art.
[0067] The intelligent gateway of the embodiment can easily realize the real-time bus communication protocol in a single operating system, that is, support the real-time bus communication protocol, so that the intelligent gateway for controlling the air conditioner can be constructed by using a single operating system, without continuing to use the combination of the operating system board and the communication board, thereby greatly reducing the hardware cost of the user, simplifying the existing complex technical architecture, and saving the software development and maintenance cost of the user.
[0068] The system board of the intelligent gateway is provided with a serial communication interface, one end of which communicates with the real-time communication driving module, and the other end is used for connecting with the communication bus, as shown in Figure 2 .
[0069] In some embodiments of the application, the real-time communication driving module is further used for receiving the bus data from the communication bus through interrupt processing, and sending the received bus data to the real-time communication middleware.
[0070] In some embodiments of the application, the real-time communication driving module is further used for sending the user data to the communication bus through interrupt processing after receiving the user data sent by the real-time communication middleware.
[0071] The data interaction between the real-time communication driving module and the communication bus is carried out by using interrupt processing, which improves the work efficiency and ensures the real-time of data interaction.
[0072] The receiving processing flow of the real-time communication driving module specifically includes the following steps, as shown in Figure 4 .
[0073] Step S11: The local device (indoor unit or outdoor unit) sends data to the communication bus.
[0074] Step S12: After the real-time communication driving module detects that there is data on the communication bus, the bus data from the communication bus is received through interrupt processing.
[0075] Step S13: The real-time communication driving module sends the received bus data to the real-time communication middleware. Then the real-time communication middleware sends the received data to the cloud server, and sends the data to the user through the cloud server.
[0076] The sending processing flow of the real-time communication driving module specifically includes the following steps, as shown in Figure 5 .
[0077] Step S21: The real-time communication driving module receives the user data sent by the real-time communication middleware.
[0078] Step S22: The real-time communication driving module sends the user data to the communication bus through interrupt processing.
[0079] The real-time communication driver module is installed with a hard interrupt handler and a soft interrupt handler, as shown in Figure 3 .
[0080] In some embodiments of the present application, the real-time communication driver module is further configured to, after receiving the interrupt request signal, start a data receiving hard interrupt, start a data receiving soft interrupt, read the received bus data from the receiving register after the data receiving soft interrupt is started, and send the received bus data to the real-time communication middleware.
[0081] Therefore, the real-time communication driver module specifically performs the following steps, as shown in Figure 6 .
[0082] Step S31: The real-time communication driver module starts a data receiving hard interrupt after receiving the interrupt request signal.
[0083] Step S32: The data receiving soft interrupt is started after the data receiving hard interrupt is started.
[0084] In some embodiments of the present application, after the data receiving hard interrupt is started, the data receiving hard interrupt bit is first masked, and then the data receiving soft interrupt is started, so as to prevent the data receiving hard interrupt from being repeatedly triggered during data receiving, thereby affecting the response of other interrupts.
[0085] Step S33: The data receiving soft interrupt is started, and the received bus data is read from the receiving register.
[0086] Step S34: The received bus data is sent to the real-time communication middleware.
[0087] The real-time communication driver module reads the bus data by performing the above steps S31-S34, which has high work efficiency and ensures the real-time performance of the received data.
[0088] In some embodiments of the present application, the real-time communication driver module is further configured to, after receiving the interrupt request signal, start a data receiving hard interrupt, start a data receiving soft interrupt, read the received bus data from the receiving register after the data receiving soft interrupt is started, and start a data sending hard interrupt and a data sending soft interrupt when the data receiving soft interrupt program identifies that the bus data needs to be replied with an ACK in real time, and the data sending soft interrupt sends the to-be-replied ACK to the communication bus through the sending register.
[0089] Therefore, the real-time communication driver module specifically performs the following steps, as shown in Figure 7 .
[0090] Step S41: The real-time communication driver module starts a data receiving hard interrupt after receiving the interrupt request signal.
[0091] Step S42: after starting the data receiving hard interrupt, start the data receiving soft interrupt.
[0092] In some embodiments of the present application, after starting the data receiving hard interrupt, the data receiving hard interrupt bit is first masked, and then the data receiving soft interrupt is started, so as to prevent the data receiving hard interrupt from being repeatedly triggered during data receiving, thereby affecting the response of other interrupts.
[0093] Step S43: after starting the data receiving soft interrupt, read the received bus data from the receiving register.
[0094] Step S44: when the data receiving soft interrupt program identifies that the bus data needs to be replied with ACK in real time, start the data sending hard interrupt.
[0095] Step S45: after starting the data sending hard interrupt, start the data sending soft interrupt.
[0096] In some embodiments of the present application, after starting the data sending soft interrupt, the data sending hard interrupt bit is first masked, and then the user data to be sent is sent to the communication bus through the sending register, so as to prevent the data sending hard interrupt from being repeatedly triggered during data sending, thereby affecting the response of other interrupts.
[0097] Step S46: the ACK to be replied by the data sending soft interrupt is sent to the communication bus through the sending register.
[0098] Acknowledgement character (ACK) is a transmission class control character sent by a receiving party to a sending party in data communication, indicating that the data sent has been confirmed to be received correctly.
[0099] The real-time communication driving module reads bus data by using hard interrupt and soft interrupt, has high working efficiency, and guarantees the real-time performance of received data by executing the above steps S41-S46; when bus data needs to be replied with ACK in real time, the real-time performance of the replied ACK is guaranteed by using hard interrupt and soft interrupt to send ACK.
[0100] In some embodiments of the present application, the real-time communication driving module is further configured to, after receiving user data sent by the real-time communication middleware, start the data sending hard interrupt, start the data sending soft interrupt, and send the user data to be sent to the communication bus through the sending register by the data sending soft interrupt.
[0101] Therefore, the real-time communication driving module specifically executes the following steps, which are shown in FIG. 8. Figure 8
[0102] Step S51: after receiving user data sent by the real-time communication middleware, start the data sending hard interrupt.
[0103] Step S52: after starting the data sending hard interrupt, start the data sending soft interrupt.
[0104] In some embodiments of the present application, after starting the data sending soft interrupt, the data sending hard interrupt bit is first masked, and then the user data to be sent is sent to the communication bus through the sending register, so as to prevent the data sending hard interrupt from being repeatedly triggered during data sending, thereby affecting the response of other interrupts.
[0105] Step S53: the data sending soft interrupt sends the user data to be sent to the communication bus through the sending register.
[0106] The real-time communication driving module sends the user data to the communication bus by using the hard interrupt and the soft interrupt through executing the above steps S51-S53, and has high working efficiency and ensures the real-time performance of the sent data.
[0107] In some embodiments of the present application, the real-time communication driving module is further configured to, after receiving the user data sent by the real-time communication middleware, check whether there is an ACK being sent at present, if yes, buffer the user data, and if no, start the data sending hard interrupt, start the data sending soft interrupt, and the data sending soft interrupt sends the user data to be sent to the communication bus through the sending register.
[0108] Therefore, the real-time communication driving module specifically executes the following steps, which are shown in FIG. 6. Figure 9
[0109] Step S61: after receiving the user data sent by the real-time communication middleware, check whether there is an ACK being sent at present.
[0110] If yes, execute step S62: buffer the user data, and return to step S61.
[0111] If no, execute step S63: start the data sending hard interrupt.
[0112] Step S64: after starting the data sending hard interrupt, start the data sending soft interrupt.
[0113] In some embodiments of the present application, after starting the data sending soft interrupt, the data sending hard interrupt bit is first masked, and then the user data to be sent is sent to the communication bus through the sending register, so as to prevent the data sending hard interrupt from being repeatedly triggered during data sending, thereby affecting the response of other interrupts.
[0114] Step S65: the data sending soft interrupt sends the user data to be sent to the communication bus through the sending register.
[0115] The real-time communication driving module, by executing the above steps S61-S65, buffers the user data when the ACK is being sent, to ensure the real-time reply of the ACK; and after the ACK is sent, sends the user data to the communication bus by using the hard interrupt and the soft interrupt, so as to improve the working efficiency and ensure the real-time sending of the data.
[0116] In some embodiments of the application, the operating system is a Linux operating system. The Linux operating system is a multi-user, multi-task, multi-thread and multi-CPU operating system, which can maximize the adaptation to the user's needs.
[0117] In some embodiments of the application, the communication bus is a HOMEBUS communication bus, the real-time communication driving module is a HOMEBUS real-time communication driving module, and the real-time communication middleware is a HOMEBUS real-time communication middleware.
[0118] The real-time communication driving module and the communication bus exchange data through the HOMEBUS communication protocol, to ensure the stability, security and real-time performance of the communication.
[0119] The real-time communication driving module and the real-time communication middleware exchange data through the HOMEBUS communication protocol, to ensure the stability, security and real-time performance of the communication.
[0120] The intelligent gateway of the embodiment designs a new HOMEBUS communication framework in the Linux operating system, so that the single Linux operating system can support the HOMEBUS communication protocol with high real-time requirement, which mainly includes the HOMEBUS real-time communication driving module, the HOMEBUS real-time communication middleware and other functional modules.
[0121] The HOMEBUS real-time communication driving module is installed with the HOMEBUS real-time communication driving software.
[0122] The software architecture of the HOMEBUS real-time communication driving module: the driving program is located in the Linux kernel layer, which is responsible for receiving the HOMEBUS protocol data from the serial communication interface, and is responsible for the real-time processing of the HOMEBUS protocol, without having to be processed by the application layer program of the Linux user layer as the traditional Linux driving program, so as to improve the communication efficiency and meet the real-time requirement of the protocol.
[0123] The architecture of the HOMEBUS real-time communication driver module is different from that of the common Linux serial communication driver module. The real-time serial communication protocol processing required by the real-time serial communication protocol is performed by the real-time communication serial transceiver interrupt program. The serial protocol transceiving (including ACK transceiving, retransmission, and collision control) and carrier detection are performed through interrupt processing. The transceiving data is shared with the middleware through Linux operating system calls (open / close / read / write / ioctl). The internal architecture of the real-time communication driver module is shown in Figure 10 .
[0124] The HOMEBUS real-time communication middleware is divided into two parts: a system call interface and a user application interface, which are located in the kernel layer and the user layer, respectively.
[0125] The kernel layer part (i.e., the system call interface of the real-time communication middleware) mainly provides a system call interface (real-time serial communication interface) that meets the requirements of the Linux system call. The user application program can operate the real-time serial communication interface in the same way as operating the common serial communication interface, so as to meet the requirement that the HOMEBUS protocol data can be transmitted from the kernel layer to the user layer for use by the user application program.
[0126] The user layer part (i.e., the user application interface of the real-time communication middleware) mainly provides an operation interface for the user application program, so that the user application program can operate the real-time serial communication interface in the same way as operating the common serial communication interface, i.e., the user's application program can be implemented by using the standard Linux programming method without special modification and customization.
[0127] The user layer part (i.e., the user application interface of the real-time communication middleware) provides a serial communication function application program interface for the user. The user application program uses the interface to perform real-time serial communication action setting, state acquisition, and data exchange through Linux system calls (open / close / read / write / ioctl). The architecture of the real-time communication middleware is shown in Figure 11 .
[0128] In some embodiments of the present application, the intelligent gateway further includes an application programming interface (API) that mainly provides various standard Linux API programming interfaces for the user application program.
[0129] The application programming interface provides a programming interface for the user application program, and the application programming interface is connected with the user application interface of the real-time communication middleware, as shown in Figure 2 .
[0130] A user application communicates with a user application interface of the real-time communication middleware through an application programming interface (API), and serial communication is performed through Linux system calls.
[0131] The intelligent gateway of the embodiment implements a technology of supporting a real-time HOMEBUS communication protocol in a Linux system, and supports the HOMEBUS communication protocol in a single Linux system by designing a brand-new HOMEBUS communication software architecture. The new HOMEBUS communication software architecture mainly includes two layers. One is a brand-new HOMEBUS real-time communication driver software designed in a Linux kernel layer, which performs real-time HOMEBUS communication protocol transceiving (including ACK transceiving, retransmission, collision control) and carrier detection through interrupt processing of the kernel layer. The other is a HOMEBUS communication middleware designed in a Linux user layer, which does not depend on a specific OS system and provides an application programming interface of real-time serial communication function.
[0132] The real-time communication driver module has a data receiving module and a data sending module. The data receiving module is configured to receive data from the serial communication interface, and the data sending module is configured to send data to the serial communication interface.
[0133] The data receiving process of the real-time communication driver module will be described below in combination with Figure 12
[0134] (1) When the serial communication interface receives data on the HOMEBUS bus, a data receiving hardware interrupt program is first triggered.
[0135] (2) After the data receiving hardware interrupt program is triggered, it immediately masks the data receiving hardware interrupt bit to prevent the serial communication interface from repeatedly triggering the data receiving hardware interrupt during data receiving, thereby affecting the response of other interrupts, and then starts a data receiving software interrupt program.
[0136] (3) After the data receiving software interrupt is started, it continuously reads data transmitted by the HOMEBUS bus from the receiving register until all the data is read.
[0137] (4) After the data receiving software interrupt receives a frame of HOMEBUS data, it identifies whether the data frame needs to reply an ACK immediately. If the ACK needs to be replied immediately, the data receiving module notifies the data sending module to stop the current sending task, enables the data sending hardware interrupt, and triggers the data sending hardware interrupt.
[0138] (5) After the data sending hard interrupt is started, the data sending soft interrupt is started immediately. After the data sending soft interrupt is started, the data sending hard interrupt bit is shielded. Then the data sending soft interrupt sends the ACK to be replied to the HOMEBUS bus through the sending register, so that the real-time requirement of the HOMEBUS protocol is realized.
[0139] The data sending process of the real-time communication driving module is described below. Figure 13
[0140] (1) After the HOMEBUS real-time communication middleware delivers data to the HOMEBUS real-time communication driving module from the user layer, the data sending module of the HOMEBUS real-time communication driving module first checks whether there is ACK real-time data to be sent currently.
[0141] (2) If there is ACK real-time data to be sent, the user data frame to be sent is buffered first.
[0142] (3) After a period of time (for example, 5 ms), whether there is still ACK data to be sent is detected again. If not, the ACK data has been sent completely, and the data sending module starts the data sending hard interrupt, so that the data sending hard interrupt program is started.
[0143] (4) After the data sending hard interrupt is started, the data sending soft interrupt is started immediately. After the data sending soft interrupt is started, the data sending hard interrupt bit is shielded. Then the data sending soft interrupt sends the data to be sent to the HOMEBUS bus through the sending register.
[0144] The intelligent gateway of the embodiment is used for controlling a central air conditioner. The intelligent gateway realizes the technology of supporting the real-time HOMEBUS protocol in a Linux operating system. The real-time HOMEBUS communication protocol can be supported in a single general Linux system, so that the intelligent gateway of the central air conditioner system can be constructed by using a single Linux operating system, and the combination of the Linux operating system and the MCU single-chip microcomputer system is no longer needed. The hardware cost of the user can be greatly reduced, and the existing complex technical architecture is simplified, and the software development and maintenance cost of the user is saved.
[0145] The intelligent gateway of the embodiment only needs a Linux system board, and does not need to additionally increase an MCU communication board. The HomeBus real-time communication protocol is realized in the Linux system, so that the Linux system can meet part of the real-time communication scenes. The user can use a Linux system board to meet the communication with the cloud server, the host computer, the APP and the real-time communication demand with the air conditioner indoor and outdoor units. The hardware cost, the software development and maintenance cost of the user are reduced. See Figure 14 As shown.
[0146] Embodiment two,
[0147] Based on the design of the intelligent gateway of embodiment one, embodiment two provides a multi-connected air conditioning system, comprising the intelligent gateway.
[0148] The multi-connected air conditioning system comprises an outdoor unit, an indoor unit, an intelligent gateway, and the like, as shown in Figure 15 As shown.
[0149] The intelligent gateway communicates with the outdoor unit and the indoor unit through the HomeBus communication bus.
[0150] The multi-connected air conditioning system of the embodiment reduces the hardware cost, the software development and maintenance cost, and the software burning cost by using the intelligent gateway.
[0151] In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0152] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A smart gateway, characterized in that, include: Real-time communication middleware, which includes: User application interfaces are deployed in the user layer of the operating system and are used to provide calling interfaces for user applications. The system call interface is deployed in the kernel layer of the operating system and is used to provide a call interface for the operating system; the system call interface communicates with the user application interface. The smart gateway also includes: A real-time communication driver module, deployed in the kernel layer of the operating system, is used to process data from the real-time communication middleware or communication bus.
2. The smart gateway according to claim 1, characterized in that: The real-time communication driver module is also used to receive bus data from the communication bus through interrupt processing, and send the received bus data to the real-time communication middleware. It is also used to send the user data to the communication bus through interrupt processing after receiving the user data sent by the real-time communication middleware.
3. The smart gateway according to claim 2, characterized in that: The real-time communication driver module is also used to start a data reception hard interrupt and a data reception soft interrupt after receiving an interrupt request signal. After the data reception soft interrupt is started, it reads the received bus data from the receive register and sends the received bus data to the real-time communication middleware.
4. The smart gateway according to claim 2, characterized in that: The real-time communication driver module is also used to start a data reception hard interrupt and a data reception soft interrupt after receiving an interrupt request signal. After the data reception soft interrupt is started, it reads the received bus data from the receive register. When the data reception soft interrupt program recognizes that the bus data needs to be replied to in real time with an ACK, it starts a data transmission hard interrupt and a data transmission soft interrupt. The data transmission soft interrupt sends the ACK to be replied to to the communication bus through the transmit register.
5. The smart gateway according to claim 3 or 4, characterized in that: After the data reception hardware interrupt is started, the data reception hardware interrupt bit is first masked, and then the data reception software interrupt is started.
6. The smart gateway according to claim 2, characterized in that: The real-time communication driver module is also used to initiate a data transmission hard interrupt and a data transmission soft interrupt after receiving user data sent by the real-time communication middleware. The data transmission soft interrupt sends the user data to be sent to the communication bus through the transmission register.
7. The smart gateway according to claim 2, characterized in that: The real-time communication driver module is also used to check whether an ACK is being sent after receiving user data sent by the real-time communication middleware. If so, the user data is buffered; otherwise, a data transmission hardware interrupt is started and a data transmission software interrupt is started. The data transmission software interrupt sends the user data to be sent to the communication bus through the transmission register.
8. The smart gateway according to claim 6 or 7, characterized in that: After the data transmission software interrupt is started, the data transmission hardware interrupt bit is first masked, and then the user data to be transmitted is sent to the communication bus through the transmission register.
9. The smart gateway according to claim 1, characterized in that: The operating system is Linux. The communication bus is the HOMEBUS communication bus. The real-time communication driver module is the HOM EBUS real-time communication driver module. The real-time communication middleware is HOM EBUS real-time communication middleware.
10. A multi-split air conditioning system, characterized in that, Including the smart gateway as described in any one of claims 1 to 9.