CN117170297A - Method for controlling PLC (programmable logic controller) equipment and electronic equipment - Google Patents

Method for controlling PLC (programmable logic controller) equipment and electronic equipment Download PDF

Info

Publication number
CN117170297A
CN117170297A CN202210584376.6A CN202210584376A CN117170297A CN 117170297 A CN117170297 A CN 117170297A CN 202210584376 A CN202210584376 A CN 202210584376A CN 117170297 A CN117170297 A CN 117170297A
Authority
CN
China
Prior art keywords
plc
scene
rule
equipment
delay
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210584376.6A
Other languages
Chinese (zh)
Inventor
段正
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202210584376.6A priority Critical patent/CN117170297A/en
Priority to PCT/CN2023/095479 priority patent/WO2023226923A1/en
Publication of CN117170297A publication Critical patent/CN117170297A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • General Engineering & Computer Science (AREA)
  • Manufacturing & Machinery (AREA)
  • Quality & Reliability (AREA)
  • Programmable Controllers (AREA)

Abstract

The application provides a method for controlling PLC equipment and electronic equipment. The whole house intelligent host can analyze the original rule data configured by the user, acquire the data corresponding to the delay attribute rule of each PLC sub-device in different scenes, and embed the delay attribute rule in the different scenes into the PLC sub-devices. In the process that a user expects to control the PLC sub-equipment, the whole-house intelligent host machine only sends a message containing the scene identifier through the broadcast message, so that the PLC sub-equipment can analyze the broadcast message to obtain the scene identifier, and according to the data corresponding to the built-in delay attribute rule of the scene identifier analysis, the delay attribute is extracted, and the delay time is set directly according to the delay attribute, so that the working state of the PLC sub-equipment is changed. The process can realize the distributed control of the PLC sub-equipment in a time delay scene, reduce the number of the messages of the PLC link layer of the whole-house intelligent host, and improve the control success rate of the PLC equipment.

Description

Method for controlling PLC (programmable logic controller) equipment and electronic equipment
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a method for controlling a PLC device and an electronic device.
Background
With the development of digital intelligent age and electronic equipment, whole-house intelligence gradually goes into people's life and gets a great deal of attention. The whole house intelligent host integrating learning, calculation and decision is used as a central control system, the whole house intelligent host collects data, sensor data and internet data of a plurality of devices in a home scene in real time, real-time analysis and calculation are carried out locally, reasonable decision is formed, the plurality of devices in the home scene are controlled, multi-condition dynamic pre-judgment is realized, and the use experience of users is improved and enriched.
By taking power line communication (power line communication, PLC) as an example, a full-house intelligent system is formed by a full-house intelligent host and PLC sub-equipment, and control signals and data are transmitted through the power line by the full-house PLC, so that stable and reliable connection of electricity with a network is realized, and a brand-new intelligent home solution is also realized.
In a full-house intelligent system including a plurality of PLC sub-devices, when the full-house intelligent host executes a rule with a delay attribute, the full-house intelligent host has low control efficiency on the PLC sub-devices, and particularly when the number of PLC messages per second exceeds 20, the full-house intelligent host may not realize accurate control on the PLC sub-devices, resulting in low control success rate. In addition, when the whole house intelligent host fails, a PLC message with a time delay attribute cannot be generated, and the PLC sub-equipment cannot be controlled.
Disclosure of Invention
The application provides a method for controlling PLC equipment and electronic equipment, which can realize the distributed control of a whole-house intelligent host to PLC sub-equipment under a time delay scene, reduce the number of PLC link layer messages of the whole-house intelligent host and improve the control success rate of the PLC equipment.
A first aspect provides a method of controlling a power line communication, PLC, device, the method comprising: determining a PLC device to be controlled, and acquiring one or more working scenes which can be supported by the PLC device and working parameters associated with each working scene; generating one or more delay attribute rules according to the one or more working scenes and the working parameters associated with each working scene, and sending the one or more delay attribute rules to the PLC equipment; receiving a service request, wherein the service request comprises a scene identifier of the PLC equipment; and responding to the service request, generating a broadcast message, and sending the broadcast message to the PLC equipment, wherein the broadcast message carries the scene identifier.
By the method, the whole-house intelligent host can acquire data corresponding to the delay attribute rules of each PLC sub-device in different scenes, create the delay attribute rules in different scenes according to the conversion rules, and embed the delay attribute rules in the different scenes into the PLC sub-devices. In the process that a user expects to control the PLC sub-equipment, the whole-house intelligent host computer only sends a message containing the scene identifier through the broadcast message, and the scene identifier is transmitted to the PLC sub-equipment, so that the PLC sub-equipment can analyze the broadcast message to obtain the scene identifier, extract the delay attribute according to the data corresponding to the delay attribute rule built-in by analyzing the scene identifier, and directly set the delay time according to the delay attribute to change the working state of the PLC sub-equipment. The process can realize the distributed control of the PLC sub-equipment in a time delay scene, reduce the number of the messages of the PLC link layer of the whole-house intelligent host, and improve the control success rate of the PLC equipment.
It should be understood that, in the embodiment of the present application, the whole-house intelligent system may include various "PLC devices" that perform communication based on a PLC protocol, for example, a whole-house intelligent host, a PLC sub-device, and the like all belong to the PLC device, where the "whole-house intelligent host" may also be referred to as a PLC master device, and other devices controlled by the PLC master device are referred to as "PLC sub-devices".
It should also be understood that, in an embodiment of the present application, the "Scene ID" may indicate different working scenes that the PLC device can support, for example, for an illumination lamp in a home Scene, there may be a "viewing Scene", "leaving home Scene", "reading Scene", etc., and the illumination lamp may have different working parameters in each of the scenes.
It should also be understood that, in the embodiments of the present application, the "delay attribute rule" may also be referred to as "delay rule", "delay attribute", and the like, and the embodiments of the present application do not limit what is included in the "delay attribute rule".
Optionally, the one or more delay attribute rules may include data or information such as a lighting rule, an operating parameter, and the like related to the delay attribute rule corresponding to the PLC sub-device in a plurality of different scenarios.
Optionally, the one or more delay attribute rules further include one or more of device identification, service identification, channel identification, data type information, data length information, and attribute rule data parameter values of the PLC device.
In a possible implementation manner, the "one or more delay attribute rules" referred to in the embodiments of the present application may be preconfigured in each device, that is, the inherent attribute of each PLC device.
In another possible implementation manner, the "one or more delay attribute rules" related in the embodiments of the present application may be that, in a use process, a user triggers a configuration flow through an application program such as dimension installation, intelligent life, etc., and configures the "one or more delay attribute rules" to a PLC device, which is not limited in the embodiments of the present application.
Through the method, when the whole-house intelligent host fails, the whole-house intelligent host can be triggered to send the broadcast message at the PLC link layer through the PLC switch or the physical key and the like, and the broadcast message comprises the Scene ID (Scene ID), so that the controllability of the time delay rule can be realized after the whole-house intelligent host is disconnected, and the control efficiency of the equipment is improved.
It should be understood that the PLC switch or physical key may be independent of the whole-house intelligent host, i.e., an independent control device of the whole-house intelligent host, and be connected wirelessly or by wire with the whole-house intelligent host. For example, a PLC switch or physical key may be disposed near a entrance vestibule in a home scene, and provided to a user in the form of a control panel for the user to operate.
Or, the PLC switch or the physical key may also be a component of the whole-house intelligent host, that is, a device disposed on the whole-house intelligent host, which is not limited in the embodiment of the present application.
With reference to the first aspect, in certain implementation manners of the first aspect, the method further includes: receiving original rule data configured by a user through a target application program, or acquiring preset original rule data, wherein the original rule data comprises equipment information of the PLC equipment, scene identifiers of one or more working scenes which can be supported by the PLC equipment and working parameters associated with each working scene; and the obtaining one or more working scenes that the PLC device can support and working parameters associated with each working scene includes: and acquiring scene identifiers of one or more working scenes which can be supported by the PLC equipment and working parameters associated with each working scene according to the original rule data.
Through the method, a user can configure original rule data to the whole-house intelligent host through the APP for assembly, maintenance, intelligent life and the like, the whole-house intelligent host can analyze the original rule data, acquire data corresponding to the delay attribute rules of each PLC sub-device in different scenes, create the delay attribute rules in different scenes into a preset data format according to the conversion rules, and embed the delay attribute rules in different scenes into the PLC sub-devices so as to realize distributed control of the PLC sub-devices in the delay scenes, reduce the number of messages of a PLC link layer of the whole-house intelligent host, and improve the control success rate of the PLC devices.
With reference to the first aspect and the foregoing implementation manner, in some implementation manners of the first aspect, the target application program is any one of an installation application and a smart life application.
With reference to the first aspect and the foregoing implementation manners, in some implementation manners of the first aspect, the generating one or more delay attribute rules includes: and generating one or more delay attribute rules according to a preset data format.
With reference to the first aspect and the foregoing implementation manners, in some implementation manners of the first aspect, the one or more working scenarios include a stop scenario and/or a start scenario.
By the method, the whole house intelligent host can also build or add delay attribute rules corresponding to the stopping scene and/or the starting scene. For example, when the PLC sub-device receives a broadcast message including a scene identifier of "stop scene", the PLC sub-device may be controlled to stop executing the delay attribute rule by the delay attribute rule corresponding to the "stop scene", and rule data built in the PLC sub-device is deleted, so as to stop the time timer of the PLC sub-device. The process expands the content of the PLC protocol, increases the controllability of the PLC sub-equipment and improves the user experience.
A second aspect provides a method of controlling a power line communication PLC device, the PLC device storing one or more delay attribute rules, each delay attribute rule associated with an operational scenario that the PLC device is capable of supporting, and each delay attribute rule for indicating an operational parameter of the PLC device in the associated operational scenario, the method comprising: receiving a broadcast message, and acquiring a current working scene identifier of the PLC equipment included in the broadcast message; and determining a target rule from the one or more delay attribute rules according to the current working scene identification, and analyzing and executing the target rule.
Through the method, the whole house intelligent host can send a message containing the scene identifier through the broadcast message, when the PLC sub-equipment receives the broadcast message, the broadcast message can be analyzed to obtain the scene identifier, the data corresponding to the built-in delay attribute rule is analyzed according to the scene identifier, the delay attribute is extracted, the delay time is set directly according to the delay attribute, and the working state of the PLC sub-equipment is changed. The process can realize the distributed control of the PLC sub-equipment in a time delay scene, reduce the number of the messages of the PLC link layer of the whole-house intelligent host, and improve the control success rate of the PLC equipment.
With reference to the second aspect, in certain implementations of the second aspect, the one or more latency attribute rules have a preset data format.
With reference to the second aspect and the foregoing implementation manner, in some implementation manners of the second aspect, the working scenario includes a stop scenario and/or a start scenario.
With reference to the second aspect and the foregoing implementation manner, in some implementation manners of the second aspect, one or more of a device identifier, a service identifier, a channel identifier, data type information, data length information, and an attribute rule data parameter value of the PLC device are further included in the one or more delay attribute rules.
When the whole-house intelligent host fails, the mode can trigger the whole-house intelligent host to send a broadcast message on the PLC link layer through a PLC switch or a physical key and the like, and the broadcast message comprises a Scene identifier (Scene ID) so that the controllability of a time delay rule can be still realized after the whole-house intelligent host is disconnected, and the control efficiency of equipment is improved.
A third aspect provides an electronic device having one or more memories and one or more processors, a module having a plurality of applications installed, the one or more processors for executing one or more computer programs stored in the one or more memories, which when executed by the processor, cause the electronic device to perform the method of any of the first and second aspects.
It should be understood that the electronic device may be a whole-house intelligent host, and the whole-house intelligent host may parse the original rule data, obtain data corresponding to the delay attribute rule of each PLC sub-device in different scenes, create the delay attribute rule in different scenes into a preset data format according to the conversion rule, and embed the delay attribute rule in different scenes into the PLC sub-device. In the process that a user expects to control the PLC sub-equipment, the whole-house intelligent host computer only sends a message containing the scene identification through a broadcast message, and the scene identification is transmitted to the PLC sub-equipment.
A fourth aspect provides an electronic device having one or more memories, and one or more processors for executing one or more computer programs stored in the one or more memories, which when executed by the processor, cause the electronic device to perform the method of any of the second and third aspects.
It should be understood that the electronic device may be a PLC sub-device in a home scene, and when the PLC sub-device receives a broadcast message sent by a whole-house intelligent host, the PLC sub-device may parse the broadcast message to obtain a scene identifier, parse data corresponding to a built-in delay attribute rule according to the scene identifier, extract a delay attribute, directly set a delay time according to the delay attribute, and change its working state. The process can realize the distributed control of the PLC sub-equipment in a time delay scene, reduce the number of the messages of the PLC link layer of the whole-house intelligent host, and improve the control success rate of the PLC equipment.
A fifth aspect provides an apparatus, the apparatus being comprised in an electronic device, the apparatus having functionality to implement the electronic device behaviour of the first aspect or any one of the possible implementations of the first aspect.
The functions of the device can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules or units corresponding to the functions described above. Such as a display module or unit, a detection module or unit, a processing module or unit, etc.
A sixth aspect provides an apparatus for inclusion in an electronic device, the apparatus having functionality to implement the electronic device behaviour of the second aspect or any one of the possible implementations of the second aspect.
The functions of the device can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules or units corresponding to the functions described above. Such as a display module or unit, a detection module or unit, a processing module or unit, etc.
A seventh aspect provides a computer readable storage medium storing computer instructions that, when run on an electronic device, cause the electronic device to perform any one of the possible methods of the first aspect or the second aspect or any one of the possible methods of the second aspect described above.
An eighth aspect provides a computer program product for causing an electronic device to perform the above-described or any one of the possible methods of the first aspect, the second aspect or any one of the possible methods of the second aspect when the computer program product is run on the electronic device.
Drawings
FIG. 1 is a schematic diagram of an example of a whole house intelligent system.
Fig. 2 is a schematic diagram of a control process of a full-house intelligent system according to an embodiment of the present application.
Fig. 3 is a schematic structural diagram of an example PLC device according to an embodiment of the present application.
Fig. 4 is a schematic flowchart of an example of a method for controlling a PLC device according to an embodiment of the present application.
Fig. 5 is a schematic view of an exemplary use stage according to an embodiment of the present application.
Detailed Description
FIG. 1 is a schematic diagram of an example of a whole house intelligent system.
By way of example, taking a full-house intelligent system as shown in fig. 1, the full-house intelligent system may include various "PLC devices" that communicate based on a PLC protocol, such as a full-house intelligent host, a PLC sub-device, etc., all belong to a PLC device, where the "full-house intelligent host" may also be referred to as a PLC master device, such as the PLC master device 10 shown in fig. 1; other devices controlled by the PLC master device are referred to as "PLC sub-devices", such as the PLC sub-device 20 shown in fig. 1.
Alternatively, the PLC sub-device 20 may include one or more types of home devices, such as a plurality of lamps (e.g., the lamps 21, 22, and 23 shown in fig. 1, etc.), an air conditioner 24, and a router 25, and the PLC sub-device 20 may also include a set top box, a smart box, a refrigerator, an oven, a smart screen, etc. in a home scene, which are not shown, and the kind and number of the PLC sub-device 20 are not limited in the embodiment of the present application.
For the whole-house intelligent system shown in fig. 1, the PLC master device 10 can be used as a central control system, relies on a PLC whole-house network and a wireless local area network (wireless local area networks, WLAN) covered at high speed (for example, a wireless fidelity (wireless fidelity, wi-Fi) network), and the PLC master device 10 performs distributed information processing and intelligent decision-making on the whole-house environment, user behaviors, system devices and the like, so that immersive and personalized whole-scene intelligent experience is brought to the user.
Fig. 2 is a schematic diagram of a control process of a full-house intelligent system according to an embodiment of the present application. Illustratively, as shown in fig. 2, the control process of the whole house intelligent system includes the following steps:
201, a user configures rule data for a whole house intelligent system through an Application (APP). Specifically, the user may configure rule data for the PLC master device 10 in the whole house intelligent system through a certain application program.
It should be understood that, in the embodiment of the present application, the "rule data" may also be referred to as "attribute rule" or the like, and the "rule data" may include a control message or a control instruction for controlling the operation state of one or more PLC sub devices 20 in the home scenario listed in fig. 1, or the like.
Optionally, when the controlled PLC sub-device has a delay attribute rule, for example, a PLC sub-device is turned on after several seconds or turned off after several seconds, the "rule data" may also be referred to as "delay rule", "delay attribute rule", and the like, and the content included in the "rule data" is not limited in the embodiment of the present application.
By way of example, taking the illumination lamp 21 in fig. 1 as an example, the "rule data" may include any one or more instructions related to the operating state, such as controlling the on time, the off time, the light color, the light brightness, the color temperature, etc. of the illumination lamp 21, for example, the illumination lamp 21 is operated at the 1 st second on, the 2 nd second off, and the 3 rd second on … … rule with a delay attribute.
It should also be understood that the application program for configuring rule data for the whole house intelligent system by the user may include an after-sale service APP created by a third party company such as a maintenance company for installation and maintenance personnel, an APP capable of enabling interconnection and interworking between intelligent devices such as smart life developed by a Hua-for company, or other APP of a more type, which is not limited in the embodiment of the present application.
Alternatively, the application program of the user configuration rule data may be installed on a device that is used daily, such as a mobile phone, a tablet, or the like of the user, or may be installed on the PLC host device 10 having an operation panel or physical keys, which is not limited in the embodiment of the present application.
202, the plc master device 10 parses the rule data.
203, the PLC master device 10 determines attribute rules of the PLC sub device 20 according to the rule data.
204, the PLC master device 10 issues a control message to the PLC sub device 20.
205, the plc sub device 20 executes the instruction according to the control message.
It should be understood that in the above implementation process, the PLC master device 10 may store rule data configured by a user, parse the rule data about the working state and the working parameters of the PLC sub device 20, and generate a control message and send the control message to the PLC sub device 20, so that the PLC sub device responds.
It should also be understood that, in the embodiments of the present application, the "control message" may also be referred to as a "control instruction", "PLC message", etc., which are not limited in the following embodiments.
In a possible implementation manner, the user may trigger the PLC master device 10 to issue a control instruction to the PLC sub device 20 through the APP such as assembly, smart life, or through an operation panel, physical keys, etc. of the PLC master device 10, which is not limited in the embodiment of the present application.
Specifically, the user may trigger to notify the PLC master device 10 to execute a certain control rule, and when the PLC master device 10 determines that the PLC slave device 20 to be controlled and a certain control rule that the PLC slave device 20 needs to execute currently, the PLC master device 10 may parse a related instruction in the stored rule data, generate a control message according to the related instruction, and send the control message to the PLC slave device 20, so that the PLC slave device 20 responds according to the instruction in the control message.
For example, taking the lighting lamp 21 in fig. 1 as an example, the PLC master device 10 determines that the user triggers the current working state of controlling the lighting lamp 21, for example, after determining that the starting time of the lighting lamp 21 is 1 second, the PLC master device 10 may generate a control message according to the obtained instruction, send the control message to the lighting lamp 21 through the PLC power line, and the lighting lamp 21 responds according to the instruction in the control message, and then starts and lights after 1 second. Likewise, the user may trigger any one of the instructions such as the on time, the off time, the light color, the light brightness, the color temperature, etc. of the illumination lamp 21, and generate a control message for each instruction, and send the control message to the illumination lamp 21, so that the illumination lamp 21 responds according to the instruction in the control message.
In the full house intelligent system including a plurality of PLC sub-devices with respect to the scenes described in fig. 1 and 2, when the PLC master device 10 controls the plurality of PLC sub-devices, a problem of low control efficiency may be caused. For example, if the PLC master device 10 needs to generate control messages of multiple PLC sub devices every second, and the PLC master device 10 needs to continuously generate control messages of a certain PLC sub device every second, in other words, there is control message generation and transmission on the message transmission channel every second. When the number of PLC messages generated by the PLC master device 10 per second exceeds 20, the PLC messages are likely to be jammed and the transmission channel is likely to be blocked, so that the control efficiency of the PLC master device 10 on the plurality of PLC sub devices is low.
In addition, if a plurality of PLC sub-devices controlled by one PLC master device 10 execute a "delay rule" with a delay attribute, congestion of the number of PLC messages will cause the PLC master device 10 to fail to precisely control the operation state of each PLC sub-device, resulting in a low control success rate.
Furthermore, in the existing control mechanism, the PLC sub-device does not have the capability of resolving the "delay rule" with the delay attribute, and can only receive the PLC message of the whole house intelligent host PLC master device 10 and respond; or, the PLC sub-device does not have a timing function, and cannot respond according to the delay instruction in the "delay rule". When the whole-house intelligent host computer PLC master device 10 fails, that is, the PLC master device 10 cannot generate a PLC message with a time delay attribute, that is, cannot send a control message to the PLC sub-device, the PLC master device 10 cannot control any one of the PLC sub-devices with the time delay attribute in the whole-house intelligent system, and the "time delay rule" cannot be normally executed, so that the use experience of a user is affected.
In view of the above problems, an embodiment of the present application provides a method for controlling a PLC device, which can improve the control efficiency of a PLC sub-device in a full-house intelligent system, and can ensure the execution efficiency and improve the success rate of controlling the PLC sub-device in an execution scenario including a "delay rule".
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
It should be understood that, the PLC master device 10 and the PLC sub device 20 may be collectively referred to as a "PLC device", and the method provided by the embodiment of the present application may be applied to the "PLC device", for example, to the PLC master device 10 (i.e., the whole house smart host) or the PLC sub device 20 described in fig. 1 and 2.
It should also be understood that the PLC master device 10 and the PLC slave device 20 may be the same type of device, have the same structure, and the PLC master device 10 and the PLC slave device 20 may also be different types of devices, have different structures, and the embodiment of the present application is not limited thereto.
Alternatively, the PLC host device 10 may be a full-house smart host manufactured by wagons, and with the development of technology, the PLC host device 10 may also be an electronic device integrated with learning, computing, and decision-making functions of a central control system, such as a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (augmented reality, AR)/Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, a personal digital assistant (personal digital assistant, PDA), and the like, which are not limited in this embodiment of the present application.
The PLC sub-device 20 may also be any device capable of communicating with the PLC main device 10 based on a PLC protocol in the home scene, such as a lighting lamp, a set top box, a smart box, a refrigerator, an oven, a smart screen, etc. in the home scene as illustrated in fig. 1, and the specific type of the PLC sub-device is not limited in the embodiment of the present application.
Fig. 3 is a schematic structural diagram of an example PLC device according to an embodiment of the present application.
It should be understood that PLC master device 10 and PLC slave device 20 of the present embodiment may include some or all of the structures of PLC device 100 shown in fig. 3, or may include other structures not shown, which are not limited in this embodiment of the present application.
For example, as shown in fig. 3, the PLC device 100 may include a processor 110, an external memory interface 120, an internal memory 121, an interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, a sensor module 170, keys 191, an indicator 192, a camera 193, a display 194, and the like.
Wherein the sensor module 170 may include a temperature sensor 170A, an ambient light sensor 170B, etc.
It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the PLC apparatus 100. In other embodiments of the present application, PLC device 100 may include more or less components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
Among them, the controller may be a neural center and a command center of the PLC apparatus 100. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In the embodiment of the present application, the PLC device 100 may include both the PLC main device 10 and the PLC sub device 20. The processor 110 of the PLC device 100 stores a computer program or instructions corresponding to the method of implementing the control of the PLC device.
For example, for the PLC master device 10, the PLC master device 10 may be used as a whole-house intelligent host, and may parse the configured original rule data, obtain data corresponding to the delay attribute rule of each PLC sub-device 20 in different scenes, create the delay attribute rule in different scenes into a preset data format according to the conversion rule, and embed the delay attribute rule in different scenes into the PLC sub-device. In the process that a user expects to control the PLC sub-equipment, the whole-house intelligent host machine only sends a message containing the scene identifier through a broadcast message, the scene identifier is transmitted to the PLC sub-equipment, the distributed control of the PLC sub-equipment under a time delay scene is realized, the number of the messages of the PLC link layer of the whole-house intelligent host machine is reduced, and the control success rate of the PLC equipment is improved.
For the PLC sub-device 20, data corresponding to the delay attribute rule in different scenarios sent by the full-house intelligent host may be received and stored. In the process that a user expects to control the PLC sub-equipment, the whole-house intelligent host computer only sends a message containing the scene identifier through the broadcast message, the scene identifier is transmitted to the PLC sub-equipment, the PLC sub-equipment can analyze the broadcast message to obtain the scene identifier, and according to the data corresponding to the built-in delay attribute rule of the scene identifier analysis, the delay attribute is extracted, and the working state of the whole-house intelligent host computer is changed by setting the delay time according to the delay attribute.
In some embodiments, the processor 110 may include one or more interfaces 130. Interface 130 may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
It should be understood that the interfacing relationship between the modules illustrated in the embodiment of the present application is only schematically illustrated, and is not limited to the structure of the PLC device 100. In other embodiments of the present application, the PLC device 100 may also use different interfacing manners, or a combination of multiple interfacing manners, to implement communication between the PLC main device 10 and the PLC sub device 20, which is not limited in the embodiments of the present application.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of the wired charger through the interface 130. The charge management module 140 may also supply power to the PLC device 100 through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the PLC device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in PLC device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G/6G wireless communication applied to the PLC device 100.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., applied to the PLC device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of PLC device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that PLC device 100 may communicate with a network and other devices via wireless communication techniques.
For example, in the embodiment of the present application, communication may be performed between the PLC master device 10 and the PLC slave device 20 based on a PLC protocol, and when a user controls the PLC master device 10 or the PLC slave device 20 through a portable device such as a mobile phone or a tablet, communication may be performed between the PLC master device 10 (or the PLC slave device 20) and the mobile phone through a Wi-Fi mode, bluetooth mode, or the like, which is not limited in the embodiment of the present application.
The PLC device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. In some embodiments, PLC device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The camera 193 of the PLC device 100 has a photographing function, and the camera 193 is used to capture still images or videos. In some embodiments, PLC device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the PLC device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The processor 110 executes various functional applications of the PLC device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data (e.g., audio data, phonebook, etc.) created during use of the PLC device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The temperature sensor 170A is used to detect temperature. In some embodiments, PLC device 100 utilizes the temperature detected by temperature sensor 170A to execute a temperature processing strategy. For example, the temperature sensor 170A may collect the temperature in a home scene and determine by the PLC master device 10 whether to turn on the air conditioner or adjust the operating temperature of the air conditioner, or the like.
The ambient light sensor 170B is used to sense ambient light level. For example, the ambient light sensor 170B may collect the light brightness in the home scene, and determine by the PLC master device 10 whether to adjust the operating brightness of the illumination lamp, or the like.
The key 191 may be a mechanical key or a touch key. The PLC device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the PLC device 100.
The indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, etc.
Fig. 3 illustrates an exemplary structure that the PLC master device 10 or the PLC sub device 20 may have, and it should be understood that the PLC master device 10 or the PLC sub device 20 may have some or all of the structures illustrated in fig. 3, or have other different structures not illustrated, and embodiments of the present application are not limited thereto.
For easy understanding, the following embodiments of the present application will take the PLC device 100 having the structure shown in fig. 3 as an example, and the method for controlling the PLC device provided by the embodiments of the present application will be specifically described with reference to the accompanying drawings and application scenarios.
Fig. 4 is a schematic flowchart of an example of a method for controlling a PLC device according to an embodiment of the present application. In connection with the home scenario shown in fig. 1, the method 400 may include two phases as shown in fig. 4:
the first stage: configuration phase
It should be understood that the "configuration phase" can be understood as: a process of configuring data related to the attribute rules related to the work for the PLC master device and/or the PLC slave device. The process may have different implementations.
In a possible implementation manner, the "data related to the attribute rule related to the operation of the PLC master device and/or the PLC sub device" related to the embodiment of the present application may be preconfigured in each device, that is, the inherent attribute of each device.
Illustratively, taking the illumination lamp 21 in the home scenario shown in fig. 1 as an example, the illumination lamp 21 is configured with preset attribute rules at the time of production and delivery. Similarly, the illuminating lamp 22 may be configured with a preset attribute rule at the time of production and delivery, where the preset attribute rule of the illuminating lamp 21 and the preset attribute rule of the illuminating lamp 22 may be the same or different, which is not limited in the embodiment of the present application.
In another possible implementation manner, the "data related to the attribute rule related to the operation of the PLC master device and/or the PLC sub device" in the embodiment of the present application may be that, in a use process, a user triggers a configuration flow through an application program such as dimension installation, intelligent life, etc., and further executes the first stage (configuration stage), which is not limited in the embodiment of the present application.
Illustratively, in this implementation, the configuration phase may include the following steps, shown in FIG. 4:
401, a user configures original rule data for the PLC master device 10 in the whole house intelligent system through the APP of the installation, maintenance, intelligent life, etc.
It should be understood that the "original rule data" may refer to the relevant description of step 201, and the process of step 401 may refer to the implementation process of step 201, which is not repeated herein for simplicity.
402, the PLC master device 10 analyzes the original rule data, determines the delay attribute of the PLC sub device 20 in different scenes according to the original rule data, and generates delay attribute rules corresponding to different scenes.
403, the PLC master device 10 transmits the delay attribute rules corresponding to the different scenes to the corresponding PLC sub devices 20.
404, the plc sub device 20 stores the delay attribute rules corresponding to different scenes.
Optionally, for multiple PLC sub-devices in the home scenario shown in fig. 1, each PLC sub-device may have a different latency attribute rule, and multiple PLC sub-devices may also have the same latency attribute rule, and each PLC sub-device may also have latency attribute rules in multiple different scenarios.
In a possible scenario, for any PLC sub-device in the home scenario, the PLC master device 10 may create and generate a new rule according to the delay attribute included in the original rule data and provided in the different scenarios of the PLC sub-device, and in the embodiment of the present application, the new rule created and generated by the PLC master device 10 in step 402 for the PLC sub-device is referred to as a "delay attribute rule", and the delay attribute rule may have a preset data format.
Optionally, the "latency attribute rules" created and generated by the PLC master device 10 for the PLC sub-device may include device information for the PLC sub-device.
For example, assuming that the illumination lamp 21 can work according to different delay attribute rules in different scenes, after the PLC master device 10 analyzes the original rule data, the device information of the illumination lamp 21 can be accurately known, and the delay attribute of the illumination lamp 21 can be in different scenes. Subsequently, the PLC master device 10 may create a delay attribute rule of the illumination lamp 21 in different scenes according to the different scenes.
Optionally, the delay attribute rule may include data or information such as a lighting rule, an operating parameter, etc. related to the delay attribute rule corresponding to the PLC sub-device in a plurality of different scenarios.
Illustratively, taking the illumination lamp 21 shown in fig. 1 as an example, the illumination lamp 21 has different lighting rules in different scenes. For example, the illumination lamp 21 has the following different working scenarios and corresponding attribute rules in the working scenarios:
(1) "viewing scene": "1 st second on, 2 nd second blue, 3 rd second red, 4 th second green, 5 th second yellow … …";
(2) "away from home scene": the 5 th second after leaving the home mode is closed at fixed time;
(3) "reading scene": the first 1 st second is started and switched to the maximum brightness and the eye protection mode.
The above listed attribute rules of the illumination lamp 21 corresponding to three different scenes may be preset in the original rule data configured in step 401, and the PLC master device 10 may parse the original rule data and create a "delay attribute rule" in a preset data format for each of the "viewing scene", "leaving scene" and "reading scene" based on the process of step 402.
Table 1 lists one possible "delay attribute rule" for a "viewing scene". For example, as shown in table 1, after analyzing the original rule data, the PLC master device 10 may create a new "delay attribute rule" corresponding to the "viewing scene" according to a preset data format.
Optionally, the "latency attribute rule" may include one or more basic information among transmission direction information of the Data stream (e.g., micro control unit (microcontroller unit, MCU) of PLC master device 10 issues to CC0 module), system command (cmd) information, media access control address (destination media access control address, dest MAC Addr) information of PLC sub device (e.g., MAC Addr of illumination lamp 21), length of User Data (User Data Len) information, PLC protocol major version number, PLC protocol minor version number, sequence number (Sequence number), attribute code (Func code), status code (Status code), short address of node (DEV Addr) information.
Optionally, the "delay attribute rule" may further include data or information related to the delay attribute rule corresponding to the "viewing scene".
For example, the data or information related to the delay attribute rule corresponding to the "viewing scene" includes: the Scene identifier (Scene identification, scene ID), service identifier (service identification, SI ID), channel identifier (channel identification, CI ID), data Type (Data Type), data length (Data Len), and attribute rule Data parameter Value (Data Value) of the "viewing Scene" are not limited in this embodiment of the present application.
Optionally, the Data or information related to the delay attribute rule corresponding to the "viewing scene" may further include a bit (byte) number corresponding to each Data (Data), which is not limited in the embodiment of the present application.
TABLE 1
/>
It should be understood that the "delay attribute rule" is a unique attribute rule corresponding to each PLC sub-device, the attribute rule in table 1 corresponds to a unique MAC Addr of the illumination lamp 21, and the delay attribute rule corresponding to the "viewing scene" may be transmitted to the illumination lamp 21 according to the MAC Addr in step 403 for storage.
In table 1, data or information related to the delay attribute rule corresponding to the "movie scene" is listed. The Scene identifier (Scene ID) may indicate the current "viewing Scene", and the Data corresponding to the SI ID to the Data Value may convert the instruction into an instruction that can be identified by the lighting lamp 21 at the software layer, so as to indicate the physical actions that can be executed by the lighting lamp 21, such as the actions of opening, closing, color changing, brightness adjustment, etc., which are not limited in the embodiment of the present application.
It should be further understood that the Data corresponding to the SI ID to the Data Value may be understood as Data or information related to the newly created "delay attribute rule", for example, the SI ID and the CI ID may be used to identify advanced attributes of the PLC sub-device, the action 1 in table 1 may represent an instruction of "delay (0 x 0045)", the action 2 may represent an instruction … … of "delay (0 x 0816)", that is, each action defines that the lighting lamp 21 may actually perform a control action according to "waiting x seconds" in the "viewing scene", so that all actions are sequentially performed, and the lighting lamp 21 may be implemented to work according to the Data related to the delay attribute rule corresponding to the "viewing scene", which is not described later.
It should also be understood that each PLC sub-device may have one or more of the "delay attribute rules" listed in table 1. For example, table 1 lists data or information related to a delay attribute rule corresponding to a "movie scene", and it is assumed that the lighting lamp also has a "leaving home scene" and a "reading scene", and each scene may correspond to the data or information related to the delay attribute rule shown in table 1; likewise, for other PLC sub-devices in the home scenario in fig. 1, each PLC sub-device may have one or more delay attribute rules corresponding to different scenarios, which will not be described in detail in the following embodiments.
Alternatively, the PLC master device 10 may send data or information related to the delay attribute rule corresponding to the "viewing scene" listed in table 1 to the PLC sub device 20 through a PLC message, which is not limited in the embodiment of the present application.
Through the above-mentioned steps 401-404 in the first stage, each of the one or more PLC sub-devices 20 in the home scene may preset a delay attribute rule corresponding to a different scene, for example, the lighting lamp 21 in the home scene shown in fig. 1 may preset a delay attribute rule corresponding to a "viewing scene" listed in table 1, and may also preset a delay attribute rule corresponding to a "leaving-home scene", and data or information related to attribute rules corresponding to a plurality of different scenes, such as a delay attribute rule corresponding to a "reading scene", respectively.
It should be appreciated that the steps 401-404 process in the first stage may have different execution opportunities. For example, the process may occur when the user installs the PLC master device and the PLC slave device for the first time in the home scenario, or in the embodiment of the present application, the PLC master device and the PLC slave device may include a preset attribute rule, that is, the delay attribute rule may be configured in the PLC slave device as a preset rule, which is not limited in the embodiment of the present application.
And a second stage: stage of use
It should be understood that the "use phase" can be understood as: and controlling each PLC sub-device to work according to the delay attribute rule corresponding to the scene expected by the current user. Alternatively, the process may have different triggering patterns, such as step 405-1 and step 405-2.
405-1, the plc master device 10 receives a service request, which may include a scene identification.
Illustratively, the user may generate a service request through an APP for assembly, smart life, etc., for example, the service request includes a Scene identifier (Scene ID) of "viewing mode", and after receiving the service request, the PLC host device 10 obtains the Scene identifier (Scene ID) in the service request.
Alternatively, the implementation process according to step 405-2:
405-2, the user triggers the PLC master device 10 to acquire the current scene identification through the PLC switch.
For example, a control panel or a physical key with a switch function may be installed in a home Scene, when a user triggers an illumination lamp in the home to enter a "viewing mode" through a PLC switch of the control panel or the physical key, the trigger instruction may be transmitted to the PLC master device 10, and after the PLC master device 10 receives the trigger instruction, the current Scene identifier (Scene ID) is obtained.
Alternatively, the user may set the current Scene through the PLC switch, and the PLC master device 10 directly acquires the Scene identification (Scene ID); or, the user only triggers the illumination lamp 21 to start working and change color through the PLC switch, and the PLC master device 10 judges or screens the rule that the current Scene may be the "viewing mode" according to the color change rule of the illumination lamp 21, so that the PLC master device 10 locates the current Scene as the "viewing mode" and obtains the Scene identifier (Scene ID), which is not limited in the embodiment of the present application.
At 406, plc master device 10 obtains the scene identification and generates a broadcast message based on the scene identification.
407, the PLC master device 10 transmits the broadcast message to the PLC sub device 20.
408, the plc sub device 20 determines a delay attribute rule corresponding to the scene according to the scene identifier included in the broadcast message, and executes the delay attribute rule.
Specifically, the PLC master device 10 may broadcast a Scene identification (Scene ID) to the PLC link layer through a broadcast message, and the PLC sub device 20 determines a current Scene from the stored one or more scenes according to the Scene identification (Scene ID) included in the broadcast message after receiving the broadcast message. For example, the current "viewing mode" is determined according to the Scene identification (Scene ID), that is, the delay attribute rule corresponding to the "viewing mode" is determined, and the delay attribute rule corresponding to the "viewing mode" is executed. In other words, after the PLC sub-device 20 receives the broadcast message, it searches and parses the data or information related to the delay attribute rule from itself, extracts the delay attribute, sets the own delay time according to the delay attribute, and switches the own operating state according to the delay time.
Fig. 5 is a schematic view of an exemplary use stage according to an embodiment of the present application.
As shown in fig. 5, in one possible manner, a user may trigger the PLC master device 10 to send a broadcast message to one or more PLC sub-devices, including a Scene ID, by generating a service request through an APP for maintenance, smart life, etc.
In another possible manner, the user may trigger the PLC master device 10 to send a broadcast message at the PLC link layer through the PLC switch, where the broadcast message includes a Scene ID (Scene ID).
It should be understood that the PLC switch or physical key may be independent of the whole-house intelligent host, i.e., an independent control device of the whole-house intelligent host, and be connected wirelessly or by wire with the whole-house intelligent host. For example, a PLC switch or physical key may be disposed near a entrance vestibule in a home scene, and provided to a user in the form of a control panel for the user to operate.
Or, the PLC switch or the physical key may also be a component of the whole-house intelligent host, that is, a device disposed on the whole-house intelligent host, which is not limited in the embodiment of the present application.
In this way, when the PLC master device fails, the user may trigger the PLC master device to send a broadcast message at the PLC link layer through the PLC switch or the physical key, where the broadcast message includes a Scene ID (Scene ID). After receiving the broadcast message, the PLC sub-equipment can still determine the delay attribute rule to be executed according to the Scene identification (Scene ID) in the broadcast message, and execute the related control instruction according to the corresponding delay attribute rule.
In yet another possible implementation manner, the PLC master device 10 may also control the PLC sub device 20 to stop executing the delay attribute rule executed in steps 406 to 408 by building or adding a "stop scene" in the PLC protocol, through the delay attribute rule corresponding to the "stop scene". In other words, in step 402, when the PLC master device 10 creates and generates a "delay attribute rule" corresponding to a different Scene for the PLC sub device 20, a delay attribute rule corresponding to a "stop Scene" is also created, when the Scene identifier (Scene ID) in the broadcast message in step 407 indicates the "stop Scene", and when the PLC sub device 20 receives the broadcast message, the data or information related to the built-in delay attribute rule may be deleted, and the execution of step 406 is stopped, that is, the delay attribute or the time timer of the PLC sub device 20 is deleted.
Alternatively, table 2 lists one possible "delay attribute rule" for a "stop scenario". For example, as shown in table 2, in the specific implementation process, data or information related to a delay attribute rule corresponding to "stop scene" may be newly added in the PLC protocol. In table 2, the attribute code (Func code) may be assigned to "0x14", and the Status code (Status code) may be assigned to "0x03", indicating that: and stopping executing the delay attribute at present, and not returning a response message, wherein the change of the delay attribute is not reported.
TABLE 2
/>
In summary, through the above manner, a user may configure the original rule data to the whole-house intelligent host through the APP such as dimension loading and intelligent life, and the whole-house intelligent host may analyze the original rule data, obtain data corresponding to the delay attribute rule of each PLC sub-device in different scenes, create the delay attribute rule in different scenes into a preset data format according to the conversion rule, and embed the delay attribute rule in different scenes into the PLC sub-device. In the process that a user expects to control the PLC sub-equipment, the whole-house intelligent host computer only sends a message containing the scene identifier through the broadcast message, and the scene identifier is transmitted to the PLC sub-equipment, so that the PLC sub-equipment can analyze the broadcast message to obtain the scene identifier, extract the delay attribute according to the data corresponding to the delay attribute rule built-in by analyzing the scene identifier, and directly set the delay time according to the delay attribute to change the working state of the PLC sub-equipment. The process can realize the distributed control of the PLC sub-equipment in a time delay scene, reduce the number of the messages of the PLC link layer of the whole-house intelligent host, and improve the control success rate of the PLC equipment.
In addition, when the whole-house intelligent host fails, the whole-house intelligent host can be triggered to send a broadcast message on the PLC link layer through a PLC switch or a physical key and the like, and the broadcast message comprises a Scene identifier (Scene ID) so that the controllability of a time delay rule can be still realized after the whole-house intelligent host is disconnected, and the control efficiency of equipment is improved.
Finally, in the method, the whole house intelligent host can also build or add a delay attribute rule corresponding to the 'stop scene', and when the PLC sub-equipment receives the broadcast message including the scene identifier of the 'stop scene', the PLC sub-equipment can be controlled to stop executing the delay attribute rule through the delay attribute rule corresponding to the 'stop scene', and rule data built in the PLC sub-equipment are deleted, so that the time timer of the PLC sub-equipment is stopped. The process expands the content of the PLC protocol, increases the controllability of the PLC sub-equipment and improves the user experience.
It should be noted that, in the description of the embodiments of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B; "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, in the description of the embodiments of the present application, "plurality" means two or more than two.
It should be understood that the manner, the case, the category, and the division of the embodiments in the embodiments of the present application are merely for convenience of description, and should not be construed as a particular limitation, and the features in the various manners, the categories, the cases, and the embodiments may be combined without contradiction.
It should also be understood that the terms "first," "second," and "third" in the examples of the present application are merely for distinguishing, and should not be construed as limiting the present application in any way.
It should also be understood that, in various embodiments of the present application, the sequence number of each process does not mean that the execution sequence of each process should be determined by its functions and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
It should be further noted that, in the embodiment of the present application, the "preset", etc. may be implemented by pre-storing corresponding codes, tables, or other manners that may be used to indicate relevant information in the PLC device, and the present application is not limited to a specific implementation manner thereof. For example, in the embodiment of the present application, a "preset data format" and the like are provided.
It will be appreciated that the electronic device, in order to achieve the above-described functions, includes corresponding hardware and/or software modules that perform the respective functions. The present application can be implemented in hardware or a combination of hardware and computer software, in conjunction with the example algorithm steps described in connection with the embodiments disclosed herein. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application in conjunction with the embodiments, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The present embodiment may divide the functional modules of the electronic device according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated modules described above may be implemented in hardware. It should be noted that, in this embodiment, the division of the modules is schematic, only one logic function is divided, and another division manner may be implemented in actual implementation.
In the case of dividing the respective functional modules with the respective functions, one possible composition diagram of the electronic device involved in the above-described embodiment may include: a display unit, a detection unit and a processing unit. Wherein the display unit, the detection unit and the processing unit cooperate with each other, may be used to support the electronic device to perform the above-described steps, etc., and/or for other processes of the techniques described herein.
It should be noted that, all relevant contents of each step related to the above method embodiment may be cited to the functional description of the corresponding functional module, which is not described herein.
The electronic device provided in this embodiment is configured to execute the method for controlling a PLC device, so that the same effects as those of the implementation method can be achieved.
In case an integrated unit is employed, the electronic device may comprise a processing module, a storage module and a communication module. The processing module may be configured to control and manage actions of the electronic device, for example, may be configured to support the electronic device to execute the steps executed by the display unit, the detection unit, and the processing unit. The memory module may be used to support the electronic device to execute stored program code, data, etc. And the communication module can be used for supporting the communication between the electronic device and other devices.
Wherein the processing module may be a processor or a controller. Which may implement or perform the various exemplary logic blocks, modules and circuits described in connection with this disclosure. A processor may also be a combination that performs computing functions, e.g., including one or more microprocessors, digital signal processing (digital signal processing, DSP) and microprocessor combinations, and the like. The memory module may be a memory. The communication module can be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip and other equipment which interact with other electronic equipment.
In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device according to this embodiment may be a PLC device having the structure shown in fig. 3.
The present embodiment also provides a computer-readable storage medium having stored therein computer instructions that, when executed on an electronic device, cause the electronic device to perform the above-described related method steps to implement the method of controlling a PLC device in the above-described embodiments.
The present embodiment also provides a computer program product which, when run on a computer, causes the computer to perform the above-described related steps to implement the method of controlling a PLC device in the above-described embodiments.
In addition, embodiments of the present application also provide an apparatus, which may be embodied as a chip, component or module, which may include a processor and a memory coupled to each other; the memory is configured to store computer-executable instructions, and when the apparatus is running, the processor may execute the computer-executable instructions stored in the memory, so that the chip executes the method for controlling the PLC device in the above method embodiments.
The electronic device, the computer readable storage medium, the computer program product or the chip provided in this embodiment are used to execute the corresponding method provided above, so that the beneficial effects thereof can be referred to the beneficial effects in the corresponding method provided above, and will not be described herein.
It will be appreciated by those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts shown as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (11)

1. A method of controlling a power line communication PLC device, the method comprising:
determining a PLC device to be controlled, and acquiring one or more working scenes which can be supported by the PLC device and working parameters associated with each working scene;
generating one or more delay attribute rules according to the one or more working scenes and the working parameters associated with each working scene, and sending the one or more delay attribute rules to the PLC equipment;
receiving a service request, wherein the service request comprises a scene identifier of the PLC equipment;
and responding to the service request, generating a broadcast message, and sending the broadcast message to the PLC equipment, wherein the broadcast message carries the scene identifier.
2. The method according to claim 1, wherein the method further comprises:
Receiving original rule data configured by a user through a target application program, or acquiring preset original rule data, wherein the original rule data comprises equipment information of the PLC equipment, scene identifiers of one or more working scenes which can be supported by the PLC equipment and working parameters associated with each working scene;
and the obtaining one or more working scenes that the PLC device can support and working parameters associated with each working scene includes:
and acquiring scene identifiers of one or more working scenes which can be supported by the PLC equipment and working parameters associated with each working scene according to the original rule data.
3. The method of claim 1 or 2, wherein the generating one or more latency attribute rules comprises:
and generating one or more delay attribute rules according to a preset data format.
4. A method according to any one of claims 1 to 3, wherein the one or more working scenarios comprise a stop scenario and/or a start scenario.
5. The method of any one of claims 1 to 4, wherein the one or more latency attribute rules further include one or more of a device identification, a service identification, a channel identification, data type information, data length information, attribute rule data parameter values for the PLC device.
6. A method of controlling a power line communication, PLC, device, wherein the PLC device stores one or more delay attribute rules, each delay attribute rule associated with an operating scenario that the PLC device is capable of supporting, and each delay attribute rule is configured to indicate an operating parameter of the PLC device in the associated operating scenario, the method comprising:
receiving a broadcast message, and acquiring a current working scene identifier of the PLC equipment included in the broadcast message;
and determining a target rule from the one or more delay attribute rules according to the current working scene identification, and analyzing and executing the target rule.
7. The method of claim 6, wherein the one or more latency attribute rules have a preset data format.
8. Method according to claim 6 or 7, characterized in that the working scenario comprises a stop scenario and/or a start scenario.
9. The method of any one of claims 6 to 8, wherein the one or more latency attribute rules further include one or more of a device identification, a service identification, a channel identification, data type information, data length information, attribute rule data parameter values for the PLC device.
10. An electronic device, comprising:
one or more processors;
one or more memories;
a module in which a plurality of application programs are installed;
the memory stores one or more programs that, when executed by the processor, cause the electronic device to perform the method of any of claims 1-9.
11. A computer readable storage medium storing computer instructions which, when run on an electronic device, cause the electronic device to perform the method of any one of claims 1 to 9.
CN202210584376.6A 2022-05-25 2022-05-25 Method for controlling PLC (programmable logic controller) equipment and electronic equipment Pending CN117170297A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210584376.6A CN117170297A (en) 2022-05-25 2022-05-25 Method for controlling PLC (programmable logic controller) equipment and electronic equipment
PCT/CN2023/095479 WO2023226923A1 (en) 2022-05-25 2023-05-22 Method for controlling plc device, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210584376.6A CN117170297A (en) 2022-05-25 2022-05-25 Method for controlling PLC (programmable logic controller) equipment and electronic equipment

Publications (1)

Publication Number Publication Date
CN117170297A true CN117170297A (en) 2023-12-05

Family

ID=88918469

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210584376.6A Pending CN117170297A (en) 2022-05-25 2022-05-25 Method for controlling PLC (programmable logic controller) equipment and electronic equipment

Country Status (2)

Country Link
CN (1) CN117170297A (en)
WO (1) WO2023226923A1 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111650840B (en) * 2019-03-04 2021-12-03 华为技术有限公司 Intelligent household scene arranging method and terminal
CN114281489A (en) * 2020-09-17 2022-04-05 华为终端有限公司 Multi-service execution method and electronic equipment
CN112578757A (en) * 2020-12-24 2021-03-30 珠海格力电器股份有限公司 Control method and device of intelligent household equipment
CN113296420A (en) * 2021-04-30 2021-08-24 广州力控智电信息科技有限公司 Scene automatic adjusting method, system, device and storage medium

Also Published As

Publication number Publication date
WO2023226923A1 (en) 2023-11-30

Similar Documents

Publication Publication Date Title
WO2020253695A1 (en) Smart home device access method and electronic device
CN115209194B (en) Terminal equipment, method and system for realizing one touch screen through remote controller
CN110024478B (en) Adaptive network topology
CN109212983A (en) Intelligent home furnishing control method, gateway and intelligent home control system
CN111372325A (en) Method and device for establishing Wi-Fi point-to-point connection
EP4013003A1 (en) Communication protocol switching method, apparatus and system
CN111010693B (en) Method for providing wireless fidelity network access service and electronic equipment
CN113038627B (en) File sharing method, mobile device and computer storage medium
CN116114239B (en) Volume management method and electronic equipment
CN114615660A (en) Access method, system and electronic equipment
KR20210097544A (en) Method and electronic device for short-range wireless communication
CN112486105A (en) Equipment control method and device
CN110198533B (en) Method for remotely controlling BLE Bluetooth device and BLE Bluetooth device
CN116074143A (en) Scene synchronization method and device, electronic equipment and readable storage medium
CN117170297A (en) Method for controlling PLC (programmable logic controller) equipment and electronic equipment
CN114285737B (en) Method and device for configuring device
WO2023231883A1 (en) Method for repairing wlan information, main configurator, and internet of things device and system
CN117666453A (en) Link control method and electronic equipment
CN219477981U (en) Intelligent remote start-up monitoring system
CN114980238B (en) Wi-Fi access method and related equipment
EP4362507A1 (en) Communication system and communication method
CN116708062A (en) Equipment management method and electronic equipment
CN117082464A (en) Method for identifying elevator scene and electronic equipment
CN118276890A (en) Method and device for upgrading software system of internet of things (IoT) device
CN117098253A (en) Networking method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination