Double-temperature controller port expansion method, device and equipment and computer readable medium
By synchronizing the communication protocols of the main and auxiliary temperature controllers and flexibly configuring port functions, the problem of poor expandability of temperature controller functions is solved. This enables flexible expansion and convenient control of the temperature controller's functional interface, reduces expansion costs, and improves system stability and compatibility.
Patent Information
- Application Number
- CN202411102059.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-08-12
AI Technical Summary
Existing temperature controllers suffer from poor functional expandability due to the limited number of 24V function interfaces. Traditional hardware modification methods are costly, inconvenient, and have compatibility issues.
By synchronizing the communication protocols of the main and auxiliary temperature controllers, the port functions can be flexibly configured. The communication protocol is used to determine and transmit data flags, enabling the auxiliary temperature controller to execute or the main temperature controller to synchronize port functions, thus avoiding hardware modifications.
It enables flexible expansion of the thermostat's functional interface, reduces expansion costs, improves system stability and compatibility, meets diverse application needs, and provides a convenient temperature control experience.
Smart Images

Figure CN119002228A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of port expansion technology, and in particular to a dual-temperature controller port expansion method, device, equipment and computer-readable medium. Background Art
[0002] A thermostat is an electronic device that controls the operation of a device by turning on or off the internal electronic components according to the temperature change of the working environment. It is mainly used to control the start and stop of heating or cooling equipment to achieve a preset temperature value. At present, the thermostat is directly limited in its functional expansibility due to the limitation of the number of 24V functional interfaces. With the growing application demand, the traditional method mainly adds interfaces by modifying the hardware circuit design and molds, which is not only time-consuming and labor-intensive, but also increases the complexity and cost of product updates and iterations, and may cause compatibility issues. In order to cope with this dilemma, although solutions such as interface expansion boards or adapter boxes have appeared on the market, they also require customized circuit design and fail to fundamentally simplify the process and cost. Therefore, there is an urgent need for a solution that can flexibly and efficiently expand the functional interface without changing the original main design of the thermostat, while ensuring the compatibility and upgrade convenience of the product.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The present application provides a dual-thermostat port expansion method, device, equipment and computer-readable medium to solve the above-mentioned technical problem of "expanding the interface of the thermostat through hardware modification leads to high expansion cost and low convenience".
[0005] According to one aspect of an embodiment of the present application, the present application provides a dual-thermostat port expansion method, including: configuring the port functions corresponding to the signal output ports of the main thermostat and the sub-thermostat according to user needs; determining whether the communication protocol between the main thermostat and the sub-thermostat has a data flag of the port function; if so, transmitting the data flag to the sub-thermostat based on the communication protocol through the main thermostat; determining whether the signal output port corresponding to the port function is opened or closed through the logic of the sub-thermostat executing the port function; if not, determining whether the signal output port corresponding to the port function is opened or closed through the logic of the port function executing the port function through the main thermostat; if the port function is configured on the sub-thermostat, synchronizing the signal status of the port function to the sub-thermostat.
[0006] Optionally, configuring the port functions corresponding to the signal output ports of the main thermostat and the sub-thermostat according to user needs includes: determining user needs; setting the port functions corresponding to the main thermostat and the sub-thermostat according to the user needs; and configuring the communication protocol between the main thermostat and the sub-thermostat based on the port functions.
[0007] Optionally, the determining whether the communication protocol between the main thermostat and the sub-thermostat contains the data flag of the port function comprises: obtaining the communication protocol between the main thermostat and the sub-thermostat; parsing the communication protocol to obtain all data flags contained in the communication protocol; matching all the data flags with the data flags of the port function to be expanded; if the match is successful, the communication protocol contains the data flag of the port function to be expanded, and if the match fails, the communication protocol does not contain the data flag of the port function to be expanded.
[0008] Optionally, transmitting the data flag to the slave temperature controller through the main temperature controller based on the communication protocol includes: packing the data flag of the port function into a data packet in a format supported by the communication protocol; sending the data packet to the slave temperature controller based on the communication protocol through the main temperature controller; and the slave temperature controller parsing the data packet after receiving it, and updating the configuration information of the internal port function of the slave temperature controller.
[0009] Optionally, the logic of executing the port function through the auxiliary temperature controller to determine the opening and closing of the signal output port corresponding to the port function includes: calling the logic control instruction of the logic corresponding to the port function; executing the logic control instruction through the auxiliary temperature controller; and determining whether to open or close the signal output port corresponding to the port function according to the execution result of the logic control instruction.
[0010] Optionally, the logic of executing the port function through the main thermostat to determine whether the signal output port corresponding to the port function is opened or closed includes: calling the logic control instruction of the logic corresponding to the port function; executing the logic control instruction through the main thermostat; and determining whether to open or close the signal output port corresponding to the port function according to the execution result of the logic control instruction.
[0011] Optionally, if the port function is configured on the secondary thermostat, the signal status of the port function is synchronized to the secondary thermostat, including: determining that the port function is configured on the secondary thermostat; retrieving the signal status corresponding to the port function; and synchronizing the signal status of the port function to the secondary thermostat through the main thermostat.
[0012] According to another aspect of the embodiment of the present application, the present application provides a dual-temperature controller port expansion device, including: a function configuration module, used to configure the port functions corresponding to the signal output ports of the main thermostat and the sub-temperature controller according to user requirements; a data judgment module, used to judge whether there is a data flag of the port function in the communication protocol between the main thermostat and the sub-temperature controller; a data transmission module, used to transmit the data flag to the sub-temperature controller based on the communication protocol through the main thermostat; a first logic judgment module, used to judge the opening and closing of the signal output port corresponding to the port function through the logic of the sub-temperature controller; a second logic judgment module, used to judge the opening and closing of the signal output port corresponding to the port function through the logic of the main thermostat; a signal synchronization module, used to synchronize the signal status of the port function to the sub-temperature controller when the port function is configured on the sub-temperature controller.
[0013] According to another aspect of an embodiment of the present application, the present application provides an electronic device, including a memory, a processor, a communication interface and a communication bus, wherein the memory stores a computer program that can be run on the processor, the memory and the processor communicate through the communication bus and the communication interface, and the processor implements the steps of the above-mentioned dual thermostat port expansion method when executing the computer program.
[0014] According to another aspect of the embodiments of the present application, the present application also provides a computer-readable medium having a non-volatile program code executable by a processor, and the program code enables the processor to execute the above-mentioned dual-thermostat port expansion method.
[0015] The above technical solution provided by the embodiment of the present application has the following advantages compared with the related art:
[0016] This application extends the new functional interface to the sub-thermostat by distinguishing the main and sub-line controllers within the program, and synchronizes the functional interface data to the corresponding thermostat function port through communication, so that the functional interface can be at least doubled. Flexible port function configuration allows the port functions corresponding to the signal output ports of the main thermostat and the sub-thermostat to be flexibly configured according to user needs to meet the needs of different application scenarios. It is determined whether the communication protocol between the main thermostat and the sub-thermostat supports the port function data flag to be expanded, so as to decide whether to execute the corresponding logic through the main thermostat or the sub-thermostat, which greatly reduces the workload of manual configuration and debugging. After confirming that the communication protocol is supported, the data flag of the port function is transmitted to the sub-thermostat through the main thermostat, or when the main thermostat executes the logic, the signal state is synchronized to the sub-thermostat, ensuring the data consistency and real-time performance between the two. Whether the main thermostat or the sub-thermostat executes the logic of the port function, it realizes the precise management of temperature control by calling the logic control instruction, executing the instruction and judging the opening and closing of the signal output port according to the execution result. The entire expansion process does not require changes to the hardware circuit design or mold, which reduces costs and avoids compatibility issues that may be caused by hardware changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0019] Figure 1 A schematic diagram of a dual-temperature controller port expansion method according to an embodiment of the present application;
[0020] Figure 2 A schematic diagram of a connection method between a main thermostat and a sub-thermostat provided according to an embodiment of the present application;
[0021] Figure 3 A block diagram of a dual-temperature controller port expansion device provided according to an embodiment of the present application;
[0022] Figure 4 A schematic diagram of an optional electronic device structure provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0024] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application and have no specific meaning. Therefore, "module" and "component" can be used interchangeably.
[0025] In the related art, the functional port expansion of the temperature controller is mainly carried out through hardware modification, which has high modification cost and low convenience.
[0026] In order to solve the problems mentioned in the background technology, according to one aspect of the embodiments of the present application, reference is made to Figure 1 As shown, a dual temperature controller function port expansion method is provided, including:
[0027] Step S102, configuring the port functions corresponding to the signal output ports of the main thermostat and the sub-thermostat according to user requirements.
[0028] Further, step S102 includes:
[0029] Identify user needs;
[0030] Set the port functions of the main thermostat and sub-thermostat according to user needs;
[0031] This embodiment mainly expands the function port of the dual thermostat, and realizes the function port expansion of the dual thermostat by communicating and synchronizing the function port data to the function interface of the dual thermostat. The dual thermostat mainly includes a main thermostat and a sub-thermostat. The main thermostat is a host computer. This embodiment synchronizes the control function signal through the communication between the sub-thermostat and the host computer. When the dual temperature controller needs to add new functions, there is no need to change the hardware interface of the dual temperature controller. First, determine the user's needs, and collect the user's specific needs for the thermostat function port through the user interaction interface, including the device that the user wants the port to control, such as a humidifier, a dehumidifier, and an air conditioner, and the control logic of these devices, and the control logic includes automatic switching of temperature, humidity and other conditions. After obtaining the user's needs, the corresponding function is assigned to each port of the main thermostat and the sub-thermostat according to the obtained user needs, including recording the configuration information of each port in the internal database of the thermostat. Since the main thermostat and the sub-thermostat need to be synchronized, the set port function information needs to be able to be shared or synchronized by the two thermostats. After determining the port function of each port, configure the communication protocol between the main thermostat and the sub-thermostat according to the port function, including determining the information that needs to be transmitted between the two thermostats, including port function configuration information, real-time status information, and control instructions. The configuration of the communication protocol is the key to ensure that the two thermostats can synchronize information efficiently and accurately. By configuring the communication protocol reasonably, the redundancy and errors of data transmission can be reduced, and the overall performance and stability of the system can be improved.
[0032] Specifically, the main thermostat a includes n 24V signal output ports, namely X1, ..., X n The auxiliary thermostat b also includes n 24V signal output ports, namely X n+1 , ..., X 2n Among them, each signal output terminal can be connected to a functional device, but the functions corresponding to the signal output ports of the auxiliary thermostat and the main thermostat are the same, so the 2n signal output ports of the dual thermostat can realize the role of n functions. The functional devices include humidifiers, dehumidifiers, temperature control systems, etc., and X1, ..., X2 can be configured according to user needs. 2n The port function of the signal output port. Figure 2The figure shows the connection mode between the main thermostat a and the sub-thermostat b before the port function expansion of the dual thermostat and the connection mode between the main thermostat a and the sub-thermostat b after the port function expansion. Before the port function expansion, the signal output terminal corresponding to the sub-thermostat b is connected with the signal output terminal of the main thermostat a. After the port function expansion is performed by means of the communication synchronization function, the signal output ports of the sub-thermostat b and the main thermostat a are not connected together. However, the connection mode between the main thermostat a and the sub-thermostat b is changed through a program instead of directly changing the hardware connection mode between the main thermostat a and the sub-thermostat b.
[0033] In this embodiment, for example, the user hopes to control six different environmental devices in a smart home environment through the main thermostat and the sub-thermostat, including a humidifier, a dehumidifier, a hot air blower, an air purifier, an intelligent fan, and a floor heating. However, the main thermostat and the sub-thermostat each have only three signal output ports, and the three signal output ports of the main thermostat are X1, X2, and X3, respectively, and the three signal output ports of the sub-thermostat are X4, X5, and X6. Among them, the port functions of the signal output port X1 and the signal output port X4 are the same, and the corresponding functional devices are all humidifiers, the port functions of the signal output port X2 and the signal output port X5 are the same, and the corresponding functional devices are all dehumidifiers, and the port functions of the signal output port X3 and the signal output port X6 are the same, and the corresponding functional devices are all hot air blowers. The user hopes to expand the function of the main thermostat to realize the control of the remaining air purifiers, intelligent fans, and floor heating. Reconfigure the port functions corresponding to the signal output port X1, signal output port X2, signal output port X3, signal output port X4, signal output port X5 and signal output port X6 respectively. For example, in this embodiment, the port functions of the three signal output ports of the main thermostat are reconfigured, and the original port functions of the three signal output ports are retained corresponding to the auxiliary thermostat. The corresponding relationship between each reconfigured signal output port and its port signal is that the functional device corresponding to the signal output port X1 is an air purifier, the functional device corresponding to the signal output port X2 is an intelligent fan, the functional device corresponding to the signal output port X3 is floor heating, the functional device corresponding to the signal output port X4 is a humidifier, the functional device corresponding to the signal output port X5 is a dehumidifier, and the functional device corresponding to the signal output port X6 is a hot air blower. The corresponding relationship between the signal output port and the functional device is set in the communication protocol, and the data flag bit and control code of the port function corresponding to each new functional device are defined in the communication protocol to represent and transmit the control signal of the main thermostat to the newly added device.
[0034] In the above implementation, the user can freely configure the function of each port according to actual needs without being limited by the preset function of the thermostat, so that the thermostat can adapt to more diverse application scenarios and user needs. By expanding the functional port of the thermostat and allowing the user to customize the port function, it provides great convenience for the functional expansion of the thermostat, and the function of the thermostat can be easily expanded through software upgrades or configuration adjustments when new devices are added or user needs change. By reasonably configuring the communication protocol between the main thermostat and the sub-thermostat, it can be ensured that the two thermostats maintain a high degree of consistency in function execution, which not only improves the stability and reliability of the system, but also allows users to view and control the status of the entire system on any thermostat. Functional expansion is achieved through software configuration and communication protocol adjustment, which greatly reduces the cost of transformation and time cost. At the same time, since there is no need to replace hardware equipment, it also reduces resource waste and environmental pollution. By reconfiguring the signal output port function of the main thermostat, it is possible to control more types of environmental equipment such as air purifiers, smart fans and floor heating without adding additional hardware equipment, which significantly improves the functional flexibility and scalability of the temperature control system and meets the diverse smart home control needs of users. On the basis of retaining the original functions of the sub-thermostat, the idle port resources of the main thermostat are fully utilized to avoid duplication and waste of resources. The new data flags and control codes defined in the communication protocol ensure information synchronization and coordination between the main thermostat and the sub-thermostat, as well as between them and various environmental devices, which helps to build a more stable, reliable and efficient smart home environment control system.
[0035] Step S104, determining whether the communication protocol between the main thermostat and the slave thermostat has a data flag bit for the port function.
[0036] Further, step S104 includes:
[0037] Get the communication protocol between the main thermostat and the sub-thermostat;
[0038] Parse the communication protocol to obtain all data flags contained in the communication protocol;
[0039] Match all data flags with the data flags of the port function to be expanded;
[0040] If the match is successful, the communication protocol has a data flag bit of the port function to be expanded; if the match fails, the communication protocol does not have a data flag bit of the port function to be expanded.
[0041] Specifically, it is determined whether the communication protocol between the main thermostat and the auxiliary thermostat has a signal output port X. aBy reading the communication protocol file stored in the device, all the rules and conventions required for communication between the main thermostat and the sub-thermostat are obtained. The communication protocol contains multiple data fields and flags, which are used to transmit various information between devices. The communication protocol is parsed to identify and extract all data flags used to represent different information, including device status, control instructions, sensor data, etc. All data flags are combined with the signal output port X to be expanded. a The data flag of the port function is matched. If the match is successful, the communication protocol has the data flag of the port function to be expanded. If the match fails, the communication protocol does not have the data flag of the port function to be expanded. In this embodiment, the current communication protocol specification is extracted from the configuration file of the thermostat, and the protocol document is parsed using a custom script to list all defined data flags and their functional descriptions. The data flags required for the new functions (air purifier, smart fan, floor heating) are compared with the data flags in the existing protocol. If a matching data flag is found, the match is successful; otherwise, the match fails, and the matching of data flags is achieved by redefining unused flags or adding new flags.
[0042] In the above implementation, by parsing and matching the data flags in the communication protocol, it is possible to quickly determine whether the communication protocol supports the newly added port function, thereby avoiding the tedious process of manual inspection and configuration and improving configuration efficiency. A strict matching process is used to ensure that the newly added port function will not conflict or be incompatible with the existing communication protocol, thereby ensuring the stability and reliability of the system. By determining in advance whether the communication protocol supports the newly added function and taking appropriate measures to solve the problem, the risk can be effectively reduced. By supporting flexible port function expansion, it can meet the diverse needs of users and provide users with a more convenient and efficient temperature control experience.
[0043] Step S106: If yes, the data flag is transmitted to the slave thermostat via the main thermostat based on the communication protocol.
[0044] Further, step S106 includes:
[0045] Pack the data flags of the port functions into data packets in a format supported by the communication protocol;
[0046] The main thermostat sends the data packet to the slave thermostat based on the communication protocol;
[0047] After receiving the data packet, the slave thermostat parses it and updates the configuration information of the internal port function of the slave thermostat.
[0048] Specifically, the signal output port X aThe data flags of the port functions are packaged in the format specified by the communication protocol, including adding header information and checksums, etc. The header information at least includes the data packet type and length to ensure the integrity and accuracy of the data packet during transmission. By packaging it into a format supported by the communication protocol, the data packet can be smoothly transmitted through the communication network. After the data packet is ready, the main thermostat sends the data packet to the sub-thermostat through the communication network based on the corresponding communication interface in accordance with the provisions of the communication protocol. The communication interface includes RS-485, WI-FI, etc. When the sub-thermostat receives the data packet, it first checks the integrity and correctness of the data packet. If the check passes, the sub-thermostat will parse the data packet in accordance with the provisions of the communication protocol and extract the signal output port X a The slave thermostat then updates its internal port function configuration information based on these data flags to ensure functional synchronization with the main thermostat.
[0049] In the above implementation, the data flag of the port function is packaged and transmitted to the sub-thermostat in a format supported by the communication protocol through the main thermostat, so as to realize the real-time synchronization of the configuration information of the port function between the main and sub-thermostat, shorten the configuration time and improve the work efficiency. The data packet undergoes a strict formatting and verification process before transmission. Through the packaging, sending, receiving and parsing process, it can ensure that the data flag of the port function will not be lost or damaged during the transmission process, thereby ensuring the consistency of the data between the main thermostat and the sub-thermostat, and ensuring the integrity and accuracy of the data during the transmission process. At the same time, the use of the communication protocol optimizes the data transmission process, improves the efficiency of data transmission, and makes the information exchange between the main and sub-thermostat faster and more reliable. By realizing the functional synchronization between the main thermostat and the sub-thermostat, it can provide users with a more consistent and convenient temperature control experience, and comprehensive temperature control and management can be achieved without configuring two thermostats separately.
[0050] Step S108, the auxiliary temperature controller executes the logic of the port function to determine whether the signal output port corresponding to the port function is open or closed.
[0051] Further, step S108 includes:
[0052] Retrieve the logic control instructions corresponding to the port function;
[0053] Execute logic control instructions through the auxiliary temperature controller;
[0054] The signal output port corresponding to the port function is opened or closed according to the execution result of the logic control instruction.
[0055] Specifically, the sub-thermostat will retrieve the corresponding logic control instructions from the internal database or control logic according to the previously configured port function. The logic control instructions define the corresponding execution mode of the port function under specific conditions, including the time to open or close the signal output port. After retrieving the logic control instructions, the sub-thermostat performs the corresponding operations according to the requirements of the instructions, including reading sensor data, making conditional judgments, sending control signals, etc. By executing these logic control instructions, the sub-thermostat can achieve precise control of external devices. After executing the logic control instructions, the sub-thermostat determines whether it is necessary to open or close the signal output port corresponding to the port function according to the execution result of the instruction. If the execution result meets the opening condition, the sub-thermostat will send an opening signal to the corresponding port; if it meets the closing condition, it will send a closing signal. Since the direct operation is performed on the main thermostat, the sub-thermostat needs to send the logic control instructions or status information to the main thermostat through the communication protocol. After receiving this information, the main thermostat changes the mapping of its port functions accordingly through logical control instructions, so that the ports originally used to control humidifiers, dehumidifiers and hot air blowers can "simulate" the control of air purifiers, smart fans and floor heating.
[0056] In the above implementation, by executing precise logic control instructions, the auxiliary temperature controller can achieve precise control of external devices, which helps to reduce errors and unnecessary energy consumption and improve the control accuracy of the entire temperature control system. The execution result of the logic control instruction directly determines the opening and closing state of the signal output port, thereby ensuring the stable operation of the system. Even in a complex and changing environment, accurate judgment and control can be performed according to the preset logic. By achieving precise port function control and signal output port opening and closing, it can provide users with a more comfortable and convenient temperature control experience. Users can set the functions of the thermostat according to actual needs and understand the operating status of the system through real-time feedback.
[0057] Step S110: If it does not exist, the main thermostat executes the logic of the port function to determine whether the signal output port corresponding to the port function is open or closed.
[0058] Furthermore, step S110 includes:
[0059] Retrieve the logic control instructions corresponding to the port function;
[0060] Execute logic control instructions through the main thermostat;
[0061] The signal output port corresponding to the port function is opened or closed according to the execution result of the logic control instruction.
[0062] Specifically, when the communication protocol does not contain a signal output port X aWhen the data flag of the port function is set, the main thermostat calls the logic control instruction corresponding to the port function from the control logic. The logic control instruction defines the execution logic of the port function under specific conditions, including when to open or close the signal output port, etc. After calling the logic control instruction, the main thermostat performs the corresponding operations according to the requirements of the instruction, including reading the system status, making conditional judgments, sending control signals to the sub-thermostat or directly controlling external devices, etc. By executing the above instructions, the main thermostat can control the port function and judge the open and closed state of the signal output port. After executing the logic control instruction, the main thermostat determines whether it is necessary to open or close the signal output port corresponding to the port function according to the execution result of the instruction. After executing the logic control instruction, the port originally used by the main thermostat to control the humidifier, dehumidifier, and hot air blower is mapped to a new port that can control the air purifier, smart fan, and floor heating. If the execution result meets the opening condition, the main thermostat will send the corresponding control signal, and if it meets the closing condition, it will perform the corresponding closing operation. For example, if the execution result of the logic control instruction is that the signal output port X1, the signal output port X2 and the signal output port X3 are open, the port functions of the signal output port X1, the signal output port X2 and the signal output port X3 are modified to the corresponding air purifier, smart fan and floor heating.
[0063] In the above implementation, when the sub-thermostat cannot handle a specific port function, the main thermostat can take over and execute the corresponding logic, thereby enhancing the redundancy and reliability of the entire temperature control system and helping to avoid the impact of single point failures on the entire system. Since the main thermostat can take over the functions that the sub-thermostat cannot handle, the entire temperature control system is more flexible in function configuration, and users can selectively enable or disable certain functions according to actual needs without worrying about the system being unable to support them. When the sub-thermostat fails or cannot handle a specific function, the user can simply take over these functions through the main thermostat, thereby simplifying the fault handling process and helping to reduce downtime and maintenance costs. When the data flag bit of the port function of a specific port Xa does not exist in the communication protocol, the main thermostat can automatically call the corresponding logic control instruction from the control logic, can dynamically adapt to different control requirements and environmental changes, and improve the intelligence and flexibility of the system. The logic control instruction not only defines the execution logic of the port function, but also includes complex operations such as conditional judgment and system status reading, which enables the main thermostat to make intelligent decisions based on real-time data and optimize the control effect of the functional device. By remapping the port functions, the main thermostat converts the ports originally used to control humidifiers, dehumidifiers, and hot air blowers into new ports that can control air purifiers, smart fans, and floor heating, and also improves the utilization efficiency of port resources.
[0064] Step S112: if the port function is configured on the slave thermostat, the signal state of the port function is synchronized to the slave thermostat.
[0065] Further, step S112 includes:
[0066] The judgment port function is configured on the auxiliary thermostat;
[0067] Retrieve the signal status corresponding to the port function;
[0068] The signal status of the port function is synchronized to the slave thermostat through the master thermostat.
[0069] Specifically, before performing signal status synchronization, it is first necessary to confirm that the signal output port X a The port function is indeed configured on the slave thermostat, which is completed by checking the status information of the slave thermostat to ensure the accuracy and effectiveness of the synchronization operation. Once the signal output port X is confirmed a The port function is configured on the slave thermostat. Next, it is necessary to retrieve the current signal status of the port function, which usually includes reading the sensor data, control signals, etc. associated with the port function to obtain the most accurate signal status information. After obtaining the signal status of the port function, the main thermostat transmits the obtained signal status to the slave thermostat through the communication protocol. After receiving the signal status, the slave thermostat updates the internal status record to ensure the consistency of the status with the main thermostat. When it is determined that the port function change of the main thermostat needs to be synchronized to the slave thermostat, the main thermostat packages the information of the port function change into synchronization data, which includes the changed port number, original function and new function. These data may include the changed port number, original function, new function, etc. The main thermostat sends the synchronization data to the slave thermostat through the communication protocol. After receiving the synchronization data, the slave thermostat parses and updates its internal state to reflect the change of the port function of the main thermostat.
[0070] In the above implementation, by synchronizing the signal status of the port function to the sub-temperature controller in real time, the state consistency of the entire temperature control system can be ensured, which helps to reduce control errors and faults caused by inconsistent states. When the port function is configured on the sub-temperature controller, the signal status is synchronized through the main temperature controller, which can further improve the reliability of the system. Even if the sub-temperature controller fails or is abnormal in some cases, the main temperature controller can still maintain an accurate grasp of the system status and make corresponding control decisions. Through a clear synchronization mechanism and process, the control process of the temperature control system can be optimized. When the signal status of the port function changes, it can respond quickly and update the status information, thereby achieving precise control of external devices. Through the logical control instructions configured inside the sub-temperature controller, precise control of external devices can be achieved. The logical control instructions not only define the execution method of the port function under specific conditions, but also allow the control strategy to be dynamically adjusted according to real-time data, thereby providing a more flexible and intelligent functional port expansion solution for the thermostat. When it is necessary to add new port functions or control new external devices, this can be achieved by simply configuring new logic control instructions on the slave temperature controller without making large-scale changes to the hardware. This can quickly adapt to different usage scenarios and needs, enhancing the scalability and maintainability of the system.
[0071] According to another aspect of the embodiment of the present application, Figure 3 As shown, a dual-temperature controller function port expansion device is provided, comprising:
[0072] Function configuration module 301, used to configure the port functions corresponding to the signal output ports of the main thermostat and the sub-thermostat according to user requirements;
[0073] The data judgment module 303 is used to judge whether there is a data flag bit of the port function in the communication protocol between the main thermostat and the sub-thermostat;
[0074] The data transmission module 305 is used to transmit the data flag bit to the slave thermostat through the main thermostat based on the communication protocol;
[0075] The first logic judgment module 307 is used to judge whether the signal output port corresponding to the port function is opened or closed through the logic of the port function executed by the auxiliary temperature controller;
[0076] The second logic judgment module 309 is used to judge the opening and closing of the signal output port corresponding to the port function through the logic of the main temperature controller executing the port function;
[0077] The signal synchronization module 311 is used to synchronize the signal status of the port function to the slave thermostat when the port function is configured on the slave thermostat.
[0078] It should be noted that the function configuration module 301 in this embodiment can be used to execute step S102 in the embodiment of the present application, the data judgment module 303 in this embodiment can be used to execute step S104 in the embodiment of the present application, the data transmission module 305 in this embodiment can be used to execute step S106 in the embodiment of the present application, the first logic judgment module 307 in this embodiment can be used to execute step S108 in the embodiment of the present application, the second logic judgment module 309 in this embodiment can be used to execute step S110 in the embodiment of the present application, and the signal synchronization module 311 in this embodiment can be used to execute step S112 in the embodiment of the present application.
[0079] According to another aspect of the embodiments of the present application, the present application provides an electronic device, such as Figure 4 As shown, it includes a memory 401, a processor 403, a communication interface 405 and a communication bus 407. The memory 401 stores a computer program that can be run on the processor 403. The memory 401 and the processor 403 communicate through the communication interface 405 and the communication bus 407. When the processor 403 executes the computer program, the steps of the above method are implemented.
[0080] The memory and processor in the above electronic device communicate through the communication bus and the communication interface. The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus can be divided into an address bus, a data bus, a control bus, etc.
[0081] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0082] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0083] According to another aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any of the above embodiments.
[0084] Optionally, in an embodiment of the present application, the computer-readable medium is configured to store program codes for the processor to execute the following steps:
[0085] Step S102, configuring the port functions corresponding to the signal output ports of the main thermostat and the sub-thermostat according to user requirements.
[0086] Step S104, determining whether the communication protocol between the main thermostat and the slave thermostat has a data flag bit for the port function.
[0087] Step S106: If yes, the data flag is transmitted to the slave thermostat via the main thermostat based on the communication protocol.
[0088] Step S108, the auxiliary temperature controller executes the logic of the port function to determine whether the signal output port corresponding to the port function is open or closed.
[0089] Step S110: If it does not exist, the main thermostat executes the logic of the port function to determine whether the signal output port corresponding to the port function is open or closed.
[0090] Step S112: if the port function is configured on the slave thermostat, the signal state of the port function is synchronized to the slave thermostat.
[0091] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0092] When the embodiments of the present application are specifically implemented, reference may be made to the above-mentioned embodiments, which have corresponding technical effects.
[0093] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.
[0094] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0095] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0096] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0097] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0098] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0099] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0100] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk. It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, article or device. Without more constraints, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.
[0101] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A dual temperature controller port expansion method, characterized in that: include: Configure the port functions corresponding to the signal output ports of the main thermostat and sub-thermostat according to user needs; Determine whether the communication protocol between the main thermostat and the sub-thermostat contains a data flag of the port function; If so, the data flag is transmitted to the slave thermostat via the main thermostat based on the communication protocol; By executing the logic of the port function through the auxiliary temperature controller, the opening and closing of the signal output port corresponding to the port function is determined; If not, the main thermostat executes the logic of the port function to determine whether the signal output port corresponding to the port function is open or closed; If the port function is configured on the slave thermostat, the signal state of the port function is synchronized to the slave thermostat.
2. The dual temperature controller port expansion method according to claim 1, characterized in that: The configuration of the port functions corresponding to the signal output ports of the main thermostat and the sub-thermostat according to user requirements includes: Identify user needs; Setting the port functions of the main thermostat and the sub-thermostat according to the user's needs; A communication protocol between the main thermostat and the sub-thermostat is configured based on the port function.
3. The dual temperature controller port expansion method according to claim 1, characterized in that: The determining whether the communication protocol between the main thermostat and the sub-thermostat has the data flag bit of the port function comprises: Obtaining a communication protocol between the main thermostat and the sub-thermostat; Parsing the communication protocol to obtain all data flag bits contained in the communication protocol; Matching all the data flag bits with the data flag bits of the port function to be expanded; If the match is successful, the communication protocol contains the data flag bit of the port function to be expanded; if the match is unsuccessful, the communication protocol does not contain the data flag bit of the port function to be expanded.
4. The dual temperature controller port expansion method according to claim 1, characterized in that: The method of transmitting the data flag bit to the slave thermostat based on the communication protocol by the main thermostat includes: Packing the data flag bits of the port function into a data packet in a format supported by the communication protocol; Sending the data packet to the slave thermostat based on the communication protocol through the master thermostat; After receiving the data packet, the slave thermostat parses it and updates the configuration information of the internal port function of the slave thermostat.
5. The dual temperature controller port expansion method according to claim 1, characterized in that: The logic of executing the port function by the secondary temperature controller to determine whether the signal output port corresponding to the port function is opened or closed includes: Retrieving the logic control instruction of the logic corresponding to the port function; Executing the logic control instruction through the auxiliary temperature controller; The signal output port corresponding to the port function is opened or closed according to the execution result of the logic control instruction.
6. The dual temperature controller port expansion method according to claim 1, characterized in that: The logic of executing the port function by the main thermostat to determine whether the signal output port corresponding to the port function is open or closed includes: Retrieving the logic control instruction of the logic corresponding to the port function; Executing the logic control instruction through the main temperature controller; The signal output port corresponding to the port function is opened or closed according to the execution result of the logic control instruction.
7. The dual temperature controller port expansion method according to claim 1, characterized in that: If the port function is configured on the secondary thermostat, synchronizing the signal state of the port function to the secondary thermostat includes: Determining that the port function is configured on the secondary thermostat; Retrieve the signal status corresponding to the port function; The signal status of the port function is synchronized to the slave thermostat through the main thermostat.
8. A dual-temperature controller port expansion device, applicable to the dual-temperature controller port expansion method according to any one of claims 1 to 7, characterized in that: include: Function configuration module, used to configure the port functions corresponding to the signal output ports of the main thermostat and the auxiliary thermostat according to user requirements; A data judgment module, used to judge whether the communication protocol between the main thermostat and the sub-thermostat has a data flag bit of the port function; A data transmission module, used for transmitting the data flag bit to the auxiliary thermostat through the main thermostat based on the communication protocol; A first logic judgment module, used for judging whether the signal output port corresponding to the port function is opened or closed by executing the logic of the port function by the auxiliary temperature controller; A second logic judgment module, used for judging whether the signal output port corresponding to the port function is opened or closed by executing the logic of the port function by the main thermostat; A signal synchronization module is used to synchronize the signal status of the port function to the secondary thermostat when the port function is configured on the secondary thermostat.
9. An electronic device, comprising a memory, a processor, a communication interface and a communication bus, wherein the memory stores a computer program that can be run on the processor, and the memory and the processor communicate through the communication bus and the communication interface, characterized in that: When the processor executes the computer program, the dual thermostat port expansion method described in any one of claims 1 to 7 is implemented.
10. A computer readable medium having a non-volatile program code executable by a processor, characterized in that: The program code enables the processor to execute the dual thermostat port expansion method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for realizing start and fault switching control in dual-control system
CN101957786A
Method for setting communication parameters of temperature controller
CN102354177A
System for being in communication with PLC extended module and implementation method thereof
CN104090519A
Method and device for expanding serial port of protocol converter, equipment and storage medium
CN113839819A
Master control device, controlled device, temperature control system, temperature control method and related equipment
CN114003071A
Cited By
Equipment control method and device, household unit and storage medium
CN119596671A
Dual-thermostat port expansion method and apparatus, device, and computer-readable medium
WO2026036982A1
