Control Program Generation Method, Apparatus, Electronic Device, and Medium

By obtaining and sorting event change information of the end device and generating a logic tree, the problem of high communication cost for building control system generation and update is solved, and the generation of control program without programming is realized, which improves practicality and programming efficiency.

CN115128976BActive Publication Date: 2025-08-05GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210578092.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-25
Publication Date
2025-08-05
Estimated Expiration
2042-05-25

AI Technical Summary

Technical Problem

Generation and update of existing building control systems requires huge communication costs because programmers do not have a detailed understanding of the demand business and usage scenarios, while the actual user groups do not have programming capabilities.

Method used

By obtaining the event change information of the target end device, adding time tags, sorting the event execution axis, and converting it into a logic tree, generating a control program.

Benefits of technology

It realizes that the control program can be generated without programming capabilities, reduces communication costs, improves the practicality of the program and the field-level controller programming efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115128976B_ABST
    Figure CN115128976B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of control program generation, and provides a control program generation method, apparatus, electronic device, and medium. The method includes: in response to detecting a start recording instruction, acquiring event change information of at least one target end device in the current scene, and adding a corresponding time tag to each piece of event change information; in response to detecting an end recording instruction, sorting each piece of event change information based on the order of the time tags to obtain an event execution axis; converting the event execution axis into a logic tree, and generating a control program for the current scene based on the structure of the logic tree. Embodiments of the present disclosure enable the actual users to generate a control program without the need for programming capabilities, achieving reverse programming. This reverse feedback mechanism of the end device can record the device change states according to preset scenarios and processes, realizing on-site controller programming, greatly reducing the communication cost, and also greatly increasing the practicality of the program.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of control program generation, and particularly to a control program generation method, apparatus, electronic device, and medium. Background Art

[0002] Building automation control systems have gradually gained importance in modern building management, and the market scale has reached billions. Building control system statistics show that energy consumption can be reduced by about 25% and labor costs can be reduced by about 50%. As the core execution unit of the building control system, the end controller has been widely used. However, currently, the controllers on the market are all programmed logically through code writing or configuration programming. Both forms require professional controller personnel to write. The programming personnel do not have a detailed understanding of the demand business and usage scenarios, and the actual users do not have programming capabilities, resulting in huge communication costs for the generation and update of the building control system. Summary of the Invention

[0003] In view of this, embodiments of the present disclosure provide a control program generation method, apparatus, electronic device, and medium to solve the problem in the prior art that the programming personnel do not have a detailed understanding of the demand business and usage scenarios, and the actual users do not have programming capabilities, resulting in huge communication costs for the generation and update of the building control system.

[0004] In a first aspect of embodiments of the present disclosure, a control program generation method is provided, including:

[0005] Responding to detecting a start recording instruction, obtaining event change information of at least one target end device in the current scene, and adding a corresponding time tag to each event change information;

[0006] Responding to detecting an end recording instruction, sorting each event change information based on the order of the time tags to obtain an event execution axis;

[0007] Converting the event execution axis into a logic tree, and generating a control program for the current scene based on the structure of the logic tree.

[0008] In a second aspect of embodiments of the present disclosure, a control program generation apparatus is provided, including:

[0009] An obtaining module, configured to respond to detecting a start recording instruction, obtain event change information of at least one target end device in the current scene, and add a corresponding time tag to each event change information;

[0010] A sorting module, configured to respond to detecting an end recording instruction, sort each event change information based on the order of the time tags to obtain an event execution axis;

[0011] A generation module, configured to convert the event execution axis into a logic tree and generate a control program for the current scenario based on the structure of the logic tree.

[0012] In a third aspect of the embodiments of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above method are implemented.

[0013] In a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0014] In a fifth aspect of the embodiments of the present disclosure, a building automatic control system is provided, characterized by including:

[0015] A controller that implements the steps of the above method when executed;

[0016] At least one terminal device connected to the controller.

[0017] Beneficial effects

[0018] The beneficial effects of the embodiments of the present disclosure compared with the prior art at least include: by obtaining the event change information of at least one target terminal device and adding a corresponding time tag for each event change information; sorting each event change information based on the order of the time tags to obtain an event execution axis; converting the event execution axis into a logic tree and generating a target control program based on the structure of the logic tree, it can enable the actual users to generate a control program without the need for programming skills, achieving reverse programming. This reverse feedback mechanism of the terminal device can record the device change status according to the preset scenarios and processes, realizing the programming of the field-level controller, greatly reducing the communication cost and also greatly increasing the practicability of the program. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present disclosure. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0020] Figure 1 It is a schematic diagram of an application scenario of a control program generation method provided according to an embodiment of the present disclosure;

[0021] Figure 2It is a flowchart of some embodiments of a control program generation method provided according to an embodiment of the present disclosure;

[0022] Figure 3 It is a flowchart of some other embodiments of another control program generation method provided according to an embodiment of the present disclosure;

[0023] Figure 4 It is a schematic diagram of a simple structure of a control program generation device provided according to an embodiment of the present disclosure;

[0024] Figure 5 It is a schematic diagram of an electronic device provided according to an embodiment of the present disclosure. Detailed implementation manners

[0025] Hereinafter, embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.

[0026] In addition, it should be noted that for the sake of convenience of description, only parts related to the present disclosure are shown in the drawings. Without conflict, the embodiments in the present disclosure and the features in the embodiments can be combined with each other.

[0027] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different systems, devices, modules or units, and are not used to limit the order or interdependence relationship of the functions executed by these systems, devices, modules or units.

[0028] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0029] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.

[0030] Hereinafter, the present disclosure will be described in detail with reference to the drawings and in combination with the embodiments.

[0031] Figure 1 It is a schematic diagram of an application scenario of a control program generation method according to some embodiments of the present disclosure.

[0032] In Figure 1In the application scenario, it includes a controller and n end devices connected to the controller. The controller is configured to: in response to detecting a start recording instruction, obtain event change information of at least one target end device in the current scenario, and add a corresponding time tag to each event change information; in response to detecting an end recording instruction, sort each event change information based on the order of the time tags to obtain an event execution axis; convert the event execution axis into a logic tree, and generate a control program for the current scenario based on the structure of the logic tree.

[0033] It should be noted that the above controller can be hardware or software. When the controller is hardware, it can be implemented as a distributed cluster composed of multiple servers or terminal devices, or as a single server or a single terminal device. When the controller is embodied as software, it can be installed in the above-listed hardware devices. It can be implemented as, for example, multiple software or software modules for providing distributed services, or as a single software or software module. No specific limitation is made here.

[0034] It should be understood that Figure 1 the number of controllers in

[0035] Continuing to refer to Figure 2 , a flow 200 of some embodiments of the control program generation method according to the present disclosure is shown. This method can be executed by the controller in Figure 1 . The method for generating the control program includes the following steps:

[0036] Step 201, in response to detecting a start recording instruction, obtain event change information of at least one target end device in the current scenario, and add a corresponding time tag to each event change information.

[0037] In some embodiments, the execution subject of the control program generation method (such as the controller shown in Figure 1 ) can be connected to the target end device through a wired connection method or a wireless connection method. Then, in response to detecting a start recording instruction, obtain event change information of at least one target end device in the current scenario, and add a corresponding time tag to each event change information.

[0038] It should be pointed out that the above wireless connection methods can include but are not limited to 3G / 4G / 5G connections, WiFi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB (ultra wideband) connections, and other currently known or future-developed wireless connection methods.

[0039] The start recording instruction may refer to an instruction to start recording the change information of the target end device in the current scene, such as a start macro recording instruction. As an example, the start recording instruction may be triggered by the start recording button on the start recording interface, and the start recording interface may refer to an interface for displaying information related to starting recording. As another example, the start recording instruction may also be triggered by a click operation on a physical start button. The current scene may refer to the information of the relevant scene of the current recording program.

[0040] Scene information may refer to a predefined control combination of multiple devices. As an example, when the camera device in the parking lot recognizes that a target vehicle (such as the vehicle of a senior executive) enters the garage, the dedicated elevator will automatically descend to the first floor to prepare to receive the target vehicle. At this time, the scene information including the camera device in the parking lot and the elevator can be the scene information. As another example, when the camera device in the office detects that there is no one for a preset duration, it will automatically turn off the lights in the office. At this time, the camera device in the office and the lights in the office can be the scene information. The scene information is set in advance before recording. The event change information may refer to the corresponding information of the change situation of any of the above-mentioned end devices.

[0041] In some optional implementation manners of some embodiments, the controller may be a single-chip microcomputer, and each end device may be connected to a pin of the single-chip microcomputer. When the state of the end device changes, it can cause the electrical frequency of the corresponding pin to change. As an example, if one of the pins of the controller is connected to a temperature sensor, the temperature sensor will generate different voltages as the temperature changes, and the connected chip pin will digitally feedback the change of this part of the voltage.

[0042] The time tag may refer to a tag indicating the occurrence time of the event change information. The time tag may be a time synchronized with the real world, or a relative time based on the start recording time, or other common time representation methods, which are set according to needs and are not limited here. In addition, the time tag may include various display forms such as "2022.05.01 09:08:13", "May 1, 2022, 09:08:13 seconds", or "20220501090813", etc., which are set according to needs and are not limited here.

[0043] Step 202, in response to detecting an end recording instruction, sort each event change information based on the order of the time tags to obtain an event execution axis.

[0044] In some embodiments, in response to detecting an end recording instruction, the above-mentioned execution entity may sort each event change information based on the order of the time tags to obtain an event execution axis. The event execution axis may refer to a set of event change information obtained by sorting each event change information based on the order of the time tags.

[0045] Step 203: Convert the event execution axis into a logic tree, and generate a control program for the current scenario based on the structure of the logic tree.

[0046] In some embodiments, the above execution entity can convert the event execution axis into a logic tree and generate a control program for the current scenario based on the structure of the logic tree. Since multiple event change messages may occur at the same time, the event execution axis can be converted into a logic tree. Subsequently, according to the topological structure of the tree, the event change message corresponding to the previous time point can be used as the trigger condition for one or more event change messages at the current time point, and then a control program for the current scenario can be generated.

[0047] The beneficial effects of one of the above embodiments of the present disclosure at least include: by obtaining the event change messages of at least one target end device and adding corresponding time tags to each event change message; sorting each event change message based on the order of the time tags to obtain an event execution axis; converting the event execution axis into a logic tree and generating a target control program based on the structure of the logic tree, it can enable the actual users to generate a control program without programming ability, achieving reverse programming. This reverse feedback mechanism of the end device can record the device change states according to the preset scenarios and processes, realizing on-site controller programming, greatly reducing the communication cost, and also greatly increasing the practicality of the program.

[0048] Continue to refer to Figure 3 , which shows the flow 300 of some other embodiments of the control program generation method according to the present disclosure. This method can be executed by the Figure 1 controller in. This control program generation method includes:

[0049] Step 301: In response to detecting a start recording instruction, obtain the event change messages of at least one target end device in the current scenario, and add corresponding time tags to each event change message.

[0050] Step 302: In response to detecting an end recording instruction, sort each event change message based on the order of the time tags to obtain an event execution axis.

[0051] Step 303: Convert the event execution axis into a logic tree, and generate a control program for the current scenario based on the structure of the logic tree, where the control program includes at least one execution code block, and each execution code block corresponds to an event change message.

[0052] In some embodiments, the above-mentioned execution entity may convert the event execution axis into a logic tree and generate a control program for the current scenario based on the structure of the logic tree. The control program includes at least one execution code block, and each execution code block corresponds to an event change information. An execution code block may refer to at least one piece of code claimed for each event change information. When the code is executed, the effect of the event change information can be achieved. Through this setting, each event change information can be coded into a code block, which greatly facilitates subsequent use and user editing.

[0053] Step 304, execute the control program of the target scenario, and control at least one target end device to execute the corresponding event according to the corresponding time tag.

[0054] In some embodiments, the above-mentioned execution entity may execute the control program of the target scenario and control at least one target end device to execute the corresponding event according to the corresponding time tag. The target end device may refer to Figure 1 at least one of the end devices therein. Controlling at least one target end device to execute the corresponding event according to the corresponding time tag reproduces the changing situation during recording.

[0055] Step 305, in response to detecting an editing instruction for the target control program, display each execution code block of the target control program and the logical relationship between the execution code blocks to a target interface, where the target interface is used to edit the execution logic between the execution code blocks and / or edit the execution logic of at least one execution code block.

[0056] In some embodiments, in response to detecting an editing instruction for the target control program, the above-mentioned execution entity may display each execution code block of the target control program and the logical relationship between the execution code blocks to a target interface, where the target interface is used to edit the execution logic between the execution code blocks and / or edit the execution logic of at least one execution code block. The editing instruction may refer to an instruction for editing the target control program. The target interface may refer to an interface for editing the execution logic between the execution code blocks and / or editing the execution logic of at least one execution code block. The triggering of the editing instruction indicates that the user is dissatisfied with the generated program. At this time, it is necessary to change one or more execution code blocks and the logical execution relationship between the execution code blocks to meet the actual usage scenario. Through the above content, the interactive experience is improved, and the control program updates the generated program based on the interactive operation of the user editing relevant logic, thereby greatly improving the practicability of the present disclosure.

[0057] It should be noted that as the program complexity increases, an execution code block may include at least two sub-execution code blocks. Therefore, an execution code block can be edited to edit its internal execution logic.

[0058] Step 306, in response to detecting an editing completion instruction for the target control program, update the editing content of the target interface to the target control program.

[0059] In some embodiments, in response to detecting an editing completion instruction for the target control program, the above-mentioned execution entity may update the editing content of the target interface to the target control program. The editing completion instruction may refer to an instruction indicating that the editing is completed. When the editing completion instruction is detected, it indicates that the editing has been completed. The editing content of the target interface may be updated to the target control program.

[0060] As a specific example, when the current scenario to be implemented is that the lights in the office turn on after a person's face recognition is successful. At this time, the on-site personnel can press the start recording function key of the controller and start recording, then perform face recognition. After successful recognition, manually turn on the lights, and then click the end recording button to end the recording function. The above-mentioned execution entity can automatically generate the corresponding program. If the on-site personnel do not meet the current execution logic, they can press the edit program button of the controller and start editing the logic of each execution code block in each target interface. After the editing is completed, the on-site personnel can press the end editing button to complete the editing and update the edited content to the saved program. Subsequently, the program can be executed, and as long as the face recognition is successful, the lights in the office will automatically turn on.

[0061] In some embodiments, the specific implementation and the technical effects brought by steps 301-302 may refer to Figure 2 Steps 201-202 in the corresponding embodiments, which will not be elaborated here.

[0062] All the above optional technical solutions can be combined arbitrarily to form optional embodiments of the present application, which will not be elaborated one by one here.

[0063] The following are embodiments of the apparatus of the present disclosure, which can be used to execute the method embodiments of the present disclosure. For details not disclosed in the embodiments of the apparatus of the present disclosure, please refer to the method embodiments of the present disclosure.

[0064] Further referring to Figure 4 As an implementation of the above methods in the respective figures, the present disclosure provides some embodiments of a control program generation apparatus, and these apparatus embodiments correspond to Figure 2 The above-mentioned method embodiments.

[0065] As Figure 4 shown, some embodiments of the control program generation apparatus 400 include:

[0066] An acquisition module 401, configured to obtain event change information of at least one target terminal device in the current scene in response to detecting a start recording instruction, and add a corresponding time tag to each event change information.

[0067] A sorting module 402, configured to sort each event change information based on the order of the time tags in response to detecting an end recording instruction, so as to obtain an event execution axis.

[0068] A generation module 403, configured to convert the event execution axis into a logic tree, and generate a control program for the current scene based on the structure of the logic tree.

[0069] In some optional implementation manners of some embodiments, the event change information includes electrical level change data of a point, and the point includes a pin of the controller accessing at least one target terminal device.

[0070] In some optional implementation manners of some embodiments, the control program generation device 400 further includes: an execution module, configured to execute the control program of the target scene, and control the at least one target terminal device to execute corresponding events according to the corresponding time tags.

[0071] In some optional implementation manners of some embodiments, the control program includes at least one execution code block, and each execution code block corresponds to one piece of the event change information.

[0072] In some optional implementation manners of some embodiments, the control program generation device 400 further includes: an editing module, configured to display each execution code block of the target control program and the logical relationship between the execution code blocks to a target interface in response to detecting an editing instruction for the target control program, where the target interface is used to edit the execution logic between the execution code blocks and / or edit the execution logic of at least one execution code block. An update module, configured to update the editing content of the target interface to the target control program in response to detecting an editing completion instruction for the target control program.

[0073] It can be understood that the modules described in the device 400 correspond to the respective steps in the method described in the reference Figure 2 Therefore, the operations, features, and beneficial effects described above for the method also apply to the device 400 and the modules included therein, and will not be elaborated herein.

[0074] Such as Figure 5As shown, the electronic device 500 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 501, which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0075] Generally, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 5 an electronic device 500 with various devices is shown, it should be understood that it is not required to implement or include all the shown devices. More or fewer devices may be implemented or included alternatively. Figure 5 Each block shown in the figure may represent a device or, as needed, multiple devices.

[0076] Specifically, according to some embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the methods shown in the flowcharts. In such some embodiments, the computer program may be downloaded and installed from a network via the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the methods of some embodiments of the present disclosure are executed.

[0077] It should be noted that, in some embodiments of the present disclosure, the above-mentioned computer-readable medium may be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0078] In some embodiments, the client and the server can communicate using any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed network.

[0079] The above computer-readable medium may be included in the above device; or it may exist independently and not be assembled into the electronic device. The above computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device is caused to: in response to detecting a start recording instruction, obtain event change information of at least one target end device in the current scene, and add a corresponding time tag to each event change information; in response to detecting an end recording instruction, sort each event change information based on the order of the time tags to obtain an event execution axis; convert the event execution axis into a logical tree, and generate a control program for the current scene based on the structure of the logical tree.

[0080] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or combinations thereof. The above programming languages include object-oriented programming languages - such as Java, Smalltalk, C++; and also include conventional procedural programming languages - such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network - including a local area network (LAN) or a wide area network (WAN) - or may be connected to an external computer (for example, by connecting through the Internet using an Internet service provider).

[0081] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.

[0082] The modules described in some embodiments of the present disclosure can be implemented in software or in hardware. The described modules can also be provided in a processor. For example, it can be described as:

[0083] An acquisition module, a sorting module, and a generation module. For example, the acquisition module can also be described as "a module for acquiring event change information of at least one target end device in the current scenario".

[0084] In some embodiments, the embodiments of the present disclosure further provide a building automation control system, which is characterized by including:

[0085] A controller for executing the methods described in steps 201 to 203 or steps 301 to 306. At least one end device connected to the controller.

[0086] It can be understood that the various modules described in this building automation control system correspond to the respective steps in the method referred to Figure 2 That is Figure 3 described. Thus, the operations, features, and beneficial effects described above for the method also apply to the building automation control system and the modules included therein, and will not be elaborated herein.

[0087] The functions described above can be at least partially executed by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that can be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), and so on.

[0088] The above description is only some preferred embodiments of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, technical solutions formed by mutually replacing the above features with technical features having similar functions (but not limited to) disclosed in the embodiments of the present disclosure.

Claims

1. A control program generation method, characterized in that: Applied to a controller connected to at least one target terminal device, the method includes: In response to detecting a start recording instruction, acquiring event change information of at least one target terminal device in the current scene, and adding a corresponding time tag to each event change information; In response to detecting an end recording instruction, sorting each event change information based on the order of the time tags to obtain an event execution axis; Converting the event execution axis into a logic tree, and generating a control program for the current scene based on the structure of the logic tree; Wherein, the control program includes at least one execution code block, and each execution code block corresponds to one event change information; The control program for generating the current scene based on the structure of the logic tree includes: According to the tree topology, the event change information corresponding to the previous time point is used as the trigger condition for one or more event change information at the current time point, and then the control program of the current scene is generated; The control program of the current scene includes: A control program that recognizes a target vehicle entering the garage and controls the target elevator to automatically descend to the target floor to pick up the target vehicle; and / or An application that turns off the lights in an office when it detects that no one is in the office for a preset period of time; and / or An application that turns on the lights in the office associated with a target user after successful facial recognition.

2. The method according to claim 1, characterized in that The event change information includes electrical frequency change data of a point, and the point includes a pin of the controller connected to the at least one target terminal device.

3. The method according to claim 1, characterized in that Also includes: Execute the control program of the target scene to control the at least one target terminal device to execute the corresponding event according to the corresponding time tag.

4. The method according to claim 1, wherein The method further comprises: In response to detecting an editing instruction for a target control program, displaying each of the execution code blocks of the target control program and the logical relationship between the execution code blocks on a target interface, wherein the target interface is used to edit the execution logic between the execution code blocks and / or edit the execution logic of at least one execution code block; In response to detecting an edit completion instruction for the target control program, updating the edited content of the target interface to the target control program.

5. A control program generating device, characterized in that: include: an acquisition module, configured to acquire event change information of at least one target terminal device in the current scene in response to detecting a start recording instruction, and add a corresponding time tag to each event change information; a sorting module, configured to, in response to detecting an end recording instruction, sort each event change information based on the order of the time tags to obtain an event execution axis; A generation module, configured to convert the event execution axis into a logic tree and generate a control program for the current scene based on the structure of the logic tree; Wherein, the control program includes at least one execution code block, and each execution code block corresponds to one event change information; The generation module is used to: According to the tree topology, the event change information corresponding to the previous time point is used as the trigger condition for one or more event change information at the current time point, and then the control program of the current scene is generated; The control program of the current scene includes: A control program that recognizes a target vehicle entering the garage and controls the target elevator to automatically descend to the target floor to pick up the target vehicle; and / or An application that turns off the lights in an office when it detects that no one is in the office for a preset period of time; and / or An application that turns on the lights in the office associated with a target user after successful facial recognition.

6. The device according to claim 5, characterized in that The event change information includes electrical frequency change data of a point, and the point includes a pin of the controller connected to the at least one target terminal device.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

9. A building automatic control system, characterized in that: include: A controller, configured to execute the method according to any one of claims 1 to 4; At least one terminal device connected to the controller.

Citation Information

Patent Citations

  • Programmable time sequence control method and system

    CN101042577A

  • Robot programming control method and device

    CN106313052A

  • Reverse programming method and system

    CN108182062A