A programmable control method and device
By analyzing text programs and generating corresponding control instructions, the problem of single one-click control mode in the existing technology is solved, flexible and personalized control of hardware devices is realized, and user experience and control efficiency are improved.
Patent Information
- Application Number
- CN202210772639.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2042-06-30
AI Technical Summary
The one-click control mode in the prior art is single and inflexible, and it is impossible to realize the user's personalized control of the equipment, resulting in poor user experience.
By obtaining the text program, analyzing the text program using a preset parsing program, determining the hardware device and its status corresponding to the first control instruction, and generating a third control instruction according to the interface protocol of the hardware device, and sending it to the hardware device through the corresponding interface to achieve the corresponding status.
It realizes one-click operation of hardware equipment, saves the operating time of managers, improves control efficiency, and simplifies the programming method of central control devices, reducing dependence on professional programmers.
Smart Images

Figure CN115145200B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent control, and in particular to a programmable control method and device. Background Art
[0002] As more and more equipment is deployed in various conference rooms, courtrooms, centralized control centers, command centers and other places, such as televisions, projectors, LED screens, audio, cameras, air conditioners, fresh air, smart lights, curtains and other equipment and devices, if these devices are adjusted individually by switches, it will bring a lot of workload to managers.
[0003] The one-button control in the existing solution directly turns all the controlled devices on or off. However, when the user only wants to turn off some devices and turn on others, they can only adjust them through a single switch. This single control mode prevents users from personalizing the control of devices as they wish, resulting in a poor user experience. Summary of the invention
[0004] The present invention provides a programmable control method and device, which solves the problem of single and inflexible one-key control mode in the prior art.
[0005] A programmable control method, comprising:
[0006] Obtain a text program, parse the text program through a preset parsing program, and determine the hardware device and its state controlled by the first control instruction contained in the text program, the hardware device corresponding to each interface, and the second control instruction corresponding to each of the hardware devices and its state;
[0007] Receiving a user's instruction to be matched, and matching the instruction to be matched with the first control instruction;
[0008] If it is determined that the instruction to be matched matches the first control instruction, the hardware device and its state corresponding to the first control instruction are determined, and the second control instruction is matched according to the hardware device and its state;
[0009] A third control instruction is generated according to the second control instruction and the interface protocol of the hardware device, and the third control instruction is sent to the hardware device with the same interface through the corresponding interface to control the hardware device to achieve a corresponding state.
[0010] In one embodiment of the present application, the text program is parsed by a preset parsing program, specifically including: identifying a TCP protocol module according to a first label, and determining a first character format in the TCP protocol module; identifying a first control character in the first character format as a first control instruction, and identifying a device name character in the first character format as a corresponding hardware device and its status; identifying a hardware device interface protocol module according to a second label, and determining a second character format in the hardware device interface protocol module; identifying a device name character according to the second character format as a corresponding hardware device and its status, and identifying an escape character as a second control instruction corresponding to controlling the hardware device and its status.
[0011] In one embodiment of the present application, the third control instruction is sent to a hardware device with the same interface through a corresponding interface to control the hardware device to achieve a corresponding state, specifically including: sending the third control instruction to a hardware device interface with the same interface through the corresponding interface; transmitting the third control instruction to a decoder of the hardware device through the hardware device interface; the decoder translates the third control instruction into a voltage signal or current signal of a corresponding action according to the format of the hardware device interface protocol, and drives the hardware device to achieve a corresponding state.
[0012] In one embodiment of the present application, matching the second control instruction according to the hardware device specifically includes: when receiving the user's instruction to be matched, looping through the first control instruction in the TCP protocol module in the text program, and querying whether there is a first control instruction that matches the instruction to be matched; if so, determining the first hardware device controlled by the first control instruction and its status; based on the first hardware device and its status, looping through the second hardware device and its status contained in the interface protocol module in the text program, and querying whether there is a second hardware device and its status that matches the first hardware device and its status; if so, reading the second control instruction corresponding to the second hardware device and its status.
[0013] In one embodiment of the present application, a third control instruction is generated based on the second control instruction and the interface protocol of the hardware device, specifically including: determining the interface protocol of different hardware devices, encoding the second control instruction according to the data format specified by the interface protocol, forming a third instruction data and sending it to the corresponding hardware device.
[0014] A programmable control device, comprising:
[0015] A parsing module, used to obtain a text program, parse the text program through a preset parsing program, and determine the hardware device and its state controlled by the first control instruction contained in the text program, the hardware device corresponding to each interface, and the second control instruction corresponding to each of the hardware devices and its state;
[0016] A first control instruction matching module, used for receiving a user's instruction to be matched, and matching the instruction to be matched with the first control instruction;
[0017] A second control instruction matching module, used for judging whether the instruction to be matched matches the first control instruction, determining the hardware device and its status corresponding to the first control instruction, and matching the second control instruction according to the hardware device and its status;
[0018] The calling module is used to generate a third control instruction according to the second control instruction and the interface protocol of the hardware device, send the third control instruction to the hardware device with the same interface through the corresponding interface, and control the hardware device to achieve a corresponding state.
[0019] In one embodiment of the present application, the parsing module is also specifically used to: identify the TCP protocol module according to the first label, and determine the first character format in the TCP protocol module; identify the first control character in the first character format as the first control instruction, and identify the device name characters in the first character format as the corresponding hardware device and its status; identify the hardware device interface protocol module according to the second label, and determine the second character format in the hardware device interface protocol module; identify the device name characters according to the second character format as the corresponding hardware device and its status, and identify the escape character as the second control instruction corresponding to controlling the hardware device and its status.
[0020] In one embodiment of the present application, the calling module is also specifically used to: send the third control instruction to a hardware device interface with the same interface through a corresponding interface; transmit the third control instruction to a decoder of the hardware device through the hardware device interface; the decoder translates the third control instruction into a voltage signal or current signal of a corresponding action according to the format of the hardware device interface protocol, and drives the hardware device to achieve a corresponding state.
[0021] A programmable control device comprising:
[0022] at least one processor; and,
[0023] a memory communicatively connected to the at least one processor; wherein,
[0024] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to cause the at least one processor to execute:
[0025] Obtain a text program, parse the text program through a preset parsing program, and determine the hardware device and its state controlled by the first control instruction contained in the text program, the hardware device corresponding to each interface, and the second control instruction corresponding to each of the hardware devices and its state;
[0026] Receiving a user's instruction to be matched, and matching the instruction to be matched with the first control instruction;
[0027] If it is determined that the instruction to be matched matches the first control instruction, the hardware device and its state corresponding to the first control instruction are determined, and the second control instruction is matched according to the hardware device and its state;
[0028] A third control instruction is generated according to the second control instruction and the interface protocol of the hardware device, and the third control instruction is sent to the hardware device with the same interface through the corresponding interface to control the hardware device to achieve a corresponding state.
[0029] A non-volatile storage medium stores computer executable instructions, wherein the computer executable instructions are executed by a processor to implement the following steps:
[0030] Obtain a text program, parse the text program through a preset parsing program, and determine the hardware device and its state controlled by the first control instruction contained in the text program, the hardware device corresponding to each interface, and the second control instruction corresponding to each of the hardware devices and its state;
[0031] Receiving a user's instruction to be matched, and matching the instruction to be matched with the first control instruction;
[0032] If it is determined that the instruction to be matched matches the first control instruction, the hardware device and its state corresponding to the first control instruction are determined, and the second control instruction is matched according to the hardware device and its state;
[0033] A third control instruction is generated according to the second control instruction and the interface protocol of the hardware device, and the third control instruction is sent to the hardware device with the same interface through the corresponding interface to control the hardware device to achieve a corresponding state.
[0034] The present application provides a programmable control method and device, which at least includes the following beneficial effects: by enabling configuration personnel to write text programs in a personalized manner, and parsing the text programs through parsing programs to achieve one-key control of the control hardware equipment, it saves personnel time in managing equipment and improves control efficiency. At the same time, it also simplifies the programming method of the central control device, improves the efficiency of on-site deployment of intelligent devices, and reduces reliance on professional programmers. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0036] Figure 1 A schematic diagram of the steps of a programmable control method provided in an embodiment of the present application;
[0037] Figure 2 A schematic diagram of the programmable control device provided in the embodiment of the present application;
[0038] Figure 3 A structural diagram of a programmable control device provided in an embodiment of the present application;
[0039] Figure 4 A composition diagram of a programmable control device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be described clearly and completely in conjunction with the specific embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0041] It should be noted that it is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict. Unless otherwise defined, the technical terms or scientific terms involved in this application should be the usual meanings understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation and may represent the singular or plural. The terms "including", "comprising", "having" and any of their variations involved in this application are intended to cover non-exclusive inclusions; the terms "first", "second", "third", etc. involved in this application are merely to distinguish similar objects and do not represent a specific ordering of objects.
[0042] As more and more equipment is deployed in various conference rooms, courtrooms, centralized control centers, command centers and other places, such as televisions, projectors, LED screens, audio, cameras, air conditioners, fresh air, smart lights, curtains and other equipment and devices, if these devices are adjusted individually by switches, it will bring a lot of workload to managers.
[0043] In the existing solution, a dedicated hardware central control host is required to realize the relevant control functions, which are generally realized through special products such as control devices produced at home and abroad. These products require special editing tools, and the programming methods are complex and difficult to master. Moreover, one-button control generally directly turns on or off all the devices controlled by the control device, but when the user only wants to turn off some devices and turn on others, it can only be adjusted through a single switch. This single control mode prevents users from personalizing the control of the device as they wish, resulting in a poor user experience.
[0044] Therefore, it is necessary to develop a set of programmable control devices based on embedded operating systems to facilitate unified and centralized management and one-click control by management personnel, such as customizing "meeting mode", "trial mode", "duty mode", "command mode", "visit mode", etc. These modes can be customized using ordinary text editors and can be quickly edited according to pre-defined keywords and instruction formats, which can complete the construction of the device very flexibly and conveniently.
[0045] This application proposes a programmable control method and device, which are described in detail below.
[0046] Figure 1 A schematic diagram of a programmable control method provided in an embodiment of the present application may include the following steps:
[0047] S110: Acquire a text program, parse the text program using a preset parsing program, and determine the hardware device controlled by the first control instruction contained in the text program, the hardware device corresponding to each interface, and the second control instruction of each hardware device.
[0048] In one embodiment of the present application, a TCP protocol module is identified according to a first label, and a first character format in the TCP protocol module is determined; a first control character in the first character format is identified as a first control instruction, and a device name character in the first character format is identified as a corresponding hardware device and its status; a hardware device interface protocol module is identified according to a second label, and a second character format in the hardware device interface protocol module is determined; a device name character is identified according to the second character format as a corresponding hardware device and its status, and an escape character is identified as a second control instruction corresponding to controlling the hardware device and its status.
[0049] Specifically, the programmable control device is installed with an embedded operating system, and the parsing program may be a set of programs developed by professional programmers according to a text program format and installed in the embedded operating system for parsing text programs uploaded by users or configuration personnel.
[0050] The following is an example of a text program:
[0051] / *******TCP receives user preset instructions, user scenario******* /
[0052]
[0053]
[0054] In the above text program, the first label is<TCP_MODULE>< / TCP_MODULE> The text content in the first tag belongs to the TCP protocol module, wherein SYSTEM_ON. and SYSTEM_OFF. are the first control characters, that is, the first control instruction, and the device name characters after the colon of SYSTEM_ON. and SYSTEM_OFF. respectively represent the hardware device controlled by the first control instruction and its status.
[0055] In this text program example<RS232_MODULE>< / RS232_MODULE> ,<RS485_MODULE>< / RS485_MODULE> It is the second label. The text content in the second label belongs to the hardware device communication module. The second character format in this module is: hardware device and its status: second control instruction. For example, LIGHT_1_ON., LIGHT_1_OFF., LIGHT_2_ON. and other characters represent the hardware device and its status. \x43\x53\x54\x01\x00\x0d\xF0\xAA and the like are the second control instructions corresponding to the hardware device and its status. The second control instruction is a hexadecimal escape character.
[0056] S120: Receive a to-be-matched instruction from a user, and match the to-be-matched instruction with a first control instruction.
[0057] Specifically, after parsing the text program, the programmable control device is in a state of waiting to receive the user's instruction to be matched. When the user sends the instruction to be matched to the programmable control device through the upper application software, the instruction to be matched is matched with the first control instruction.
[0058] S130: If it is determined that the instruction to be matched matches the first control instruction, the hardware device corresponding to the first control instruction is determined, and the second control instruction is matched according to the hardware device.
[0059] In one embodiment of the present application, when a user's instruction to be matched is received, the first control instruction in the TCP protocol module in the text program is looped through to query whether there is a first control instruction that matches the instruction to be matched; if so, the first hardware device and its status controlled by the first control instruction are determined; based on the first hardware device and its status, the second hardware device and its status contained in the interface protocol module in the text program are looped through to query whether there is a second hardware device and its status that matches the first hardware device and its status; if so, the second control instruction corresponding to the second hardware device and its status is read.
[0060] Specifically, as shown in the above text program, the instruction to be matched received from the user is SYSTEM_ON., then a cyclic comparison is performed to determine whether the first control character of SYSTEM_ON. exists in the TCP protocol module of the text program. If so, it is determined that the first hardware device corresponding to SYSTEM_ON. and its status are in the on state: LIGHT_1_ON.LIGHT_2_ON.LIGHT_3_ON.PROJ_ON.CAM_ON., and then a cyclic comparison is performed in the interface protocol module to determine whether the second control instruction corresponding to LIGHT_1_ON.LIGHT_2_ON.LIGHT_3_ON.PROJ_ON.CAM_ON.
[0061] S140: Generate a third control instruction according to the second control instruction and the interface protocol of the hardware device, send the third control instruction to the hardware device with the same interface through the corresponding interface, and control the hardware device to achieve a corresponding state.
[0062] In one embodiment of the present application, the interface protocols of different hardware devices are determined, the second control instruction is encoded according to the data format specified by the interface protocol, the third instruction data is formed and sent to the corresponding hardware device.
[0063] Specifically, different hardware device interfaces have different interface protocols, such as the lighting interface uses the RS232 interface protocol, the camera interface uses the RS485 interface protocol, and the user's PC port uses the TCP / IP protocol, etc. Data transmission of different interfaces needs to be encoded in the corresponding data format according to their interface protocols to prevent the situation where data cannot be effectively transmitted and executed.
[0064] In one embodiment of the present application, a third control instruction is sent to a hardware device interface with the same interface through a corresponding interface; the third control instruction is transmitted to a decoder of the hardware device through the hardware device interface; the decoder translates the third control instruction into a voltage signal or current signal of a corresponding action according to the format of the hardware device interface protocol, and drives the hardware device to achieve a corresponding state.
[0065] For example, when the programmable control device receives the user's SYSTEM_ON. instruction, it queries the control instructions of the hardware device it controls and its status, generates a third control instruction, and sends the third control instruction to the corresponding hardware device to turn on the first group of lights, the second group of lights, the third group of lights, the projector, and the camera; when the programmable control device receives the user's SYSTEM_OFF. instruction, it turns off the first group of lights, the second group of lights, the third group of lights, the projector, and the camera.
[0066] like Figure 2 The figure shows a schematic diagram of the control implementation of a programmable control device provided by an embodiment of the present application. The power system, lighting system, projection, and large screen use the RS232 interface protocol, the air conditioner, camera, control panel, and wireless gateway use the RS485 / 422 interface protocol, the access control system uses the I / O interface protocol, and the user's PC uses the TCP / IP protocol. The text program is written by the configuration personnel themselves, and the hardware devices can be combined at will to turn on or off with one click. For example, in the "conference mode", one-click control of the air conditioner, control panel, projection, lighting system, and large screen can be set; in the "duty mode", one-click control of the camera and access control system can be set; in the "visit mode", one-click control of the access control system, lighting system, and air conditioner can be set.
[0067] By writing a set of parsing programs, the text program uploaded by the configuration personnel (who can be users) is parsed. After the analysis is completed, the programmable control device is in a state of waiting to receive instructions. When the user sends the instructions to be matched to the programmable control device through the TCP / IP protocol via the upper-level application software, the programmable control device performs a cyclic comparison based on the instructions to be matched. When a corresponding instruction is recognized, the corresponding execution action written in advance is triggered to achieve the corresponding state of the hardware device.
[0068] The technical solution provided in this application simplifies the programming method of the central control device, can improve the efficiency of on-site deployment of intelligent devices, and reduce reliance on professional programmers.
[0069] The above is a programmable control method provided by the embodiment of the present application. Based on the same inventive idea, the embodiment of the present application also provides a corresponding programmable control device, such as Figure 3 shown.
[0070] A programmable control device, comprising:
[0071] The parsing module 301 is used to obtain a text program, parse the text program through a preset parsing program, and determine the hardware device and its state corresponding to the first control instruction contained in the text program, the hardware device corresponding to each interface, and the second control instruction corresponding to each hardware device and its state;
[0072] A first control instruction matching module 302 is used to receive a user's instruction to be matched and match the instruction to be matched with a first control instruction;
[0073] The second control instruction matching module 303 is used to determine whether the instruction to be matched matches the first control instruction, determine the hardware device and its status corresponding to the first control instruction, and match the second control instruction according to the hardware device and its status;
[0074] The calling module 304 is used to generate a third control instruction according to the second control instruction and the interface protocol of the hardware device, send the third control instruction to the hardware device with the same interface through the corresponding interface, and control the hardware device to achieve a corresponding state.
[0075] In one embodiment of the present application, the parsing module is also specifically used to: identify the TCP protocol module according to the first label, and determine the first character format in the TCP protocol module; identify the first control character in the first character format as the first control instruction, and identify the device name characters in the first character format as the corresponding hardware device and its status; identify the hardware device interface protocol module according to the second label, and determine the second character format in the hardware device interface protocol module; identify the device name characters according to the second character format as the corresponding hardware device and its status, and identify the escape character as the second control instruction corresponding to controlling the hardware device and its status.
[0076] In one embodiment of the present application, the calling module is also specifically used to: send a third control instruction to a hardware device interface with the same interface through a corresponding interface; transmit the third control instruction to a decoder of the hardware device through the hardware device interface; the decoder translates the third control instruction into a voltage signal or current signal of a corresponding action according to the format of the hardware device interface protocol, and drives the hardware device to achieve a corresponding state.
[0077] This embodiment provides a programmable control device, such as Figure 4 As shown, including:
[0078] at least one processor 401; and,
[0079] A memory 402 is communicatively connected to at least one processor via a bus 403; wherein,
[0080] The memory 402 stores instructions that can be executed by at least one processor 401. The instructions are executed by at least one processor 401 to enable the at least one processor 401 to execute:
[0081] Obtaining a text program, parsing the text program through a preset parsing program, and determining the hardware device and its state controlled by the first control instruction contained in the text program, the hardware device corresponding to each interface, and the second control instruction corresponding to each hardware device and its state;
[0082] Receiving a user's instruction to be matched, and matching the instruction to be matched with the first control instruction;
[0083] If it is determined that the instruction to be matched matches the first control instruction, the hardware device and its state corresponding to the first control instruction are determined, and the second control instruction is matched according to the hardware device and its state;
[0084] A third control instruction is generated according to the second control instruction and the interface protocol of the hardware device, and the third control instruction is sent to the hardware device with the same interface through the corresponding interface to control the hardware device to achieve a corresponding state.
[0085] The embodiment of the present invention further provides a non-transitory computer-readable storage medium storing computer-executable instructions, which are executed by a processor to implement the following steps:
[0086] Obtaining a text program, parsing the text program through a preset parsing program, and determining the hardware device and its state controlled by the first control instruction contained in the text program, the hardware device corresponding to each interface, and the second control instruction corresponding to each hardware device and its state;
[0087] Receiving a user's instruction to be matched, and matching the instruction to be matched with the first control instruction;
[0088] If it is determined that the instruction to be matched matches the first control instruction, the hardware device and its state corresponding to the first control instruction are determined, and the second control instruction is matched according to the hardware device and its state;
[0089] A third control instruction is generated according to the second control instruction and the interface protocol of the hardware device, and the third control instruction is sent to the hardware device with the same interface through the corresponding interface to control the hardware device to achieve a corresponding state.
[0090] Although the present invention has been described in detail above with general descriptions and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements may be made thereto based on the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all fall within the scope of protection claimed by the present invention.
Claims
1. A programmable control method, characterized in that: include: Obtain a text program, parse the text program by a preset parsing program, determine the hardware device and its state controlled by the first control instruction contained in the text program, the hardware device corresponding to each interface, and the second control instruction corresponding to each hardware device and its state, wherein the parsing of the text program by the preset parsing program includes: Identify the TCP protocol module according to the first label, and determine the first character format in the TCP protocol module; Recognize the first control character in the first character format as a first control instruction, and recognize the device name characters in the first character format as corresponding hardware devices and their status; Identify the hardware device interface protocol module according to the second tag, and determine a second character format in the hardware device interface protocol module; Identify the device name characters as corresponding hardware devices and their states according to the second character format, and identify the escape characters as second control instructions corresponding to controlling the hardware devices and their states; Receiving a user's instruction to be matched, and matching the instruction to be matched with the first control instruction; If it is determined that the instruction to be matched matches the first control instruction, the hardware device and its state corresponding to the first control instruction are determined, and the second control instruction is matched according to the hardware device and its state; Generating a third control instruction according to the second control instruction and the interface protocol of the hardware device, sending the third control instruction to the hardware device having the same interface through the corresponding interface, and controlling the hardware device to achieve a corresponding state, wherein sending the third control instruction to the hardware device having the same interface through the corresponding interface, and controlling the hardware device to achieve a corresponding state, comprises: Sending the third control instruction to a hardware device interface having the same interface through a corresponding interface; Transmitting the third control instruction to a decoder of the hardware device through a hardware device interface; The decoder translates the third control instruction into a voltage signal or a current signal of a corresponding action according to the format of the hardware device interface protocol, and drives the hardware device to achieve a corresponding state.
2. The programmable control method according to claim 1, characterized in that: The programmable control method further comprises: matching a second control instruction according to the hardware device, comprising: When receiving a user's instruction to be matched, looping through the first control instructions in the TCP protocol module in the text program to check whether there is a first control instruction that matches the instruction to be matched; If yes, determining a first hardware device controlled by the first control instruction and its status; According to the first hardware device and its state, loop through the second hardware device and its state contained in the interface protocol module in the text program, and query whether there is a second hardware device and its state that matches the first hardware device and its state; If so, read a second control instruction corresponding to the second hardware device and its state.
3. The programmable control method according to claim 1, characterized in that: The programmable control method further comprises: generating a third control instruction according to the second control instruction and the interface protocol of the hardware device, comprising: Determine the interface protocols of different hardware devices, encode the second control instruction according to the data format specified by the interface protocol, form third instruction data and send it to the corresponding hardware device.
4. A programmable control device, characterized in that: include: The parsing module is used to obtain a text program, parse the text program through a preset parsing program, determine the hardware device and its state controlled by the first control instruction contained in the text program, the hardware device corresponding to each interface, and the second control instruction corresponding to each of the hardware devices and their state, and the parsing module is also used to: Identify the TCP protocol module according to the first label, and determine the first character format in the TCP protocol module; Recognize the first control character in the first character format as a first control instruction, and recognize the device name characters in the first character format as corresponding hardware devices and their status; Identify the hardware device interface protocol module according to the second tag, and determine a second character format in the hardware device interface protocol module; Identify the device name characters as corresponding hardware devices and their states according to the second character format, and identify the escape characters as second control instructions corresponding to controlling the hardware devices and their states; A first control instruction matching module, used for receiving a user's instruction to be matched, and matching the instruction to be matched with the first control instruction; A second control instruction matching module, used for judging whether the instruction to be matched matches the first control instruction, determining the hardware device and its status corresponding to the first control instruction, and matching the second control instruction according to the hardware device and its status; A calling module is used to generate a third control instruction according to the second control instruction and the interface protocol of the hardware device, send the third control instruction to the hardware device with the same interface through the corresponding interface, and control the hardware device to achieve a corresponding state, and the calling module is also used to: Sending the third control instruction to a hardware device interface having the same interface through a corresponding interface; Transmitting the third control instruction to a decoder of the hardware device through a hardware device interface; The decoder translates the third control instruction into a voltage signal or a current signal of a corresponding action according to the format of the hardware device interface protocol, and drives the hardware device to achieve a corresponding state.
5. A programmable control device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the programmable control method according to any one of claims 1 to 3.
6. A non-volatile storage medium storing computer executable instructions, characterized in that: The computer executable instructions are executed by a processor to implement the programmable control method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Method, device and system for hardware device control
CN105824295A
Communication method and device of Internet of Things gateway equipment, equipment and storage medium
CN112087454A