Message processing method and device, user equipment and storage medium
By generating and broadcasting PLC link messages containing operation instructions in the power line carrier communication system, and returning response messages only to the PLC devices that need to perform operations, the high power consumption problem caused by the transmission of a large number of messages in the PLC system is solved, and the system power consumption is reduced.
Patent Information
- Application Number
- CN202410310071.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-18
- Publication Date
- 2025-09-19
AI Technical Summary
In the power line carrier communication system, a large number of messages are transmitted during the interaction between the PLC gateway and the PLC devices, resulting in excessive system power consumption.
A PLC link message containing an operation instruction is generated through the PLC gateway and broadcasted, and a response message is returned only to the PLC device that needs to perform the operation, reducing invalid message transmission.
This effectively reduces the number of messages exchanged between the PLC gateway and PLC devices, and reduces the power consumption of the system.
Smart Images

Figure CN120676068A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a message processing method, apparatus, user equipment, and storage medium. Background Art
[0002] Power Line Carrier Communication (PLC) is a technology that uses power lines for data transmission and communication. It uses power lines as the transmission medium and transmits data and signals by superimposing high-frequency signals on the power lines.
[0003] Currently, controlling PLC devices requires a PLC gateway to send messages to the PLC device, which then returns a message after executing an operation. This means that any message exchange involves two messages. Because PLC systems typically involve large-scale networking of dozens to hundreds of devices, the PLC system constantly exchanges a large number of messages while the PLC gateway performs batch control of devices and maintains device activity. This significantly increases the system's power consumption.
[0004] Therefore, how to reduce the number of messages when the PLC gateway interacts with PLC devices to reduce the power consumption of the PLC system is an urgent problem to be solved. Summary of the Invention
[0005] The present disclosure provides a message processing method, apparatus, user equipment, and storage medium to address deficiencies in related technologies.
[0006] According to a first aspect of an embodiment of the present disclosure, a message processing method is provided, including:
[0007] The power line carrier communication PLC gateway obtains an operation instruction for at least one PLC device sent by a user;
[0008] Generate a PLC link message containing the operation instruction according to a PLC link message format, and fill the device identification of the at least one PLC device into a designated position in the PLC link message;
[0009] The PLC link message is broadcasted so that a PLC device corresponding to at least one device identifier in the PLC link message responds to the received PLC link message, executes an operation instruction contained in the PLC link message, and returns a response message containing an execution result corresponding to the operation instruction.
[0010] Optionally, the operation instruction includes a single-point control instruction, the single-point control instruction includes a target device state corresponding to the target PLC device, and the method further includes:
[0011] If the operation instruction is a single-point control instruction, determining whether the target device state is the same as the current device state of the target PLC device cached in the PLC gateway;
[0012] If yes, return the current device status corresponding to the target PLC device;
[0013] If not, generate a PLC link message containing the single-point control instruction according to the PLC link message format, and send the PLC link message containing the single-point control instruction to the target PLC device, so that the target PLC device executes the single-point control instruction and returns a response message containing the current device status of the target PLC device.
[0014] Optionally,
[0015] The types of operation instructions include: batch control instructions, configuration instructions, and keep-alive instructions; the batch control instructions include the target device status corresponding to the at least one PLC device; the configuration instructions include the target device configuration corresponding to the at least one PLC device; the keep-alive instructions are used to confirm whether the device is operating normally;
[0016] Broadcasting the PLC link message so that a PLC device corresponding to at least one device identifier in the PLC link message executes an operation instruction contained in the PLC link message and returns a response message containing an execution result corresponding to the operation instruction, including:
[0017] If the operation instruction in the PLC link message is a batch control instruction, broadcast the PLC link message so that the at least one PLC device queries its own device identification from the PLC link message, determines whether its own device identification exists in the PLC link message, and if so, executes the batch control instruction contained in the PLC link message, and returns a response message containing the current device status of the at least one PLC device;
[0018] If the operation instruction in the PLC link message is a configuration instruction, broadcast the PLC link message so that the at least one PLC device queries its own device identification from the PLC link message, determines whether its own device identification exists in the PLC link message, and if so, executes the configuration instruction contained in the PLC link message, and returns a response message containing the current device configuration of the at least one PLC device;
[0019] If the operation instruction in the PLC link message is a keep-alive instruction, the PLC link message is broadcasted so that the at least one PLC device queries its own device identification from the PLC link message, determines whether its own device identification exists in the PLC link message, and if so, executes the keep-alive instruction contained in the PLC link message, and returns a response message containing the operating status of the at least one PLC device.
[0020] Optionally, before generating the PLC link message including the keep-alive instruction, the method further includes:
[0021] Calculating a status score of the at least one PLC device during operation according to a historical response message of the at least one PLC device corresponding to the keep-alive instruction;
[0022] determining a keep-alive period corresponding to the at least one PLC device according to a status score of the at least one PLC device during operation;
[0023] Generating a PLC link message containing the keep-alive instruction, including:
[0024] Determining whether a keep-alive period of the at least one PLC device has expired;
[0025] If yes, a PLC link message including the keep-alive instruction is generated.
[0026] Optionally, the type of the operation instruction is a query instruction, the configuration instruction includes device properties that need to be queried for the target PLC device, and the method further includes:
[0027] If the operation instruction is a query instruction, determine whether the device attributes required to be queried for the target PLC device are cached in the PLC gateway;
[0028] If yes, return the device properties of the target PLC device;
[0029] If not, generate a PLC link message containing the query instruction, and send the PLC link message containing the query instruction to the target PLC device, so that the target PLC device fills the device attributes required to be queried by the target PLC device into the response message corresponding to the keep-alive instruction, and returns the response message corresponding to the keep-alive instruction.
[0030] According to a second aspect of an embodiment of the present disclosure, a device for message processing is provided, the device including:
[0031] An acquisition module, configured for the power line carrier communication PLC gateway to acquire an operation instruction for at least one PLC device sent by a user;
[0032] a generating module, configured to generate a PLC link message including the operation instruction, and fill the device identification of the at least one PLC device into the PLC link message;
[0033] The broadcast module is used to broadcast the PLC link message so that the PLC device corresponding to at least one device identifier in the PLC link message executes the operation instruction contained in the PLC link message and returns a response message containing the execution result corresponding to the operation instruction.
[0034] Optionally, the operation instruction includes: a single-point control instruction, the single-point control instruction includes a target device state corresponding to the target PLC device; the apparatus further includes:
[0035] a judgment module, configured to judge whether the target device state is the same as the current device state of the target PLC device cached in the PLC gateway if the operation instruction is a single-point control instruction;
[0036] A return module, configured to return the current device status corresponding to the target PLC device if yes;
[0037] A generation module is used to generate a PLC link message containing the single-point control instruction if not, and send the PLC link message containing the single-point control instruction to the target PLC device, so that the target PLC device executes the single-point control instruction and returns a response message containing the current device status of the target PLC device.
[0038] Optionally, the types of the operation instructions include: batch control instructions, configuration instructions, and keep-alive instructions; the batch control instructions include a target device state corresponding to the at least one PLC device; the configuration instructions include a target device configuration corresponding to the at least one PLC device; the keep-alive instructions are used to confirm whether the device is operating normally; and the broadcast module includes:
[0039] a first execution module configured to, if the operation instruction is a batch control instruction, broadcast the PLC link message, so that the at least one PLC device queries its own device identification from the PLC link message, determines whether its own device identification exists in the PLC link message, and if so, executes the batch control instruction contained in the PLC link message in response to the received PLC link message, and returns a response message containing a current device status of the at least one PLC device;
[0040] a second execution module configured to, if the operation instruction is a configuration instruction, broadcast the PLC link message, so that the at least one PLC device queries its own device identification from the PLC link message, determines whether its own device identification exists in the PLC link message, and if so, executes the configuration instruction contained in the PLC link message in response to the received PLC link message, and returns a response message containing the current device configuration of the at least one PLC device;
[0041] The third execution module is used to broadcast the PLC link message if the operation instruction is a keep-alive instruction, so that the at least one PLC device queries its own device identification from the PLC link message, determines whether its own device identification exists in the PLC link message, and if so, executes the keep-alive instruction contained in the PLC link message in response to the received PLC link message, and returns a response message containing the operating status of the at least one PLC device.
[0042] Optionally, the device further comprises:
[0043] a calculation module, configured to calculate a status score of the at least one PLC device during operation based on a historical response message of the at least one PLC device corresponding to the keep-alive instruction;
[0044] a determination module, configured to determine a keep-alive period corresponding to the at least one PLC device according to a status score of the at least one PLC device during operation;
[0045] The generation module includes:
[0046] a determination module, configured to determine whether a keep-alive period of the at least one PLC device has expired;
[0047] A generating module is used to generate a PLC link message containing the keep-alive instruction if yes.
[0048] Optionally, the type of the operation instruction is a query instruction, and the configuration instruction includes device attributes that need to be queried for the target PLC device; the apparatus further includes:
[0049] A judgment module, configured to judge whether the device attributes required to be queried for the target PLC device are cached in the PLC gateway if the operation instruction is a query instruction;
[0050] A return module, configured to return the device attributes of the target PLC device if yes;
[0051] A generation module is used to, if not, generate a PLC link message containing the query instruction, and send the PLC link message containing the query instruction to the target PLC device, so that the target PLC device fills the device attributes required to be queried by the target PLC device into the response message corresponding to the keep-alive instruction, and returns the response message corresponding to the keep-alive instruction.
[0052] According to a third aspect of an embodiment of the present disclosure, a user equipment is provided, including:
[0053] processor;
[0054] a memory for storing processor-executable instructions;
[0055] The processor is used to implement the above-mentioned message processing method.
[0056] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it is used to implement the above-mentioned message processing method.
[0057] The technical solutions provided by the embodiments of the present disclosure may at least have the following beneficial effects:
[0058] According to an embodiment of the present disclosure, a power line carrier communication (PLC) gateway obtains an operation instruction sent by a user for at least one PLC device. It then generates a PLC link message containing the operation instruction and populates the PLC link message with the device identifier of the at least one PLC device. Finally, it broadcasts the PLC link message, causing the PLC device corresponding to the at least one device identifier in the PLC link message to execute the operation instruction contained in the PLC link message and return a response message containing the execution result corresponding to the operation instruction. This reduces the number of messages exchanged between the PLC gateway and the device, thereby reducing the power consumption of the PLC system. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0060] Figure 1 It is a schematic flow chart of a message processing method according to an embodiment of the present disclosure.
[0061] Figure 2 is based on Figure 1A schematic flow chart of another message processing method based on the illustrated embodiment is shown.
[0062] Figure 3 It is a schematic diagram showing a message format of a single-point control instruction according to an embodiment of the present disclosure.
[0063] Figure 4 is based on Figure 1 A schematic flow chart of another message processing method based on the illustrated embodiment is shown.
[0064] Figure 5 It is a schematic diagram showing a message format of a batch control instruction according to an embodiment of the present disclosure.
[0065] Figure 6 It is a schematic diagram showing a message format of a configuration instruction according to an embodiment of the present disclosure.
[0066] Figure 7 This is a schematic diagram showing a message format of a keep-alive instruction according to an embodiment of the present disclosure.
[0067] Figure 8 is based on Figure 1 A schematic flow chart of another message processing method based on the illustrated embodiment is shown.
[0068] Figure 9 is based on Figure 1 A schematic flow chart of another message processing method based on the illustrated embodiment is shown.
[0069] Figure 10 It is a schematic diagram showing another message format of a keep-alive instruction according to an embodiment of the present disclosure.
[0070] Figure 11 It is a schematic diagram showing a message processing process according to an embodiment of the present disclosure.
[0071] Figure 12 This is a schematic block diagram of a message processing device according to an embodiment of the present disclosure.
[0072] Figure 13 is based on Figure 12 A schematic block diagram of another message processing device based on the illustrated embodiment is shown.
[0073] Figure 14 is based on Figure 12 A schematic block diagram of another message processing device based on the illustrated embodiment is shown.
[0074] Figure 15 is based on Figure 14A schematic block diagram of another message processing device based on the illustrated embodiment is shown.
[0075] Figure 16 is based on Figure 15 A schematic block diagram of another message processing device based on the illustrated embodiment is shown.
[0076] Figure 17 It is a schematic block diagram of a device for message processing according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0077] The following will be combined with the accompanying drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of the present disclosure.
[0078] Currently, controlling PLC devices requires a PLC gateway to send messages to the PLC device, which then returns a message after executing an operation. This means that any message exchange involves two messages. Because PLC systems typically involve large-scale networking of dozens to hundreds of devices, the PLC system constantly exchanges a large number of messages while the PLC gateway performs batch control of devices and maintains device activity. This significantly increases the system's power consumption.
[0079] See Figure 1 , Figure 1 FIG is a schematic flow chart of a method for message processing according to an embodiment of the present disclosure. Figure 1 As shown, the message processing method may include the following steps:
[0080] In step 102, the power line carrier communication PLC gateway obtains an operation instruction for at least one PLC device sent by a user.
[0081] In step 104, a PLC link message including the operation instruction is generated, and the device identification of the at least one PLC device is filled into the PLC link message.
[0082] In step 106, the PLC link message is broadcasted to enable the PLC device corresponding to at least one device identifier in the PLC link message to execute the operation instruction contained in the PLC link message and return a response message containing the execution result corresponding to the operation instruction.
[0083] In practical applications, there are two methods for controlling PLC devices. The first method involves the PLC gateway sending messages sequentially based on the address of each PLC device. Upon receiving the message, the PLC device executes the instructions contained in the message and then returns a message. This method generates two messages for each message exchange, resulting in a large number of messages between the PLC gateway and the PLC device, leading to higher power consumption in the PLC system.
[0084] The second method involves the PLC gateway broadcasting messages, requiring all PLC devices to respond after receiving them. This method requires PLC devices that don't need to execute operational instructions to respond, increasing the number of messages exchanged between the PLC gateway and PLC devices and leading to higher power consumption in the PLC system.
[0085] In one possible implementation, a power line carrier communication PLC gateway obtains an operation instruction sent by a user for at least one PLC device, wherein the operation instruction includes: single-point control instruction, batch control instruction, configuration instruction, keep-alive instruction, query instruction, etc.
[0086] Then, a PLC link message containing an operation instruction is generated according to the PLC link message format, and the device identification of at least one PLC device is filled into a designated position in the PLC link message.
[0087] Next, the PLC link message is broadcasted so that the PLC device corresponding to at least one device identifier in the PLC link message responds to the received PLC link message, executes the operation instruction contained in the PLC link message, and returns a response message containing the execution result corresponding to the operation instruction.
[0088] It can be seen from the above embodiments that by filling the device identification of at least one PLC device into the specified position in the PLC link message, the PLC device that does not need to execute the operation instruction no longer needs to return the message, thereby reducing the number of messages when the PLC gateway interacts with the PLC device, and further reducing the power consumption of the PLC system.
[0089] It should be noted that, in one possible implementation, the application scenario of the message processing method is a whole-house intelligent control scenario, which requires the control of PLC devices throughout the house. PLC devices include: PLC lights, curtains, air conditioners, sensors, etc. For example, if the sensor detects that there is someone in the house and the current time is the set time, it will trigger the set mode, adjust each PLC light to the set color temperature and set brightness, and control the curtains, etc. Of course, the application scenario of the message processing method can also be other application scenarios. This specification does not limit the application scenario of the message processing method.
[0090] See Figure 2 , Figure 2 is based on Figure 1 A schematic flow chart of another message processing method based on the embodiment shown. Figure 2 As shown, the method may further include:
[0091] In step 202, if the operation instruction is a single-point control instruction, it is determined whether the target device state is the same as the current device state of the target PLC device cached in the PLC gateway.
[0092] In step 204, if yes, the current device status corresponding to the target PLC device is returned.
[0093] In step 206, if not, a PLC link message containing the single-point control instruction is generated, and the PLC link message containing the single-point control instruction is sent to the target PLC device, so that the target PLC device executes the single-point control instruction and returns a response message containing the current device status of the target PLC device.
[0094] In actual applications, when a PLC device is already powered on and the user still selects the power-on command, the PLC gateway will still send a message to the PLC device, prompting the PLC device to execute the power-on command and then return the message. This increases the number of meaningless messages sent between the PLC gateway and the PLC device, further increasing the power consumption of the PLC system.
[0095] In one possible implementation, the operation instruction includes a single-point control instruction, where the single-point control instruction includes a target device state corresponding to a target PLC device. If the operation instruction is a single-point control instruction, a determination is made as to whether the target device state is the same as a current device state of the target PLC device cached in the PLC gateway.
[0096] If yes, return the current device status corresponding to the target PLC device.
[0097] If not, generate a PLC link message containing a single-point control instruction according to the PLC link message format, and send the PLC link message containing the single-point control instruction to the target PLC device, so that the target PLC device executes the single-point control instruction and returns a response message containing the current device status of the target PLC device.
[0098] See Figure 3 , Figure 3 It is a schematic diagram showing a message format of a single-point control instruction according to an embodiment of the present disclosure.
[0099] exist Figure 3In the single-point control instruction message format, the message format includes: header, unicast address, gateway address, length, message data, and message tail. The message data can be filled with the control instruction to be executed by the PLC device in the single-point control instruction.
[0100] It can be seen from the above embodiments that when the PLC device state in the control instruction selected by the user is the same as the current device state of the target PLC device, the PLC gateway can directly return the current device state of the target PLC device without sending a message to the target PLC device, thereby reducing the number of messages when the PLC gateway interacts with the PLC device, and further reducing the power consumption of the PLC system.
[0101] See Figure 4 , Figure 4 is based on Figure 1 A schematic flow chart of another message processing method based on the embodiment shown. Figure 4 As shown, the method may include:
[0102] In step 402, if the operation instruction in the PLC link message is a batch control instruction, the PLC link message is broadcast so that the at least one PLC device queries its own device identification from the PLC link message, and determines whether its own device identification exists in the PLC link message. If so, the batch control instruction contained in the PLC link message is executed, and a response message containing the current device status of the at least one PLC device is returned.
[0103] In step 404, if the operation instruction in the PLC link message is a configuration instruction, the PLC link message is broadcast so that the at least one PLC device queries its own device identification from the PLC link message, determines whether its own device identification exists in the PLC link message, and if so, executes the configuration instruction contained in the PLC link message, and returns a response message containing the current device configuration of the at least one PLC device.
[0104] In step 406, if the operation instruction in the PLC link message is a keep-alive instruction, the PLC link message is broadcast so that the at least one PLC device queries its own device identification from the PLC link message, and determines whether its own device identification exists in the PLC link message. If so, the keep-alive instruction contained in the PLC link message is executed, and a response message containing the operating status of the at least one PLC device is returned.
[0105] In actual applications, the PLC gateway can broadcast messages, and all PLC devices must return messages after receiving them. This method requires PLC devices that do not need to execute operation instructions to return messages, increasing the number of messages when the PLC gateway interacts with PLC devices, resulting in higher power consumption of the PLC system.
[0106] In a possible implementation, the type of the operation instruction is a batch control instruction, and the batch control instruction mentioned here includes a target device state corresponding to at least one PLC device.
[0107] If the operation instruction is a batch control instruction, a PLC link message containing the batch control instruction is generated according to the PLC link message format, and the device identification of at least one PLC device is filled in the specified position in the PLC link message.
[0108] Then, the PLC link message is broadcasted so that at least one PLC device queries its own device identification from the PLC link message, determines whether its own device identification exists in the PLC link message, and if so, executes the batch control instructions contained in the PLC link message in response to the received PLC link message, and returns a response message containing the current device status of at least one PLC device.
[0109] See Figure 5 , Figure 5 It is a schematic diagram showing a message format of a batch control instruction according to an embodiment of the present disclosure.
[0110] exist Figure 5 The message format of the batch control instruction includes: a header, a broadcast address, a gateway address, a length, message data, and a trailer. The message data can be filled with the device identification of at least one PLC device in the batch control instruction and the control instruction to be executed by at least one PLC device.
[0111] As can be seen from the above embodiment, the PLC gateway can insert the device identifier of the PLC device that needs to execute the control instruction into the message. When the PLC device finds the control instruction it needs to execute from the message, it executes the control instruction contained in the message. This reduces the number of messages exchanged between the PLC gateway and the PLC device, thereby reducing the power consumption of the PLC system.
[0112] In actual applications, the PLC gateway can broadcast messages, and all PLC devices must return messages after receiving them. This method requires PLC devices that do not need to execute operation instructions to return messages, increasing the number of messages when the PLC gateway interacts with PLC devices, resulting in higher power consumption of the PLC system.
[0113] In a possible implementation, the type of the operation instruction is a configuration instruction, and the configuration instruction mentioned here includes a target device configuration corresponding to the at least one PLC device.
[0114] If the operation instruction is a configuration instruction, a PLC link message containing the configuration instruction is generated according to the PLC link message format, and the device identification of at least one PLC device is filled in a designated position in the PLC link message.
[0115] Then, a PLC link message is broadcasted to enable at least one PLC device to query its own device identification from the PLC link message, and determine whether its own device identification exists in the PLC link message. If so, in response to the received PLC link message, the configuration instructions contained in the PLC link message are executed, and a response message containing the current device configuration of at least one PLC device is returned.
[0116] See Figure 6 , Figure 6 It is a schematic diagram showing a message format of a configuration instruction according to an embodiment of the present disclosure.
[0117] exist Figure 6 The message format of the configuration instruction includes: a header, a broadcast address, a gateway address, a length, message data, and a footer. The message data can be filled with the device identification of at least one PLC device and the configuration instruction to be executed by at least one PLC device.
[0118] As can be seen from the above embodiment, the PLC gateway can insert the device identifier of the PLC device that needs to execute the configuration instruction into the message. This allows the PLC device to execute the configuration instruction contained in the message when it finds that it needs to execute the configuration instruction from the message. This reduces the number of messages when the PLC gateway interacts with the PLC device, thereby reducing the power consumption of the PLC system.
[0119] In actual applications, due to the high-voltage nature of PLC devices, PLC devices are connected to the network along with the power supply and usually do not experience power outages. In this case, the PLC devices need to regularly report keep-alive messages. If the period for regularly reporting keep-alive messages by the PLC devices needs to be adjusted, additional configuration messages need to be sent or the period for regularly reporting keep-alive messages by updating the firmware needs to be adjusted, which will further increase the power consumption of the PLC system.
[0120] In a possible implementation, the type of the operation instruction is a keep-alive instruction, and the keep-alive instruction mentioned here is used to confirm whether the device is operating normally.
[0121] If the operation instruction is a keep-alive instruction, a PLC link message including the keep-alive instruction is generated according to the PLC link message format, and the device identification of at least one PLC device is filled into a designated position in the PLC link message.
[0122] Then, a PLC link message is broadcasted to enable at least one PLC device to query its own device identification from the PLC link message, and determine whether its own device identification exists in the PLC link message. If so, in response to the received PLC link message, the keep-alive instruction contained in the PLC link message is executed, and a response message containing the operating status of at least one PLC device is returned.
[0123] See Figure 7 , Figure 7 This is a schematic diagram showing a message format of a keep-alive instruction according to an embodiment of the present disclosure.
[0124] exist Figure 7 The message format of the keep-alive instruction includes: a header, a broadcast address, a gateway address, a length, message data, and a footer. The message data can be filled with the device identification of at least one PLC device and the keep-alive instruction to be executed by at least one PLC device.
[0125] Among them, the PLC gateway can manage the keep-alive cycles of different PLC devices. The PLC device determines whether to send a keep-alive instruction to the PLC device, and the PLC device does not need to actively report keep-alive information.
[0126] As can be seen from the above embodiment, the PLC gateway can manage the keepalive periods of different PLC devices. The PLC devices determine whether to send keepalive instructions to them, eliminating the need for the PLC devices to proactively report keepalive information. This not only reduces the number of keepalive messages sent by PLC devices, but also reduces the power consumption of the PLC devices, thereby reducing the power consumption of the PLC system.
[0127] It should be noted that the response message returned by the PLC device can update the keep-alive period of the PLC device, thereby further reducing the number of keep-alive messages sent by the PLC device.
[0128] See Figure 8 , Figure 8 is based on Figure 1 A schematic flow chart of another message processing method based on the embodiment shown. Figure 8 As shown, the method may further include:
[0129] In step 802, a status score of the at least one PLC device during operation is calculated according to a historical response message of the at least one PLC device corresponding to the keep-alive instruction.
[0130] In step 804, a keep-alive period corresponding to the at least one PLC device is determined according to the status score of the at least one PLC device during operation.
[0131] In step 806 , it is determined whether the keep-alive period of the at least one PLC device has expired.
[0132] In step 808, if yes, a PLC link message including the keep-alive instruction is generated.
[0133] In a possible implementation, a status score of the at least one PLC device during operation is calculated according to historical response messages corresponding to keep-alive instructions of the at least one PLC device.
[0134] Then, a keep-alive period corresponding to the at least one PLC device is determined based on the state score of the at least one PLC device during operation. For example, the more stable the PLC device is, the higher the state score is, and the longer the keep-alive period corresponding to the PLC device is.
[0135] Next, it is determined whether a keep-alive period of at least one PLC device has expired.
[0136] If yes, generate a PLC link message containing a keep-alive instruction according to the PLC link message format.
[0137] It can be seen from the above embodiments that when the operating state of the PLC device is relatively stable, the keep-alive period of the PLC device can be appropriately extended, thereby further reducing the number of keep-alive messages sent by the PLC device and further reducing the power consumption of the PLC system.
[0138] See Figure 9 , Figure 9 is based on Figure 1 A schematic flow chart of another message processing method based on the embodiment shown. Figure 9 As shown, the method may further include:
[0139] In step 902, if the operation instruction is a query instruction, it is determined whether the device attributes required to be queried for the target PLC device are cached in the PLC gateway.
[0140] In step 904, if yes, the device properties of the target PLC device are returned.
[0141] In step 906, if not, a PLC link message containing the query instruction is generated, and the PLC link message containing the query instruction is sent to the target PLC device, so that the target PLC device fills the device attributes required to be queried by the target PLC device into the specified position in the response message corresponding to the keep-alive instruction, and returns the response message corresponding to the keep-alive instruction.
[0142] In real-world applications, when a user needs to query the device properties of a PLC device, the PLC gateway must send a message to the PLC device, which then responds with a message containing the device properties. This increases the number of messages exchanged between the PLC gateway and the PLC device, further increasing the power consumption of the PLC system.
[0143] In a possible implementation, the type of the operation instruction is a query instruction, and the configuration instruction mentioned here includes device properties that need to be queried for the target PLC device.
[0144] If the operation instruction is a query instruction, it is determined whether the device attributes of the target PLC device to be queried are cached in the PLC gateway.
[0145] If yes, return the device properties of the target PLC device.
[0146] If not, generate a PLC link message containing a query instruction according to the PLC link message format, and send the PLC link message containing the query instruction to the target PLC device, so that the target PLC device fills the device attributes required to be queried by the target PLC device into the specified position in the response message corresponding to the keep-alive instruction, and returns the response message corresponding to the keep-alive instruction.
[0147] See Figure 10 , Figure 10 It is a schematic diagram showing another message format of a keep-alive instruction according to an embodiment of the present disclosure.
[0148] exist Figure 10 The keep-alive instruction message format includes a header, a broadcast address, a gateway address, a length, message data, and a trailer. The message data may include the device identifier of at least one PLC device, the keep-alive instruction to be executed by at least one PLC device, and the device attributes of at least one PLC device.
[0149] It can be seen from the above embodiments that when the device properties of the PLC device in the query instruction are cached in the PLC gateway, the PLC gateway can directly return the current device properties of the target PLC device without sending a PLC link message to the target PLC device, so as to reduce the number of messages when the PLC gateway interacts with the PLC device, and thus the power consumption of the PLC system.
[0150] If the PLC gateway doesn't cache the device attributes of the PLC device in the query command, the target PLC device can fill the device attributes it needs to query into the specified location in the response message corresponding to the keep-alive command and return the response message corresponding to the keep-alive command, eliminating the need to return a message for the query command. This further reduces the number of messages exchanged between the PLC gateway and the PLC device, further reducing the power consumption of the PLC system.
[0151] See Figure 11 , Figure 11 It is a schematic diagram showing a message processing process according to an embodiment of the present disclosure.
[0152] exist Figure 11 In Figure 3 For example, if the operation instruction includes a single-point control instruction, the system receives the single-point control instruction sent by the cloud platform and determines whether the target device status in control instructions 1 and 2 is the same as the current device status of PLC device 1 cached in the PLC gateway. If so, the system returns the current device status of PLC device 1. If not, the system sends a PLC link message containing control instructions 1 and 2 to PLC device 1, causing PLC device 1 to execute control instructions 1 and 2 and return a response message containing the current device status of PLC device 1.
[0153] by Figure 5 For example, if the operation instruction is a batch control instruction, the batch control instruction sent by the cloud platform is received, and the device identifiers of PLC device 1 and PLC device 2 are filled in the position where the control instruction 1 in the PLC link message is located, and the device identifier of PLC device 3 is filled in the position where the control instruction 2 in the PLC link message is located.
[0154] Then, the PLC link message is broadcasted to enable PLC device 1 and PLC device 2 to execute control instruction 1 and return a response message containing the current device status, and PLC device 3 to execute control instruction 2 and return a response message containing the current device status.
[0155] by Figure 6 For example, if the operation instruction is a configuration instruction, the configuration instruction sent by the cloud platform is received, and the device identifiers of PLC device 1 and PLC device 2 are filled in the position where configuration instruction 1 is located in the PLC link message, and the device identifier of PLC device 3 is filled in the position where configuration instruction 2 is located in the PLC link message.
[0156] Then, the PLC link message is broadcasted to enable PLC device 1 and PLC device 2 to execute configuration instruction 1 and return a response message containing the current device configuration, and PLC device 3 to execute configuration instruction 2 and return a response message containing the current device configuration.
[0157] by Figure 7 For example, if the operation instruction is a keep-alive instruction, the device identifiers of PLC device 1, PLC device 2, and PLC device 3 are filled in the position where the keep-alive instruction is located in the PLC link message.
[0158] Then, a PLC link message is broadcasted to enable PLC device 1, PLC device 2, and PLC device 3 to execute a keep-alive instruction and return a response message containing the operating status.
[0159] by Figure 10 For example, if the operation instruction is a query instruction, the query instruction sent by the cloud platform is received, and it is determined whether the device attributes to be queried in the query instruction 1 are the same as the current device status of the PLC device 1 cached in the PLC gateway.
[0160] If yes, return the device properties of PLC device 1.
[0161] If not, the PLC link message containing query instruction 1 is sent to PLC device 1, so that PLC device 1 fills the device attributes required by PLC device 1 into the specified position in the response message corresponding to the keep-alive instruction, and returns the response message corresponding to the keep-alive instruction.
[0162] Corresponding to the aforementioned embodiments of the message processing method, the present disclosure also provides embodiments of the message processing apparatus.
[0163] See Figure 12 , Figure 12 FIG. 1 is a schematic block diagram of a message processing apparatus according to an embodiment of the present disclosure. Figure 12 As shown, the device may include:
[0164] An acquisition module 1202 is configured for the power line carrier communication PLC gateway to acquire an operation instruction for at least one PLC device sent by a user;
[0165] A generating module 1204 is configured to generate a PLC link message including the operation instruction, and fill the device identification of the at least one PLC device into the PLC link message;
[0166] The broadcast module 1206 is used to broadcast the PLC link message so that the PLC device corresponding to at least one device identifier in the PLC link message executes the operation instruction contained in the PLC link message and returns a response message containing the execution result corresponding to the operation instruction.
[0167] See Figure 13 , Figure 13 is based on Figure 12 FIG. 1 is a schematic block diagram of another apparatus for message processing based on the embodiment shown. Figure 13 As shown, the device also includes:
[0168] A judgment module 1302 is configured to, if the operation instruction is a single-point control instruction, determine whether the target device state is the same as the current device state of the target PLC device cached in the PLC gateway;
[0169] Return module 1304, for returning the current device status corresponding to the target PLC device if yes;
[0170] Generate module 1306, which is used to generate a PLC link message containing the single-point control instruction if not, and send the PLC link message containing the single-point control instruction to the target PLC device, so that the target PLC device executes the single-point control instruction and returns a response message containing the current device status of the target PLC device.
[0171] See Figure 14 , Figure 14 is based on Figure 12 FIG. 1 is a schematic block diagram of another apparatus for message processing based on the embodiment shown. Figure 14 As shown, the broadcast module includes:
[0172] The first execution module 1402 is configured to, if the operation instruction is a batch control instruction, broadcast the PLC link message, so that the at least one PLC device queries its own device identification from the PLC link message, determines whether its own device identification exists in the PLC link message, and if so, executes the batch control instruction included in the PLC link message in response to the received PLC link message, and returns a response message including the current device status of the at least one PLC device;
[0173] The second execution module 1404 is configured to, if the operation instruction is a configuration instruction, broadcast the PLC link message, so that the at least one PLC device queries its own device identification from the PLC link message, determines whether its own device identification exists in the PLC link message, and if so, executes the configuration instruction contained in the PLC link message in response to the received PLC link message, and returns a response message containing the current device configuration of the at least one PLC device;
[0174] The third execution module 1406 is used to broadcast the PLC link message if the operation instruction is a keep-alive instruction, so that the at least one PLC device queries its own device identification from the PLC link message, determines whether its own device identification exists in the PLC link message, and if so, executes the keep-alive instruction contained in the PLC link message in response to the received PLC link message, and returns a response message containing the operating status of the at least one PLC device.
[0175] See Figure 15 , Figure 15 is based on Figure 14 FIG. 1 is a schematic block diagram of another apparatus for message processing based on the embodiment shown. Figure 15 As shown, the device also includes:
[0176] A calculation module 1502 is configured to calculate a status score of the at least one PLC device during operation based on a historical response message of the at least one PLC device corresponding to the keep-alive instruction;
[0177] A determination module 1504 is configured to determine a keep-alive period corresponding to the at least one PLC device according to a status score of the at least one PLC device during operation;
[0178] The generation module includes:
[0179] A determination module 1506 is configured to determine whether a keep-alive period of the at least one PLC device has expired;
[0180] The generating module 1508 is configured to generate a PLC link message including the keep-alive instruction if yes.
[0181] See Figure 16 , Figure 16 is based on Figure 15 FIG. 1 is a schematic block diagram of another apparatus for message processing based on the embodiment shown. Figure 16 As shown, the device also includes:
[0182] The judgment module 1602 is configured to judge whether the device attributes required to be queried for the target PLC device are cached in the PLC gateway if the operation instruction is a query instruction;
[0183] Return module 1604, for returning the device attributes of the target PLC device if yes;
[0184] Generate module 1606, which is used to generate a PLC link message containing the query instruction if not, and send the PLC link message containing the query instruction to the target PLC device, so that the target PLC device fills the device attributes required to be queried by the target PLC device into the specified position in the response message corresponding to the keep-alive instruction, and returns the response message corresponding to the keep-alive instruction.
[0185] Regarding the apparatus in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments of the relevant methods and will not be elaborated on here.
[0186] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. Those of ordinary skill in the art can understand and implement it without paying any creative work.
[0187] Accordingly, the present disclosure further provides a user equipment, comprising: a processor;
[0188] a memory for storing processor-executable instructions;
[0189] The processor is used to implement the above-mentioned message processing method.
[0190] Correspondingly, the present disclosure also provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned message processing method is implemented.
[0191] like Figure 17 As shown, Figure 17 1 is a schematic block diagram of an apparatus 1700 for message processing according to an embodiment of the present disclosure. For example, apparatus 1700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0192] Reference Figure 17 , device 1700 may include one or more of the following components: a processing component 1702 , a memory 1704 , a power component 1706 , a multimedia component 1708 , an audio component 1710 , an input / output (I / O) interface 1712 , a sensor component 1714 , and a communication component 1716 .
[0193] Processing component 1702 generally controls the overall operation of device 1700, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. Processing component 1702 may include one or more processors 1720 to execute instructions to perform all or part of the steps of the aforementioned methods. Furthermore, processing component 1702 may include one or more modules to facilitate interaction between processing component 1702 and other components. For example, processing component 1702 may include a multimedia module to facilitate interaction between multimedia component 1708 and processing component 1702.
[0194] The memory 1704 is configured to store various types of data to support the operations of the device 1700. Examples of such data include instructions for any application or method operating on the device 1700, contact data, phone book data, messages, pictures, videos, etc. The memory 1704 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0195] The power supply component 1706 provides power to the various components of the device 1700. The power supply component 1706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 1700.
[0196] The multimedia component 1708 includes a screen that provides an output interface between the device 1700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1708 includes a front camera and / or a rear camera. When the device 1700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
[0197] The audio component 1710 is configured to output and / or input audio signals. For example, the audio component 1710 includes a microphone (MIC) that is configured to receive external audio signals when the device 1700 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 1704 or transmitted via the communication component 1716. In some embodiments, the audio component 1710 further includes a speaker for outputting audio signals.
[0198] I / O interface 1712 provides an interface between processing component 1702 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to, a home button, volume buttons, a start button, and a lock button.
[0199] Sensor assembly 1714 includes one or more sensors for providing various aspects of the status assessment of device 1700. For example, sensor assembly 1714 can detect the open / closed state of device 1700, the relative positioning of components, such as the display and keypad of device 1700. Sensor assembly 1714 can also detect changes in the position of device 1700 or a component of device 1700, the presence or absence of user contact with device 1700, the orientation or acceleration / deceleration of device 1700, and changes in the temperature of device 1700. Sensor assembly 1714 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 1714 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 1714 can also include an accelerometer, a gyroscope, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0200] The communication component 1716 is configured to facilitate wired or wireless communication between the device 1700 and other devices. The device 1700 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G LTE, 5G NR or a combination thereof. In an exemplary embodiment, the communication component 1716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1716 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0201] In an exemplary embodiment, the device 1700 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the method described in any of the above embodiments.
[0202] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1704 including instructions, and the instructions can be executed by the processor 1720 of the apparatus 1700 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0203] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0204] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
[0205] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements that are inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a..." does not exclude the presence of other identical elements in the process, method, article or device that includes the element.
[0206] The above is a detailed introduction to the methods and devices provided in the embodiments of the present disclosure. Specific examples are used herein to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the methods and core ideas of the present disclosure. At the same time, for those skilled in the art, according to the ideas of the present disclosure, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present disclosure.
Claims
1. A message processing method, characterized in that: include: The power line carrier communication PLC gateway obtains an operation instruction for at least one PLC device sent by a user; generating a PLC link message including the operation instruction, and filling the device identification of the at least one PLC device into the PLC link message; The PLC link message is broadcasted to enable a PLC device corresponding to at least one device identifier in the PLC link message to execute an operation instruction contained in the PLC link message and return a response message containing an execution result corresponding to the operation instruction.
2. The method according to claim 1, characterized in that The operation instruction includes: a single-point control instruction, the single-point control instruction includes a target device state corresponding to the target PLC device, and the method further includes: If the operation instruction is a single-point control instruction, determining whether the target device state is the same as the current device state of the target PLC device cached in the PLC gateway; If yes, return the current device status corresponding to the target PLC device; If not, generate a PLC link message containing the single-point control instruction, and send the PLC link message containing the single-point control instruction to the target PLC device, so that the target PLC device executes the single-point control instruction and returns a response message containing the current device status of the target PLC device.
3. The method according to claim 1, characterized in that The types of operation instructions include: batch control instructions, configuration instructions, and keep-alive instructions; the batch control instructions include the target device status corresponding to the at least one PLC device; the configuration instructions include the target device configuration corresponding to the at least one PLC device; the keep-alive instructions are used to confirm whether the device is operating normally; Broadcasting the PLC link message so that a PLC device corresponding to at least one device identifier in the PLC link message executes an operation instruction contained in the PLC link message and returns a response message containing an execution result corresponding to the operation instruction, including: If the operation instruction in the PLC link message is a batch control instruction, broadcast the PLC link message so that the at least one PLC device queries its own device identification from the PLC link message, determines whether its own device identification exists in the PLC link message, and if so, executes the batch control instruction contained in the PLC link message, and returns a response message containing the current device status of the at least one PLC device; If the operation instruction in the PLC link message is a configuration instruction, broadcast the PLC link message so that the at least one PLC device queries its own device identification from the PLC link message, determines whether its own device identification exists in the PLC link message, and if so, executes the configuration instruction contained in the PLC link message, and returns a response message containing the current device configuration of the at least one PLC device; If the operation instruction in the PLC link message is a keep-alive instruction, the PLC link message is broadcasted so that the at least one PLC device queries its own device identification from the PLC link message, determines whether its own device identification exists in the PLC link message, and if so, executes the keep-alive instruction contained in the PLC link message, and returns a response message containing the operating status of the at least one PLC device.
4. The method according to claim 3, characterized in that Before generating the PLC link message including the operation instruction, the method further includes: Calculating a status score of the at least one PLC device during operation according to a historical response message of the at least one PLC device corresponding to the keep-alive instruction; determining a keep-alive period corresponding to the at least one PLC device according to a status score of the at least one PLC device during operation; Generating a PLC link message containing the operation instruction, including: Determining whether a keep-alive period of the at least one PLC device has expired; If yes, a PLC link message including the keep-alive instruction is generated.
5. The method according to claim 4, characterized in that The type of the operation instruction is a query instruction, the configuration instruction includes the device attributes required to be queried for the target PLC device, and the method further includes: If the operation instruction is a query instruction, determine whether the device attributes required to be queried for the target PLC device are cached in the PLC gateway; If yes, return the device properties of the target PLC device; If not, generate a PLC link message containing the query instruction, and send the PLC link message containing the query instruction to the target PLC device, so that the target PLC device fills the device attributes required to be queried by the target PLC device into the response message corresponding to the keep-alive instruction, and returns the response message corresponding to the keep-alive instruction.
6. A message processing device, characterized in that: The device comprises: An acquisition module, configured for the power line carrier communication PLC gateway to acquire an operation instruction for at least one PLC device sent by a user; a generating module, configured to generate a PLC link message including the operation instruction, and fill the device identification of the at least one PLC device into the PLC link message; The broadcast module is used to broadcast the PLC link message so that the PLC device corresponding to at least one device identifier in the PLC link message executes the operation instruction contained in the PLC link message and returns a response message containing the execution result corresponding to the operation instruction.
7. The device according to claim 6, characterized in that The operation instruction includes: a single-point control instruction, wherein the single-point control instruction includes a target device state corresponding to the target PLC device; the device further includes: a judgment module, configured to judge whether the target device state is the same as the current device state of the target PLC device cached in the PLC gateway if the operation instruction is a single-point control instruction; A return module, configured to return the current device status corresponding to the target PLC device if yes; A generation module is used to generate a PLC link message containing the single-point control instruction if not, and send the PLC link message containing the single-point control instruction to the target PLC device, so that the target PLC device executes the single-point control instruction and returns a response message containing the current device status of the target PLC device.
8. The device according to claim 6, characterized in that The types of operation instructions include: batch control instructions, configuration instructions, and keep-alive instructions; the batch control instructions include the target device status corresponding to the at least one PLC device; the configuration instructions include the target device configuration corresponding to the at least one PLC device; the keep-alive instructions are used to confirm whether the device is operating normally; the broadcast module includes: a first execution module configured to, if the operation instruction is a batch control instruction, broadcast the PLC link message, so that the at least one PLC device queries its own device identification from the PLC link message, determines whether its own device identification exists in the PLC link message, and if so, executes the batch control instruction contained in the PLC link message in response to the received PLC link message, and returns a response message containing a current device status of the at least one PLC device; a second execution module configured to, if the operation instruction is a configuration instruction, broadcast the PLC link message, so that the at least one PLC device queries its own device identification from the PLC link message, determines whether its own device identification exists in the PLC link message, and if so, executes the configuration instruction contained in the PLC link message in response to the received PLC link message, and returns a response message containing the current device configuration of the at least one PLC device; The third execution module is used to broadcast the PLC link message if the operation instruction is a keep-alive instruction, so that the at least one PLC device queries its own device identification from the PLC link message, determines whether its own device identification exists in the PLC link message, and if so, executes the keep-alive instruction contained in the PLC link message in response to the received PLC link message, and returns a response message containing the operating status of the at least one PLC device.
9. The device according to claim 8, characterized in that The device further comprises: a calculation module, configured to calculate a status score of the at least one PLC device during operation based on a historical response message of the at least one PLC device corresponding to the keep-alive instruction; a determination module, configured to determine a keep-alive period corresponding to the at least one PLC device according to a status score of the at least one PLC device during operation; The generation module includes: a determination module, configured to determine whether a keep-alive period of the at least one PLC device has expired; A generating module is used to generate a PLC link message containing the keep-alive instruction if yes.
10. The device according to claim 9, characterized in that The type of the operation instruction is a query instruction, and the configuration instruction includes the device attributes required to be queried for the target PLC device; the device further includes: A judgment module, configured to judge whether the device attributes required to be queried for the target PLC device are cached in the PLC gateway if the operation instruction is a query instruction; A return module, configured to return the device attributes of the target PLC device if yes; A generation module is used to, if not, generate a PLC link message containing the query instruction, and send the PLC link message containing the query instruction to the target PLC device, so that the target PLC device fills the device attributes required to be queried by the target PLC device into the response message corresponding to the keep-alive instruction, and returns the response message corresponding to the keep-alive instruction.
11. A user equipment, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to implement the method according to any one of claims 1 to 5.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.