Control instruction sending method and device, control instruction processing method and device, electronic equipment and readable storage medium

By configuring delay time information for smart home devices, the peak pressure problem caused by centralized data reporting by the device is solved, and a more stable cloud service bearer is achieved.

CN119945819APending Publication Date: 2025-05-06GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411927829.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

A large number of smart home devices report status data in a short period of time, resulting in high peak pressure on cloud service carrying capacity and affecting system performance.

Method used

By configuring delay time information for each target device, a second control instruction is generated so that the device delays sending status data after executing the control action, thereby distributing the time point of data reporting.

Benefits of technology

It effectively reduces the peak pressure of the server when processing large amounts of device status data, and improves the stability and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119945819A_ABST
    Figure CN119945819A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a control instruction sending and processing method, an electronic device and a readable storage medium, and the method comprises the steps: determining the number of to-be-controlled target devices according to a first control instruction of a client, and carrying out the control of the to-be-controlled target devices under the condition that the number of the target devices is greater than or equal to two. Configuring delay time information for a control sub-instruction corresponding to each target device in the first control instruction to obtain a second control instruction corresponding to each target device, sending each second control instruction to the corresponding target device to enable the target device to execute a control action indicated by the second control instruction, and according to the delay time information in the second control instruction, controlling the target device according to the control sub-instruction. And the sending of the first state data after the target equipment executes the control action to the server is delayed, so that the pressure of the peak value when the server processes the reported data can be reduced under the condition that the target equipment is controlled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of control instruction sending and processing, and in particular relates to a control instruction sending and processing method, device, electronic equipment and readable storage medium. Background Art

[0002] In the smart home system, users control smart home devices through the client, and after controlling the smart home devices, the smart home devices will send their own status data to the cloud service so that users can understand the latest status of the smart home devices.

[0003] Cloud services often take on the task of controlling smart home devices from multiple clients. Therefore, a large number of smart home devices will report their own status data in a short period of time, causing peak pressure on cloud services. Summary of the invention

[0004] The present invention provides a control instruction sending and processing method, an electronic device and a readable storage medium, so as to solve the problem that a large number of devices report their own status data in a concentrated manner within a time, causing a large peak pressure on the server.

[0005] In order to solve the above-mentioned technical problems, the present invention is achieved as follows:

[0006] In a first aspect, the present invention provides a control instruction sending method, the method comprising:

[0007] Receiving a first control instruction sent by a client;

[0008] Determining the number of target devices to be controlled according to the first control instruction;

[0009] When the number of the target devices is greater than or equal to two, delay time information is configured for the control sub-instructions corresponding to the target devices in the first control instruction to obtain second control instructions corresponding to the target devices; the delay time information corresponding to different target devices is not completely the same;

[0010] Each second control instruction is sent to the corresponding target device; the second control instruction is used to make the target device execute the control action indicated by the second control instruction, and according to the delay time information described in the second control instruction, delay sending the first status data after the target device executes the control action to the server.

[0011] In a second aspect, the present invention provides a control instruction processing method comprising:

[0012] receiving a second control instruction sent by the server; wherein the second control instruction is configured with delay time information;

[0013] Execute the control action indicated by the second control instruction, and delay sending the first state data after the target device executes the control action to the server according to the delay time information in the second control instruction.

[0014] In a third aspect, the present invention provides a control instruction sending device, comprising:

[0015] A first receiving module, used to receive a first control instruction sent by a client;

[0016] A quantity determination module, used to determine the quantity of target devices to be controlled according to the first control instruction;

[0017] a control instruction generating module, configured to configure delay time information for the control sub-instructions corresponding to each of the target devices in the first control instruction when the number of the target devices is greater than or equal to two, so as to obtain a second control instruction corresponding to each of the target devices; the delay time information corresponding to different target devices is not completely the same;

[0018] A sending module is used to send each second control instruction to a corresponding target device; the second control instruction is used to enable the target device to execute the control action indicated by the second control instruction, and according to the delay time information described in the second control instruction, delay the sending of the first status data after the target device executes the control action to the server.

[0019] In a fourth aspect, the present invention provides a control instruction processing device, comprising:

[0020] A second receiving module is used to receive a second control instruction sent by the server; the second control instruction is configured with delay time information;

[0021] The delayed sending module is used to execute the control action indicated by the second control instruction, and delay sending the first state data after the target device executes the control action to the server according to the delay time information in the second control instruction.

[0022] In a fifth aspect, the present invention provides an electronic device, comprising:

[0023] A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the control instruction sending method or the control instruction processing method when executing the program.

[0024] In a sixth aspect, the present invention provides a readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the above-mentioned control instruction sending method or control instruction processing method.

[0025] In an embodiment of the present invention, a first control instruction sent by a client is received, and the number of target devices to be controlled is determined according to the first control instruction. When the number of target devices is greater than or equal to two, the control sub-instruction corresponding to each target device in the first control instruction is configured with delay time information, and a second control instruction corresponding to each target device is obtained. The delay time information corresponding to different target devices is not completely the same. Each second control instruction is sent to the corresponding target device, and the second control instruction is used to make the target device execute the control action indicated by the second control instruction, and according to the delay time information in the second control instruction, the first state data after the target device executes the control action is delayed to be sent to the server. Therefore, in the embodiment of the present invention, when multiple target devices are controlled, there are differences in the time when the server receives the first state data reported by multiple target devices corresponding to the same first control instruction, which avoids the target device from immediately reporting the latest state after executing the second control instruction, resulting in a large number of target devices reporting data at a concentrated time, and a high peak pressure on the server, which can reduce the peak pressure on the server when processing the reported data. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0027] Figure 1 This is a system architecture diagram of a control instruction sending provided by an embodiment of the present invention;

[0028] Figure 2 is a flow chart of the steps of a control instruction sending method provided by an embodiment of the present invention;

[0029] Figure 3a-3d is a schematic diagram of an operation interface provided by an embodiment of the present invention;

[0030] Figure 4 is a flow chart of steps of a control instruction processing method provided by an embodiment of the present invention;

[0031] Figure 5 is a structural diagram of a control instruction sending device provided by an embodiment of the present invention;

[0032] Figure 6 is a structural diagram of a control instruction processing device provided by an embodiment of the present invention;

[0033] Figure 7It is a schematic diagram of the structure of a device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] Figure 1 It is a system architecture diagram for sending a control instruction provided by an embodiment of the present invention, including: a client 11, a server 12, and a target device 13.

[0036] The client 11 may be a smart terminal, such as a mobile terminal, a smart watch, a smart speaker, etc., or other devices with communication functions, such as a laptop computer, a car computer, etc. The client has the function of obtaining time and environmental conditions, so as to obtain time and environmental conditions.

[0037] In addition to the device service function, the target device 13 may also have a computing function and a network function. The target device 13 may be a smart home device. Specifically, the target device 13 may be an air conditioner, a switch, a fan, a purifier, an automatic curtain, a socket, a door lock, etc. The device service function is used to realize the basic functions of home appliances, such as the cooling function of the air conditioner, the opening and closing function of the switch, the blowing function of the fan, the blowing function of the purifier, the opening and closing function of the automatic curtain, the power on and off function of the socket, and the anti-theft function of the door lock.

[0038] The server 12 may be implemented through a cloud server. The server 12 deploys a program module that supports the device service function of the target device 13. The program module allows the target device 13 to execute the corresponding device service function.

[0039] The client 11, the target device 13, and the server 12 are connected via wired and / or wireless connections.

[0040] In an example of the present invention, the client 11 sends a first control instruction for the target device 13 to the server 12. After processing the first control instruction, the server 12 obtains a second control instruction, and then sends the second control instruction to the target device 13. After receiving the second control instruction, the target device 13 executes the corresponding function. The target device 13 reports the status data after executing the corresponding function to the server 12. The server 12 can send a notification to the client 11 to notify the client 11 that the target device 13 has completed the corresponding function.

[0041] In an example of the present invention, before sending the first control instruction, the client will be pre-registered on the server. For example, the client sends a registration request to the cloud service, and the registration request contains the client's registration information, such as user name, password, token, client identification code, identification code of the target device registered on the client, etc. After receiving the registration request, the server verifies the registration information, and the cloud service returns a response to the client based on the verification result. If the registration is successful, the cloud service will save the registration information, and the client can continue to use the cloud service, thereby establishing the registration between the client and the cloud service. Similarly, the target device can also be pre-registered on the server and the client. The specific registration process can refer to the above and will not be described in detail. Through pre-registration, the subsequent server can clearly know which target device corresponding to the client needs to send the first control instruction to when it receives the first control instruction sent by the client, and after the server receives the first status data sent by the target device, it can clearly know which client needs to forward the first status data to. In a smart home system, in order to push the latest device status to users in a timely manner, smart home devices can actively report data to the server when their status data changes. For example, when a user turns on a light remotely, the light will report status data, and the server will push the status data to the client to let the user know that the light is turned on. Or, for example, when a user turns on an air conditioner remotely, the air conditioner will report status data, and the server will push the status data to the client to let the user know that the air conditioner is turned on.

[0042] Figure 2 is a flow chart of the steps of a control instruction processing method provided by an embodiment of the present invention, the method is applied to a server, such as Figure 2 As shown, the method may include:

[0043] Step 101: Receive a first control instruction sent by a client.

[0044] In an example of the present invention, an operation interface is provided on the client, so that the user can manually trigger the client to send a first control instruction to the server in the operation interface, or the user can configure the triggering conditions of the first control instruction in the operation interface. When the triggering conditions are met, the client automatically sends the first control instruction to the server.

[0045] Figure 3a-3d Schematic diagram of the operation interface provided by the embodiment of the present invention. Figure 3a As shown, the main operation interface includes manual trigger scene configuration controls and automatic trigger scene configuration controls.

[0046] When the user manually triggers the first control instruction in the operation interface, the user operates the manual trigger scene configuration control on the operation main interface to enter the manual trigger scene configuration interface, such as Figure 3bAs shown, the manual trigger scene configuration interface includes a first device execution action configuration control and a manual trigger control, so that the user can use the first device execution action configuration control to configure the control action performed on a device or batch configure the control actions performed by multiple devices, and use the manual trigger control to send the control action that the device needs to perform to the server in the form of a first control instruction, thereby realizing the sending of the first control instruction to the server based on the user's manual operation on the client.

[0047] In the example of the present invention, the client automatically sends the first control instruction to the server by automatically triggering the scene configuration control. The automatically triggering scene configuration control includes: a time setting control, an environment setting control, and a device state setting control, wherein the time setting control is used to set the time condition for automatically sending the first control instruction to the server, the environment setting control is used to set the environment condition for automatically sending the first control instruction to the server, and the device state setting control is used to set the device state condition for automatically sending the first control instruction to the server.

[0048] When the user triggers the time setting control, the time setting interface will be entered. The time setting interface includes a time condition selection control to select any time, such as Figure 3c shown.

[0049] When the user triggers the environment setting control, the environment setting interface will be entered, such as Figure 3d As shown, the environment setting interface includes geographical condition setting options, temperature condition setting options, weather condition setting options, PM2.5 condition setting options, and air quality setting options, so that users can select specific environmental conditions for automatic triggering, so that users can select environmental conditions for automatic triggering scenes according to actual needs.

[0050] When the user triggers the device status setting control, the device status setting interface will be entered to set the device status conditions for the automatic triggering scenario. The operating device targeted by the device status setting interface may be the same as or different from the target device. For example, when the curtains need to be controlled, the door lock can be set to unlock in the device status setting interface to generate a first control instruction. When the door lock is unlocked, it means that the user needs to enter the room, and the first control instruction will be automatically sent to the server. The server instructs to open the curtains to increase the natural light in the room, thereby realizing the linkage control of the curtains and door locks.

[0051] The automatic triggering scene configuration control also includes a second device execution action configuration control, and the second device execution action configuration control is used to configure a control action that needs to be executed by at least one device.

[0052] After configuring the automatic triggering scene through the time setting control, the environment setting control, the device status setting control, and the second device execution action configuration control, the control action required to be executed by at least one device can be configured to be sent to the server in the form of a first control instruction according to the set time conditions, environment conditions, and device status conditions, when the set time conditions, environment conditions, and device status conditions are met, thereby automatically sending the first control instruction to the server in the automatic triggering scene. For example, the time condition for automatically triggering the first control instruction is set to 9 o'clock in the morning through the time setting control, the environment condition for automatically triggering the first control instruction is set to sunny weather through the environment setting control, the device status setting control is used to set the device status condition for automatically triggering the first control instruction to be unlocked when the door lock is unlocked through the device status setting control, and the curtain is configured to open and the air conditioner is turned off through the second device execution action configuration control. Then, when it is 9 o'clock in the morning, the weather is sunny, and the door lock is unlocked, the client sends the first control instruction to open the curtain and turn off the air conditioner to the server, thereby realizing batch control of the two devices, the curtain and the air conditioner, and in the process of batch control of the curtain and the air conditioner, the linkage between the curtain execution action and the air conditioner execution action is realized.

[0053] In another embodiment of the present invention, the operation interface further has a room selection control, through which the room's equipment needs to be controlled is selected, or the equipment status condition is set based on the status of the equipment in a room.

[0054] In the example of the present invention, the specific process of generating the first control instruction is not limited.

[0055] Step 102: Determine the number of target devices to be controlled according to the first control instruction.

[0056] In an example of the present invention, the first control instruction includes control sub-instructions, each control sub-instruction corresponds to a target device to be controlled. After the server obtains the first control instruction, it can parse the first control instruction to obtain each control sub-instruction, and then count the number of control sub-instructions to determine the number of target devices to be controlled.

[0057] In another embodiment of the present invention, when the client sends the first control instruction to the server, each control sub-instruction is a data packet.

[0058] In an embodiment of the present application, a user can use a client to remotely send control instructions for a target device to a server. The target device may be a smart home device, such as an air conditioner, TV, refrigerator, air conditioner, switch, fan, purifier, automatic curtains, socket, door lock, etc. at home.

[0059] Step 103: When the number of target devices is greater than or equal to two, configure delay time information for the control sub-instruction corresponding to each target device in the first control instruction to obtain a second control instruction corresponding to each target device; the delay time information corresponding to different target devices is not completely the same.

[0060] When the number of target devices is greater than or equal to two, it means that the user needs to perform batch control on multiple target devices. Therefore, in the case of batch control, delay time information is configured for the control sub-instruction corresponding to each target device in the first control instruction to obtain a second control instruction corresponding to each target device.

[0061] In the example of the present invention, step 103 includes:

[0062] Step 1031, configure different delay time ranges for different control sub-instructions, and obtain a second control instruction corresponding to each target device. The delay time range is used for the target device to randomly select a delay time length within the delay time range, and after executing the control action, send the first status data after delaying the delay time length.

[0063] When the number of target devices is greater than or equal to two, it indicates that multiple target devices need to be controlled. On this basis, in order to reduce the peak pressure of the server, in an example of the present invention, when the number of target devices is greater than or equal to two, a delay time range is configured for the control sub-instruction corresponding to each target device in the first control instruction, so that the target device randomly selects a delay time length within the delay time range, and after executing the control action, the target device sends the first status data after delaying for the delay time length, thereby reducing the peak pressure of the server.

[0064] In the example of the present invention, considering that the user and the server have different timeliness requirements for the first state data fed back by different target devices, and further reducing the peak pressure of the server receiving the first state data, the delay time information corresponding to different target devices is not completely the same. For example, the delay time range set for target device 1 is 1 minute, the delay time range set for target device 2 is 3 minutes, and the delay time range set for target device 3 is 5 minutes.

[0065] In the present invention, different delay time ranges can be configured for different control sub-instructions according to experience values. For example, according to the peak duration of the server receiving the first state data in the historical time, a delay time range greater than the peak duration is selected as the setting delay time range.

[0066] In another example of the present invention, the server adjusts the delay time range according to the current time and the type of the target device. For example, 7 am to 10 am and 6 pm to 8 pm are the morning and evening peaks, so it is easier for users to control the target device, and the control requirements for curtains and air conditioners are higher. Therefore, the delay time range can be increased for curtains and air conditioners during the morning and evening peaks to further reduce the server traffic peak. For example, if the curtains are set from 7 am to 10 am, they can report the first status data within 5 minutes after the control action is executed, and if the curtains are set from 10 am to 4 pm, they can report the first status data within 3 minutes after the control action is executed.

[0067] In another example of the present invention, for two target devices that have a chronological order in which action completion times are executed, the end time of the delay time range configured by the server for the target device that completes the action first is earlier than the start time of the delay time range configured for the target device that completes the action later, thereby making the first status data reported by the two target devices that have a chronological order in which action completion times are executed more in line with the execution order.

[0068] In another embodiment of the present invention, the delay time information corresponding to different target devices may be the same, and the present invention is not limited to this.

[0069] The first state data is the state data after the target device performs the control action. In the example of the present invention, after the target device performs the corresponding control action, the state information of the target device will change, and the target device will send the first state data after performing the control action to the server.

[0070] The first state data after different target devices execute control actions are different. For example, after the air conditioner completes the temperature adjustment action, the first state data sent by the air conditioner includes: power on or off, mode, light, at least one of wind speed, and temperature. For example, after the washing machine completes the laundry action, the first state data sent by the washing machine includes: the amount of electricity used for laundry, the amount of water used for laundry, and the time used for laundry.

[0071] In the example of the present invention, the target device will randomly select a delay time length within the delay time range, and after the target device executes the control action, it will send the first status data within the time corresponding to the delay time length after the control action is executed based on the selected delay time length. For example, when the delay time range set by the target device 1 is 1 minute, the randomly selected delay time length is 20 seconds, and the target device 1 can send the first status data to the server 20 seconds after the control action is executed.

[0072] In the example of the present invention, step 1031 includes:

[0073] Step 201: For each control sub-instruction, configure delay time information in a preset field of the control sub-instruction to obtain a second control instruction.

[0074] When configuring the delay time information, the configuration may be performed for the preset field of each control sub-instruction in the first control instruction, thereby obtaining the second control instruction corresponding to each target device.

[0075] Wherein, step 201 includes:

[0076] Step 2011: Add delay time information to other information fields of the control sub-instruction to obtain a second control instruction.

[0077] When the number of controls is greater than or equal to two, the first control instruction includes control sub-instructions for multiple target devices. The control sub-instruction includes: a device control instruction field and other information fields, wherein the device control instruction field is used to record the device control instruction, and the device control instruction is used to instruct the target device to perform a control action. The other information field is used for configuration by the server. The control sub-instruction also includes: a target device ID, and the target device ID is used to determine the identity of the target device.

[0078] For example, when the number of controls is greater than or equal to two, the format of the first control instruction is as follows: [

[0080] {target device 1id, device control instructions for target device 1, other information},

[0081] {target device 2id, device control instructions of target device 2, other information},

[0082] {target device 3id, device control instructions for target device 3, other information}, ...

[0084] ], wherein the control sub-instruction corresponding to the target device 1 is {target device 1id, device control instruction of target device 1, other information}, the control sub-instruction corresponding to the target device 2 is {target device 2id, device control instruction of target device 2, other information}, and the control sub-instruction corresponding to the target device 3 is {target device 3id, device control instruction of target device 3, other information}, wherein the device control instruction of target device 1 in the control sub-instruction corresponding to the target device 1 corresponds to the device control instruction field, and other information corresponds to the other information field.

[0085] In the example of the present invention, when configuring the delay time information, the delay time information may be added to other information fields of each control sub-instruction, thereby obtaining a second control instruction corresponding to each target device.

[0086] Since different target devices correspond to different device control instructions, and considering the device security requirements, the device control instruction field is often encrypted. Therefore, the example of the present invention provides other information fields, and the other information fields are plain text, so that the server can add delay time information in other information fields without decrypting the device control instruction field. Moreover, since the security level of other information fields is lower than that of the device control instruction field, even if other information fields are leaked, no security incidents will occur. Therefore, by setting other information fields, the server computing pressure is reduced without causing security incidents.

[0087] It should be noted that the device control instruction in the control sub-instruction of the target device can enable the target device to perform at least one action. For example, the device control instruction 1 for the target device 1 indicates that the action performed by the target device can be turned on and the parameters can be adjusted to a specified value, such as controlling the air conditioner to turn on and adjusting the cooling temperature of the air conditioner to 24°C. For another example, the device control instruction 1 for the target device 1 indicates that the action performed by the target device can be turned on.

[0088] In the example of the present invention, other relevant information can also be added to other information fields. For example, the server can add the frequency of sending the target device status in other information fields, so that during the process of the target device executing the control action, the status of the target device is continuously fed back to the server based on the frequency of sending the target device status.

[0089] Step 104, sending each second control instruction to the corresponding target device; the second control instruction is used to make the target device execute the control action indicated by the second control instruction, and according to the delay time information in the second control instruction, delay sending the first state data after the target device executes the control action to the server.

[0090] Since the second control instruction is obtained by the server after adding the delay time information in the other information fields of each control sub-instruction, the second control instruction includes the device control instruction field and the other information fields after adding the delay time information, so that the target device can be instructed to perform a control action based on the second control instruction, and the first status data after the target device performs the control action can be delayed and sent to the server according to the delay time information in the second control instruction.

[0091] In an example of the present invention, step 104 includes:

[0092] Step 1041: For each second control instruction, select a delayed sending time of the second control instruction within a first time range.

[0093] The first time range can be set according to experience or the current working pressure of the server, and the delayed sending time can be a time randomly selected within the first time range or a time predicted by the server according to the working pressure and belonging to the first time range. The first time ranges corresponding to each second control instruction can be the same or different.

[0094] The first time range can be 2 seconds to 3 seconds, or 1 minute to 5 minutes, and the examples of the present invention do not limit this. For example, the first time range for target device 1 is 5 minutes, so after the server generates the second control instruction, it can send the second control instruction to the corresponding target device at a random time within 5 minutes, or the server predicts that the server's working pressure will be lower than the preset working pressure value within 4 minutes based on the working pressure, so the server sends the second control instruction to the corresponding target device at the 4th minute after generating the second control instruction.

[0095] The first time range corresponding to each second control instruction may be different, for example, the first time range for target device 1 may be set to 1 minute, the first time range for target device 2 may be set to 3 minutes, and the first time range for target device 3 may be set to 5 minutes. Since the time ranges are different, the delay times randomly selected in different time ranges may be different, thereby discretizing the time for each target device to upload status data.

[0096] Step 1042: based on the delayed sending time corresponding to the second control instruction, delay sending the corresponding second control instruction to the target device corresponding to the second control instruction

[0097] In the example of the present invention, when the server sends the corresponding second control instruction to multiple target devices, it can delay sending each second control instruction, so that the server does not have to send the second control instruction to the multiple target devices immediately, reducing the peak pressure of the server. Therefore, when batch control is performed on multiple target devices, the moment when the server sends the second control instruction to each target device is discrete within the first time range. After the target device performs the control action, it randomly selects a time within the delay time range corresponding to the delay time information to send the first state data. For this batch control of multiple target devices, the sending time of the first state data sent by multiple target devices to the server is discretized within a time period, instead of allowing multiple target devices to send the first state data to the server at one time.

[0098] In summary, in an embodiment of the present application, a first control instruction sent by a client is received, and the number of target devices to be controlled is determined according to the first control instruction. When the number of target devices is greater than or equal to two, delay time information is configured for the control sub-instruction corresponding to each target device in the first control instruction to obtain a second control instruction corresponding to each target device. The delay time information corresponding to different target devices is not exactly the same. Each second control instruction is sent to the corresponding target device. The second control instruction is used to enable the target device to execute the control action indicated by the second control instruction, and according to the delay time information in the second control instruction, the first state data after the target device executes the control action is delayed and sent to the server. Therefore, in the case of batch control of multiple target devices, the first state data reported by multiple target devices will be dispersed at different times, so as to avoid the target device immediately reporting the latest state after executing the second control instruction, resulting in the concentrated time of reporting data by different target devices and the occurrence of high peak pressure on the server.

[0099] In another example of the present invention, when the number of target devices is one, after receiving the first control instruction, the server may forward it to the target device. After the target device executes the first control instruction, it immediately sends the first status data to the server.

[0100] Figure 4 is a flow chart of the steps of a control instruction processing method provided by an embodiment of the present invention, such as Figure 4 As shown, the method is applied to a target device, comprising:

[0101] Step 301: Receive a second control instruction sent by a server; the second control instruction is configured with delay time information.

[0102] The second control instruction is used to make the target device execute the control action indicated by the second control instruction, and delay sending the first state data after the target device executes the control action to the server according to the delay time information in the second control instruction.

[0103] For step 301 , reference may be made to the detailed description of the above-mentioned steps 103 and 104 , which will not be repeated here.

[0104] Step 302: Execute the control action indicated by the second control instruction, and according to the delay time information in the second control instruction, delay sending the first state data after the target device executes the control action to the server.

[0105] After receiving the second control instruction, the target device parses the second control instruction to determine the device control instruction field and other information fields in the second control instruction, performs the corresponding control action according to the device control instruction field, and updates its own state data to obtain the first state data. After executing the corresponding control action, the target device will delay sending the first state data after the target device executes the control action to the server according to the delay time information in the other information fields.

[0106] Since different users have certain similarities in their smart home control settings, for example, most of them are concentrated between 6pm and 8pm, a large number of users reporting status data in a short period of time will cause a large peak pressure on the server. However, this application, through the above-mentioned delayed reporting of status data, when a large number of users use multiple target devices in a short period of time (for example, 6pm to 8pm), the server disperses the time of the first status data sent by the target device controlled by each user in batches, which greatly reduces the peak value of data reporting traffic in a short period of time, avoids the impact of short-term excessive peak values ​​on the service, and improves the reliability and stability of the service.

[0107] Wherein, the delay time information includes a delay time range, and step 302 includes:

[0108] Step 3021, randomly select a delay time length within the delay time range.

[0109] The specific description of step 3021 may refer to the above step 103 and will not be repeated here.

[0110] Step 3022: after executing the control action, send the first status data to the server after a delay time.

[0111] The specific description of step 3022 may refer to the above step 103 and will not be repeated here.

[0112] In summary, in the examples of the present invention, after receiving the second control instruction, the target device executes the control action indicated by the second control instruction, and delays sending the first state data of the target device after executing the control action to the server according to the delay time information in the second control instruction, so that after multiple target devices complete the control action, multiple first state data will not be sent to the server immediately. Therefore, although all the first state data received by the server cannot be evenly distributed in every second of the day, for the peak period of server usage in a day, for example, when different users concentrate on using smart home devices from 6 to 8 pm, the first state data received by the server is discretized into a longer time range (within 1 to 5 minutes), which reduces the peak pressure of the server, avoids the impact of short-term excessively high peaks on the server, and improves the reliability and stability of the server.

[0113] Reference Figure 5 , which shows a block diagram of a control instruction sending device 400 provided in an embodiment of the present application, including:

[0114] The first receiving module 401 is used to receive a first control instruction sent by a client.

[0115] The quantity determination module 402 is used to determine the quantity of target devices to be controlled according to the first control instruction.

[0116] The control instruction generation module 403 is used to configure delay time information for the control sub-instructions corresponding to each target device in the first control instruction when the number of target devices is greater than or equal to two, so as to obtain a second control instruction corresponding to each target device; the delay time information corresponding to different target devices is not completely the same

[0117] The sending module 404 is used to send each second control instruction to the corresponding target device; the second control instruction is used to make the target device execute the control action indicated by the second control instruction, and according to the delay time information in the second control instruction, delay the sending of the first state data after the target device executes the control action to the server.

[0118] The control instruction generating module 403 includes:

[0119] The control instruction generation submodule 4031 is used to configure different delay time ranges for different control sub-instructions to obtain a second control instruction corresponding to each target device; the delay time range is used for the target device to randomly select a delay time length within the delay time range, and after executing the control action, send the first status data after delaying the delay time length.

[0120] The sending module 404 includes:

[0121] The first sending submodule 4041 is configured to select, for each second control instruction, a delayed sending time of the second control instruction within a first time range.

[0122] The second sending submodule 4042 is used to delay sending the corresponding second control instruction to the target device corresponding to the second control instruction based on the delayed sending time corresponding to the second control instruction.

[0123] The control instruction generation submodule 4031 includes:

[0124] The first instruction generating module 501 is used to configure the delay time information in the preset field of each control sub-instruction to obtain a second control instruction.

[0125] The control sub-instruction includes: a device control instruction field and other information fields. The device control instruction field is used to record the device control instruction; the device control instruction is used to instruct the target device to perform a control action.

[0126] The first instruction generating module 501 includes:

[0127] The first instruction generating submodule 5011 is used to add the delay time information to the other information fields of the control subinstruction to obtain the second control instruction.

[0128] In summary, an embodiment of the present invention provides a control instruction sending device, which receives a first control instruction sent by a client; determines the number of target devices to be controlled according to the first control instruction; when the number of target devices is greater than or equal to two, configures delay time information for the control sub-instructions corresponding to each target device in the first control instruction, and obtains a second control instruction corresponding to each target device; the delay time information corresponding to different target devices is not exactly the same; sends each second control instruction to the corresponding target device; the second control instruction is used to enable the target device to execute the control action indicated by the second control instruction, and according to the delay time information in the second control instruction, delays the sending of first status data after the target device executes the control action to the server, thereby avoiding the target device from immediately reporting the latest status after executing the second control instruction when controlling multiple target devices, resulting in concentrated time for reporting data by different target devices and high peak pressure on the server.

[0129] Reference Figure 6 , which shows a block diagram of a control instruction processing device 600 provided in an embodiment of the present application, including:

[0130] The second receiving module 601 is used to receive a second control instruction sent by the server; the second control instruction is configured with delay time information.

[0131] The delayed sending module 602 is used to execute the control action indicated by the second control instruction, and delay sending the first state data after the target device executes the control action to the server according to the delay time information in the second control instruction.

[0132] The delay time information includes a delay time range.

[0133] The delay module 602 includes:

[0134] The first delay submodule 6021 is used to randomly select a delay time length within a delay time range;

[0135] The second delay submodule 6021 is used to send the first status data to the server after delaying for a delay time after executing the control action.

[0136] In summary, an embodiment of the present invention provides a control instruction processing device. After receiving a second control instruction, the target device executes the control action indicated by the second control instruction, and delays sending the first state data of the target device after executing the control action to the server according to the delay time information in the second control instruction. Therefore, after multiple target devices execute the control action, they will not immediately send the first state data to the server, so that the first state data received by the server is discretized into a longer time range, thereby reducing the peak pressure on the server.

[0137] The present invention also provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the control instruction sending and processing method of the aforementioned embodiment when executing the program.

[0138] The present invention also provides a readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the control instruction sending and processing method of the aforementioned embodiment.

[0139] The embodiments of the present disclosure may be implemented as a device that uses any appropriate hardware, firmware, software, or any combination thereof to perform desired configurations, and the device may include electronic devices such as terminal devices and server (cluster). Figure 7 An exemplary device 700 that can be used to implement various embodiments described in the embodiments of the present application is schematically shown.

[0140] For one embodiment, Figure 7 An exemplary apparatus 700 is shown having one or more processors 702, a control module (chip set) 704 coupled to at least one of the processor(s) 702, a memory 706 coupled to the control module 704, a non-volatile memory (NVM) / storage device 708 coupled to the control module 704, one or more input / output devices 710 coupled to the control module 704, and a network interface 712 coupled to the control module 704.

[0141] The processor 702 may include one or more single-core or multi-core processors, and the processor 702 may include any combination of general-purpose processors or special-purpose processors (such as graphics processors, application processors, baseband processors, etc.). In some embodiments, the device 700 can be used as a terminal device, a server (cluster), and other devices described in the embodiments of the present application.

[0142] In some embodiments, the apparatus 700 may include one or more computer-readable media (e.g., memory 706 or NVM / storage device 708) having instructions 714 and one or more processors 702 combined with the one or more computer-readable media and configured to execute the instructions 714 to implement a module to perform the actions described in the present disclosure.

[0143] For one embodiment, the control module 704 may include any suitable interface controller to provide any suitable interface to at least one of the processor(s) 702 and / or any suitable device or component in communication with the control module 704 .

[0144] The control module 704 may include a memory controller module to provide an interface to the memory 706. The memory controller module may be a hardware module, a software module, and / or a firmware module.

[0145] The memory 706 may be used, for example, to load and store data and / or instructions 714 for the device 700. For one embodiment, the memory 706 may include any suitable volatile memory, such as a suitable DRAM. In some embodiments, the memory 706 may include double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).

[0146] For one embodiment, control module 704 may include one or more input / output controllers to provide an interface to NVM / storage device 708 and input / output device(s) 710 .

[0147] For example, NVM / storage 708 may be used to store data and / or instructions 714. NVM / storage 708 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).

[0148] NVM / storage device 708 may include storage resources that are physically part of the device on which apparatus 700 is installed, or it may be accessible to the device without being part of the device. For example, NVM / storage device 708 may be accessed via input / output device(s) 710 over a network.

[0149] (One or more) input / output devices 1010 may provide an interface for the apparatus 700 to communicate with any other appropriate device, and the input / output device 710 may include a communication component, an audio component, a sensor component, etc. The network interface 712 may provide an interface for the apparatus 700 to communicate through one or more networks, and the apparatus 700 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, for example, accessing a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof for wireless communication.

[0150] For one embodiment, at least one of the processor(s) 702 may be packaged together with the logic of one or more controllers (e.g., a memory controller module) of the control module 704. For one embodiment, at least one of the processor(s) 702 may be packaged together with the logic of one or more controllers of the control module 704 to form a system-in-package (SiP). For one embodiment, at least one of the processor(s) 702 may be integrated on the same die with the logic of one or more controllers of the control module 704. For one embodiment, at least one of the processor(s) 702 may be integrated on the same die with the logic of one or more controllers of the control module 704 to form a system-on-chip (SoC).

[0151] In various embodiments, the device 700 may be, but is not limited to, a terminal device such as a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). In various embodiments, the device 700 may have more or fewer components and / or different architectures. For example, in some embodiments, the device 700 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.

[0152] Among them, the main control chip can be used as a processor or control module in the detection device, sensor data, location information, etc. are stored in a memory or NVM / storage device, the sensor group can be used as an input / output device, and the communication interface may include a network interface.

[0153] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the description of the above specific languages ​​is for disclosing the best mode of the present invention.

[0154] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0155] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.

[0156] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0157] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the sorting device according to the present invention. The present invention may also be implemented as a device or apparatus program for executing part or all of the methods described herein. Such a program for implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0158] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.

[0159] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0160] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

[0161] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A control instruction sending method, characterized in that: Applied to a server, the method comprises: Receiving a first control instruction sent by a client; Determining the number of target devices to be controlled according to the first control instruction; When the number of the target devices is greater than or equal to two, delay time information is configured for the control sub-instructions corresponding to the target devices in the first control instruction to obtain second control instructions corresponding to the target devices; the delay time information corresponding to different target devices is not completely the same; Each second control instruction is sent to the corresponding target device; the second control instruction is used to make the target device execute the control action indicated by the second control instruction, and according to the delay time information described in the second control instruction, delay sending the first status data after the target device executes the control action to the server.

2. The method according to claim 1, characterized in that Configuring delay time information for the control sub-instructions corresponding to the target devices in the first control instruction to obtain second control instructions corresponding to the target devices, including: Different delay time ranges are configured for different control sub-instructions to obtain a second control instruction corresponding to each target device; the delay time range is used for the target device to randomly select a delay time length within the delay time range, and after executing the control action, send the first status data after delaying the delay time length.

3. The method according to claim 1, characterized in that The sending each of the second control instructions to the corresponding target device includes: For each second control instruction, selecting a delayed sending time of the second control instruction within a first time range; Based on the delayed sending time corresponding to the second control instruction, the corresponding second control instruction is sent to the target device corresponding to the second control instruction with a delayed sending time.

4. The method according to claim 2, characterized in that: The configuring delay time information for the control sub-instructions corresponding to the target devices in the first control instruction to obtain the second control instructions corresponding to the target devices includes: For each of the control sub-instructions, the delay time information is configured in a preset field of the control sub-instruction to obtain the second control instruction.

5. The method according to claim 4, characterized in that The control sub-instruction includes: a device control instruction field and other information fields, wherein the device control instruction field is used to record the device control instruction; the device control instruction is used to instruct the target device to perform a control action; and the delay time information is added to the preset field of the control sub-instruction to obtain the second control instruction, including: The delay time information is added to other information fields of the control sub-instruction to obtain the second control instruction.

6. A control instruction processing method, characterized in that: Applied to a target device, the method comprises: receiving a second control instruction sent by the server; wherein the second control instruction is configured with delay time information; Execute the control action indicated by the second control instruction, and delay sending the first state data after the target device executes the control action to the server according to the delay time information in the second control instruction.

7. The method according to claim 6, characterized in that The delay time information includes a delay time range; The delaying sending the first state data after the target device performs the control action to the server according to the delay time information in the second control instruction includes: Randomly select a delay time length within the delay time range; After executing the control action, the first status data is sent to the server after delaying for the delay time length.

8. A control instruction sending device, characterized in that: The device comprises: A first receiving module, used to receive a first control instruction sent by a client; A quantity determination module, used to determine the quantity of target devices to be controlled according to the first control instruction; a control instruction generating module, configured to configure delay time information for the control sub-instructions corresponding to each of the target devices in the first control instruction when the number of the target devices is greater than or equal to two, so as to obtain a second control instruction corresponding to each of the target devices; the delay time information corresponding to different target devices is not completely the same; A sending module is used to send each second control instruction to a corresponding target device; the second control instruction is used to enable the target device to execute the control action indicated by the second control instruction, and according to the delay time information described in the second control instruction, delay the sending of the first status data after the target device executes the control action to the server.

9. A control instruction processing device, characterized in that: The device comprises: A second receiving module is used to receive a second control instruction sent by the server; the second control instruction is configured with delay time information; The delayed sending module is used to execute the control action indicated by the second control instruction, and delay sending the first state data after the target device executes the control action to the server according to the delay time information in the second control instruction.

10. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the control instruction sending method described in any one of claims 1 to 5 or the control instruction processing method described in any one of claims 6 to 7 is implemented.

11. A readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the control instruction sending method described in any one of claims 1-5 or the control instruction processing method described in any one of claims 6-7.

Citation Information

Patent Citations

  • Equipment control method and device

    CN114911171A

  • Data reporting method and device, equipment and medium

    CN116248691A