CN115616930A - Control instruction sending method and device, storage medium and electronic device - Google Patents

Control instruction sending method and device, storage medium and electronic device Download PDF

Info

Publication number
CN115616930A
CN115616930A CN202211350532.9A CN202211350532A CN115616930A CN 115616930 A CN115616930 A CN 115616930A CN 202211350532 A CN202211350532 A CN 202211350532A CN 115616930 A CN115616930 A CN 115616930A
Authority
CN
China
Prior art keywords
target
control instruction
sent
time
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211350532.9A
Other languages
Chinese (zh)
Inventor
闫达
李华刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd, Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202211350532.9A priority Critical patent/CN115616930A/en
Publication of CN115616930A publication Critical patent/CN115616930A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B15/00Systems controlled by a computer
    • G05B15/02Systems controlled by a computer electric
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM]
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/26Pc applications
    • G05B2219/2642Domotique, domestic, home control, automation, smart house

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Manufacturing & Machinery (AREA)
  • Quality & Reliability (AREA)
  • Selective Calling Equipment (AREA)

Abstract

The application discloses a sending method and device of a control command, a storage medium and an electronic device, and relates to the technical field of smart homes, wherein the sending method of the control command comprises the following steps: determining target processing time for processing a control instruction of a target type by target equipment in the process of continuously issuing a plurality of control instructions by a target component of a target application, wherein the plurality of control instructions are used for controlling the target equipment, and the types of the control instructions are the target types; and sequentially sending part of the control instructions to the target equipment according to the target processing time. By adopting the technical scheme, the problem that the equipment cannot respond in time due to the fact that the application sends a plurality of control instructions of the same type issued by the user in a short time to the equipment is solved.

Description

Control instruction sending method and device, storage medium and electronic device
Technical Field
The present application relates to the field of smart home technologies, and in particular, to a method and an apparatus for sending a control command, a storage medium, and an electronic apparatus.
Background
Along with intelligent arrival, more and more equipment can all carry out remote control, for example can send control command controlgear to equipment through Application (APP for short), but controlling similar light luminance, when audio amplifier sound, all need through sliding or touching many times, and then the user can issue very many orders in the short time, and APP can all send all orders to equipment, but because equipment response order needs certain time, and then the operation result that leads to equipment response and show on APP is all slower for user experience is poor.
The method aims at the problem that in the related technology, the application sends a plurality of control instructions of the same type issued by a user in a short time to equipment, so that the equipment cannot respond in time.
Therefore, there is a need for improvement of the related art to overcome the drawbacks of the related art.
Disclosure of Invention
The embodiment of the invention provides a sending method and device of a control instruction, a storage medium and an electronic device, which aim to solve the problem that equipment cannot respond in time due to the fact that at least a plurality of control instructions of the same type issued by a user in a short time are all sent to the equipment.
According to an aspect of an embodiment of the present invention, a method for sending a control instruction is provided, including: determining target processing time for processing a control instruction of a target type by target equipment in the process of continuously issuing a plurality of control instructions by a target component of a target application, wherein the plurality of control instructions are used for controlling the target equipment, and the types of the control instructions are the target types; and sequentially sending part of the control instructions to the target equipment according to the target processing time.
In one exemplary embodiment, determining a target processing time for the target device to process a control instruction of a target type includes: determining whether the target application sends the control instruction of the target type to the target device; determining the average time of the target device for processing the control instruction of the target type historically as the target processing time under the condition that the target application is determined to send the control instruction of the target type to the target device; and under the condition that the target application is determined not to send the control instruction of the target type to the target equipment, sending a first control instruction to the target equipment, determining target time for processing the first control instruction by the target equipment, and determining the target time as the target processing time, wherein the first control instruction is a control instruction which is issued by the target object at the earliest time in the control instructions.
In an exemplary embodiment, determining the target time for the target device to process the first control instruction when the operation log of the target device is obtained includes: determining a first time when the target device receives the first control instruction from the operation log, and determining a second time when the target device sends a response message from the operation log, wherein the response message is a message which needs to be sent to the target application after the target device processes the first control instruction; and determining the target time for the target equipment to process the first control instruction according to the first time and the second time.
In an exemplary embodiment, determining the target time for the target device to process the first control instruction when the operation log of the target device is not acquired includes: determining a third moment when the target application sends the first control instruction to the target device; determining a fourth moment when the target application receives a response message, wherein the response message is a message which needs to be sent to the target application after the target device processes the first control instruction; and determining the target time for the target equipment to process the first control instruction according to the third time and the fourth time.
In an exemplary embodiment, before sequentially sending some of the plurality of control commands to the target device according to the target processing time, the method further includes: before the target processing time is not determined, acquiring a control instruction issued by the target object according to a first acquisition frequency, and caching the acquired target control instruction to an instruction sending list; after the target processing time is determined, acquiring a control instruction issued by the target object according to a second acquisition frequency, and caching the acquired target control instruction to an instruction sending list, wherein the second acquisition frequency and the target processing time have a corresponding relation; sequentially sending part of the control instructions to the target equipment according to the target processing time, wherein the step of sending comprises the following steps: and sequentially sending part of the control instructions in the instruction sending list to the target equipment according to the target processing time.
In an exemplary embodiment, sequentially sending part of the control commands in the command sending list to the target device according to the target processing time includes: repeatedly executing the following operations until the instruction sending list is empty: determining whether the current control instruction to be sent in the instruction sending list is allowed to be sent or not according to the target processing time; under the condition that the transmission is determined to be allowed, the current control instruction to be transmitted is transmitted to the target application, and the next control instruction in the instruction transmission list is determined as the current control instruction to be transmitted; and under the condition that the transmission is not allowed, deleting the current control instruction to be transmitted from the instruction transmission list, and determining the next control instruction in the instruction transmission list as the current control instruction to be transmitted.
In an exemplary embodiment, determining whether the control instruction currently to be sent in the instruction sending list is allowed to be sent according to the target processing time includes: determining that the current control instruction to be sent is allowed to be sent under the condition that the control instruction of the target type is not sent before the current control instruction to be sent is sent; determining that the current control instruction to be sent is allowed to be sent under the conditions that the control instruction of the target type is sent before the current control instruction to be sent is sent and the time interval between the current time and the last time of sending the control instruction of the target type is greater than or equal to the target processing time; when the control instruction of the target type is sent before the current control instruction to be sent is sent, the time interval between the current time and the last time when the control instruction of the target type is sent is less than the target processing time, and the next control instruction in the instruction sending list is of the target type, determining that the current control instruction to be sent is not allowed to be sent; and determining that the current control instruction to be sent is allowed to be sent under the conditions that the control instruction of the target type is sent before the current control instruction to be sent is sent, the time interval between the current time and the last time when the control instruction of the target type is sent is less than the target processing time, and the next control instruction in the instruction sending list is not of the target type.
According to another aspect of the embodiments of the present invention, there is also provided a control instruction transmitting apparatus, including: the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining the target processing time of a target device for processing a control instruction of a target type in the process of continuously issuing a plurality of control instructions by a target component of a target application, wherein the plurality of control instructions are all used for controlling the target device, and the types of the control instructions are all the target types; and the sending module is used for sequentially sending part of the control instructions to the target equipment according to the target processing time.
According to still another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned control instruction sending method when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the sending method of the control instruction through the computer program.
According to the method and the device, the plurality of control instructions are not all sent to the target device by the application, but part of the plurality of control instructions are sequentially sent to the target device according to the time for processing the control instruction of the target type by the device, so that the problem that the device cannot respond in time due to the fact that the application sends the plurality of control instructions of the same type issued by the user to the device in a short time is solved, the device can respond to the control instruction of the user in time, and the experience of the user is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a hardware environment diagram of a method for sending a control instruction according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of sending a control instruction according to an embodiment of the invention;
fig. 3 is a timing diagram of a transmission method of a control instruction according to an embodiment of the present invention;
fig. 4 is a block diagram (one) of the configuration of a control instruction transmission apparatus according to an embodiment of the present invention;
fig. 5 is a block diagram showing the configuration of a control instruction transmission device according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the accompanying drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be implemented in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of an embodiment of the present application, a method for sending a control instruction is provided. The method for sending the control instruction is widely applied to full-house intelligent digital control application scenes such as intelligent homes (Smart Home), intelligent homes, intelligent household equipment ecology, intelligent house (Intellignee House) ecology and the like. Alternatively, in the present embodiment, the sending method of the control instruction may be applied to a hardware environment formed by the terminal device 102 and the server 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal device 102 through a network, and may be configured to provide a service (e.g., an application service) for the terminal or a client installed on the terminal, set a database on the server or independent of the server, and provide a data storage service for the server 104, and configure a cloud computing and/or edge computing service on the server or independent of the server, and provide a data operation service for the server 104.
The network may include, but is not limited to, at least one of: wired network, wireless network. The wired network may include, but is not limited to, at least one of: wide area networks, metropolitan area networks, local area networks, which may include, but are not limited to, at least one of the following: WIFI (Wireless Fidelity), bluetooth. Terminal equipment 102 can be but not limited to be PC, the cell-phone, the panel computer, intelligent air conditioner, intelligent cigarette machine, intelligent refrigerator, intelligent oven, intelligent kitchen range, intelligent washing machine, intelligent water heater, intelligent washing equipment, intelligent dish washer, intelligent projection equipment, intelligent TV, intelligent clothes hanger, intelligent (window) curtain, intelligence audio-visual, smart jack, intelligent stereo set, intelligent audio amplifier, intelligent new trend equipment, intelligent kitchen guarding equipment, intelligent bathroom equipment, intelligence robot of sweeping the floor, intelligence robot of wiping the window, intelligence robot of mopping the ground, intelligent air purification equipment, intelligent steam ager, intelligent microwave oven, intelligent kitchen is precious, intelligent clarifier, intelligent water dispenser, intelligent lock etc..
In order to solve the above problem, in this embodiment, a method for sending a control instruction is provided, including but not limited to being applied in a target application, and fig. 2 is a flowchart of a method for sending a control instruction according to an embodiment of the present invention, where the flowchart includes the following steps:
step S202, in the process that a target object continuously issues a plurality of control instructions through a target component of a target application, determining target processing time for processing the control instructions of a target type by target equipment, wherein the control instructions are all used for controlling the target equipment and the control instruction types are all the target types;
it should be noted that the target application is an application for controlling a target device, and the target device includes, but is not limited to, the smart device 102 described above. The target object is a user who controls the target device using the target application. The target component is a component for controlling the target equipment to complete the target function by the target application; the target functions include, but are not limited to, volume adjustment, brightness adjustment, and the like. The target component may be a sliding frame (adjusting the volume and brightness by sliding) or a button (increasing the volume by one unit, increasing the brightness by one unit, etc. every click). The target types include but are not limited to volume adjustment type, brightness adjustment type; that is, the above control commands are all used for adjusting the volume, or all used for adjusting the brightness, etc.
And step S204, sequentially sending part of the control instructions to the target equipment according to the target processing time.
It should be noted that the target application may collect each control instruction in the plurality of control instructions, and then sequentially cache each control instruction to the instruction sending list, and then the target application may select to sequentially send part of the control instructions in the instruction sending list to the target device according to the target processing time.
For example, the user may adjust the volume from 0 to 100 by sliding the target component in the target application within 1 second, and the target application may acquire 100 control instructions, including: control instruction 1 (adjust the volume of the target device to 1), control instruction 2 (adjust the volume of the target device to 2), and control instruction 3 (adjust the volume of the target device to 3).. Control instruction 100 (adjust the volume of the target device to 100), the target application may sequentially cache 100 control instructions in an instruction sending list.
In the related art, the target application sequentially sends the control instructions in the instruction sending list to the target device, and then the target device sequentially executes the control instructions, but the target device needs to consume time to process the control instructions, and if the target device can process one instruction in 0.02 second, the target device in the prior art needs 2 seconds to adjust the volume to 100, so that the target device responds slowly, and the user experience is poor.
In the embodiment of the application, part of the control instructions in the instruction sending list can be sequentially sent to the target device according to the time for processing the control instructions by the target device (for example, the control instructions 1, 3, 5.. 100 are sent to the target device), so that the target device can respond to the processing in time, and the experience of a user is improved.
In the step, the application does not send the control instructions to the target equipment, but sends part of the control instructions to the target equipment in sequence according to the time for the equipment to process the control instructions of the target type, so that the problem that the equipment cannot respond in time due to the fact that the application sends the control instructions of the same type issued by the user to the equipment in a short time is solved, the equipment can respond to the control instructions of the user in time, and the experience of the user is improved.
In an exemplary embodiment, the above-mentioned determining the target processing time for the target device to process the control instruction of the target type may be implemented by the following steps S11 to S13:
step S11: determining whether the target application sends the control instruction of the target type to the target device;
that is to say, it needs to be determined whether the target application issues the control instruction of the target type to the target device before the target object issues the control instructions of the plurality of target types through the target component, and specifically, when the first control instruction issued by the target object is acquired, it needs to be determined whether the control instruction of the target type is issued by the target application to the target device before the target application. For example: assuming the target type of volume adjustment type, it is necessary to determine whether the target application previously issues a volume adjustment control command to the target device.
Step S12: determining the average time of the target device for processing the control instruction of the target type historically as the target processing time under the condition that the target application is determined to send the control instruction of the target type to the target device;
step S13: and under the condition that the target application is determined not to send the control instruction of the target type to the target equipment, sending a first control instruction to the target equipment, determining the target time for the target equipment to process the first control instruction, and determining the target time as the target processing time, wherein the first control instruction is a control instruction which is issued by the target object at the earliest time (namely, a control instruction which is acquired by the target application at the earliest time) in the control instructions.
It should be noted that, by adopting the above technical scheme, the target processing time for the target device to process the control instruction of the target type can be accurately and timely obtained.
In an exemplary embodiment, if the target application can obtain the running log of the target device in real time, determining the target time for the target device to process the first control instruction may be implemented by the following steps S21 to S22:
step S21: determining a first time when the target device receives the first control instruction from the operation log, and determining a second time when the target device sends a response message from the operation log, wherein the response message is a message which needs to be sent to the target application after the target device processes the first control instruction;
step S22: and determining the target time for the target equipment to process the first control instruction according to the first time and the second time.
Specifically, the target time for the target device to process the first control instruction is obtained by subtracting the first time from the second time.
It should be noted that, by adopting the above technical solution, the time for the target device to process the control instruction of the target type can be determined very accurately.
In an exemplary embodiment, if the target application does not acquire the running log of the target device, determining the target time for the target device to process the first control instruction may be implemented by the following steps S31 to S33:
step S31: determining a third moment when the target application sends the first control instruction to the target device;
step S32: determining a fourth moment when the target application receives a response message, wherein the response message is a message which needs to be sent to the target application after the target device processes the first control instruction;
step S33: and determining the target time for the target equipment to process the first control instruction according to the third time and the fourth time.
Specifically, the target time for the target device to process the first control instruction is obtained by subtracting the third time from the fourth time.
It should be noted that, because the transmission time from the target application to the target device for transmitting the control instruction to the target device may be ignored with respect to the time for the target device to process the control instruction, the time for the target device to process the control instruction of the target type may be determined more accurately by using the above technical solution under the condition that the target device is not obtained.
In an exemplary embodiment, before sequentially sending part of the plurality of control commands to the target device according to the target processing time, the following steps S41 to S42 are further provided:
step S41: before the target processing time is not determined, acquiring a control instruction issued by the target object according to a first acquisition frequency, and caching the acquired target control instruction to an instruction sending list;
it should be noted that the first acquisition frequency is acquired once in x seconds, and when the target object issues a plurality of control instructions through the target application, if the target processing time is not determined yet, the control instructions issued by the user are acquired at a faster acquisition frequency (i.e., the first acquisition frequency). It should be noted that the interval acquisition time (x seconds) corresponding to the first acquisition frequency may be greater than the shortest time for the target device to process the instruction.
Step S42: after the target processing time is determined, acquiring a control instruction issued by the target object according to a second acquisition frequency, and caching the acquired target control instruction into an instruction sending list, wherein the second acquisition frequency and the target processing time have a corresponding relation;
it should be noted that the first acquisition frequency is greater than the second acquisition frequency. If the target processing time is determined when the target object issues a plurality of control instructions through the target application, the control instructions issued by the target object may be acquired through a second acquisition frequency (y second acquisition once), and it should be noted that the target processing time is positively correlated with the second acquisition frequency, that is, the longer the target processing time is, the longer the interval acquisition time (y second) corresponding to the second acquisition frequency is, the shorter the target processing time is, and the shorter the interval acquisition time (y second) corresponding to the second acquisition frequency is.
It should be noted that, in this embodiment, the control instructions continuously issued by the user are collected according to the target processing time, so that excessive and useless control instructions can be prevented from being collected.
After executing the above steps S41 to S42, the above step S204 can be implemented by: and sequentially transmitting part of the control instructions in the instruction transmission list to the target equipment according to the target processing time.
In an exemplary embodiment, sequentially sending part of the control instructions in the instruction sending list to the target device according to the target processing time may be implemented by: the following steps S51 to S53 are repeatedly executed until the instruction transmission list is empty:
step S51: determining whether the current control instruction to be sent in the instruction sending list is allowed to be sent or not according to the target processing time;
step S52: under the condition that the transmission is determined to be allowed, the current control instruction to be transmitted is transmitted to the target application, and the next control instruction in the instruction transmission list is determined as the current control instruction to be transmitted;
step S53: and under the condition that the transmission is not allowed, deleting the current control instruction to be transmitted from the instruction transmission list, and determining the next control instruction in the instruction transmission list as the current control instruction to be transmitted.
In an exemplary embodiment, the above step S51 may be implemented by the following steps S61-S64:
step S61: determining that the current control instruction to be sent is allowed to be sent under the condition that the target type control instruction is not sent before the current control instruction to be sent is sent;
step S62: when the control instruction of the target type is sent before the current control instruction to be sent is sent and the time interval between the current time and the last time when the control instruction of the target type is sent is greater than or equal to the target processing time, determining that the current control instruction to be sent is allowed to be sent;
it should be noted that, if the time interval from the last sending of the control instruction of the target type is greater than or equal to the target processing time, it indicates that the target device has finished processing the control instruction sent last time, and the target application may send the control instruction to be sent to the target device at this time.
Step S63: determining that the current control instruction to be sent is not allowed to be sent under the conditions that the control instruction of the target type is sent before the current control instruction to be sent is sent, the time interval from the last time when the control instruction of the target type is sent at the current distance is less than the target processing time, and the next control instruction in the instruction sending list is of the target type;
it should be noted that, if the time interval from the last sending of the control instruction of the target type is shorter than the target processing time, it indicates that the target device has not processed the control instruction sent last time, and if the target application sends the control instruction to be sent to the target device at this time, the target device cannot process the control instruction in time.
Step S64: and determining that the current control instruction to be sent is allowed to be sent under the conditions that the control instruction of the target type is sent before the current control instruction to be sent is sent, the time interval from the current time to the last time to send the control instruction of the target type is less than the target processing time, and the next control instruction in the instruction sending list is not of the target type.
It should be noted that, if the next control instruction in the instruction sending list is not the target type, it indicates that the current control instruction to be sent is the last control instruction of the target type, and then in order to fulfill the control requirement of the user and ensure the control effect, the current control instruction to be sent must be sent to the target device.
It should be noted that, by adopting the above scheme, it can also be avoided that in the process of switching the page of the remote control device by the user through the APP, the user returns to the upper page or enters the second page to control other commands of the device after issuing a plurality of commands on the a page, and because the device does not process the plurality of commands issued on the a page in time, the previous command blocks the latest command, so that the device cannot process the latest command issued, and both the APP and the device respond slowly.
It is to be understood that the above-described embodiments are only a few, but not all, embodiments of the present invention. In order to better understand the above method, the following describes the above process with reference to an embodiment, but the method is not limited to the technical solution of the embodiment of the present invention, and specifically:
because when through APP remote control equipment, often can issue too many commands in the short time, equipment response time is long, for giving user's relatively good user experience, solves some commands and concentrates on issuing in the short time, but equipment and APP response time are longer cause the user to control the problem that intelligent device experience is poor. In an alternative embodiment, this may be achieved by:
specifically, fig. 3 is a timing diagram of a sending method of a control instruction according to an embodiment of the present invention, where a user opens an APP to enter an equipment detail page (for example, an equipment detail page of an intelligent lamp), drags a screen component to operate and control equipment in the equipment detail page, and then the equipment detail page collects a command issued by the user, and sends the collected command to an equipment SDK, and then the equipment SDK processes multiple commands and then issues the command to the equipment, and after the equipment performs related processing, the data that needs to be reported after the processing is reported to the equipment detail page through the equipment SDK, and then the user can see an operation result on the equipment detail page through refreshing a UI. It should be noted that both the device SDK and the device detail page are located in the APP.
It should be noted that the device SDK may process the multiple commands by: namely, determining the command information to be issued to the device according to the device response time (i.e. the target processing time) and the user control time (i.e. the time required by the user to issue a plurality of commands), specifically: the time for the device to process the command of the type needs to be obtained (the time for the device to process the command of the type is determined after the command is issued through the APP and the last time for the device to process the command of the type is returned; the time for the device to process the command of the type is determined after the command is not issued through the APP, the command is directly issued and the time for the device to process the command of the type is returned), and then the number of issued commands is determined according to the operation time of a user and the response time of the device. Specifically, the number of issued commands = the operation time of the user divided by the device response time.
It should be noted that the collected commands are buffered in a command queue to be issued, when actually issuing the commands in the command queue to the device, it is determined whether the latest command is issued after the commands in the command queue are issued, if waiting is needed, all the commands in the command queue are issued in sequence, and if not, all the commands in the command queue are emptied, and the current command is directly issued.
In this embodiment, the number of the collected user commands needs to be according to the real response time of the device, so that the long response time of the device caused by collecting too many commands in the control process is avoided, and meanwhile, the response speed of the APP and the device can be improved according to the issuing of the flexibly-operated control command.
That is to say, this embodiment collects the command that the user issued according to the current true response time of equipment, coordinates the time of controlling equipment and equipment response speed, solves the problem that the equipment response time is longer under the condition that the equipment issues multiple commands, and can bring bad experience to the user, so that the user can enjoy the remote control equipment and the user experience is also improved.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method according to the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a sending apparatus of a control instruction is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and details of which have been already described are omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementations in hardware or a combination of software and hardware are also possible and contemplated.
Fig. 4 is a block diagram (a) of a control instruction transmission apparatus according to an embodiment of the present invention, the apparatus including:
a determining module 42, configured to determine, in a process that a target object continuously issues multiple control instructions through a target component of a target application, target processing time for a target device to process a control instruction of a target type, where the multiple control instructions are all used for controlling the target device, and the control instruction types are all the target types;
a sending module 44, configured to send part of the control instructions to the target device in sequence according to the target processing time.
According to the device, the plurality of control instructions are not all sent to the target equipment by the application, but part of the control instructions in the plurality of control instructions are sequentially sent to the target equipment according to the time for processing the control instructions of the target type by the equipment, so that the problem that the equipment cannot respond in time due to the fact that the application sends the plurality of control instructions of the same type issued by the user to the equipment in a short time is solved, the equipment can respond to the control instructions of the user in time, and the experience of the user is improved.
In an exemplary embodiment, the determining module 42 is further configured to determine whether the target application has sent the control instruction of the target type to the target device; determining the average time of the target device for processing the control instruction of the target type historically as the target processing time under the condition that the target application is determined to send the control instruction of the target type to the target device; and under the condition that the target application is determined not to send the control instruction of the target type to the target device, sending a first control instruction to the target device, determining target time for the target device to process the first control instruction, and determining the target time as the target processing time, wherein the first control instruction is a control instruction issued by the target object at the earliest time among the control instructions.
In an exemplary embodiment, the determining module 42 is further configured to, in a case where the operation log of the target device is obtained, determine a target time for the target device to process the first control instruction by: determining a first time when the target device receives the first control instruction from the operation log, and determining a second time when the target device sends a response message from the operation log, wherein the response message is a message which needs to be sent to the target application after the target device processes the first control instruction; and determining the target time for the target equipment to process the first control instruction according to the first time and the second time.
In an exemplary embodiment, the determining module 42 is further configured to, in a case that the operation log of the target device is not acquired, determine the target time for the target device to process the first control instruction by: determining a third moment when the target application sends the first control instruction to the target device; determining a fourth moment when the target application receives a response message, wherein the response message is a message which needs to be sent to the target application after the target device processes the first control instruction; and determining the target time for processing the first control instruction by the target equipment according to the third time and the fourth time.
In an exemplary embodiment, fig. 5 is a block diagram of a structure of a device for sending a control command according to an embodiment of the present invention (ii), where the device further includes: the acquisition module 46 is configured to, before sequentially sending part of the control instructions of the plurality of control instructions to the target device according to the target processing time and before the target processing time is not determined, acquire the control instructions issued by the target object according to a first acquisition frequency, and cache the acquired target control instructions in an instruction sending list; after the target processing time is determined, acquiring a control instruction issued by the target object according to a second acquisition frequency, and caching the acquired target control instruction into an instruction sending list, wherein the second acquisition frequency and the target processing time have a corresponding relation; and the sending module 44 is further configured to send part of the control instructions in the instruction sending list to the target device in sequence according to the target processing time.
In an exemplary embodiment, the sending module 44 is further configured to repeatedly perform the following operations until the instruction sending list is empty: determining whether the current control instruction to be sent in the instruction sending list is allowed to be sent or not according to the target processing time; under the condition that the transmission is determined to be allowed, the current control instruction to be transmitted is transmitted to the target application, and the next control instruction in the instruction transmission list is determined as the current control instruction to be transmitted; and under the condition that the transmission is not allowed, deleting the current control instruction to be transmitted from the instruction transmission list, and determining the next control instruction in the instruction transmission list as the current control instruction to be transmitted.
In an exemplary embodiment, the sending module 44 is further configured to determine that the current control instruction to be sent is allowed to be sent when the control instruction of the target type is not sent before the current control instruction to be sent is sent; determining that the current control instruction to be sent is allowed to be sent under the conditions that the control instruction of the target type is sent before the current control instruction to be sent is sent and the time interval between the current time and the last time of sending the control instruction of the target type is greater than or equal to the target processing time; determining that the current control instruction to be sent is not allowed to be sent under the conditions that the control instruction of the target type is sent before the current control instruction to be sent is sent, the time interval from the last time when the control instruction of the target type is sent at the current distance is less than the target processing time, and the next control instruction in the instruction sending list is of the target type; and determining that the current control instruction to be sent is allowed to be sent under the conditions that the control instruction of the target type is sent before the current control instruction to be sent is sent, the time interval from the current time to the last time to send the control instruction of the target type is less than the target processing time, and the next control instruction in the instruction sending list is not of the target type.
Embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above-mentioned method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, in the process that a target object continuously issues a plurality of control instructions through a target component of a target application, determining target processing time of a target device for processing the control instructions of a target type, wherein the control instructions are all used for controlling the target device and the control instruction types are all the target types;
and S2, sequentially sending part of the control instructions to the target equipment according to the target processing time.
In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details of this embodiment are not repeated herein.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, in the process that a target object continuously issues a plurality of control instructions through a target component of a target application, determining target processing time of a target device for processing the control instructions of a target type, wherein the control instructions are all used for controlling the target device and the control instruction types are all the target types;
and S2, sequentially sending part of the control instructions to the target equipment according to the target processing time.
In an exemplary embodiment, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details of this embodiment are not repeated herein.
It will be apparent to those skilled in the art that the various modules or steps of the invention described above may be implemented using a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and they may be implemented using program code executable by the computing devices, such that they may be stored in a memory device and executed by the computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into various integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The foregoing is only a preferred embodiment of the present application and it should be noted that, as will be apparent to those skilled in the art, numerous modifications and adaptations can be made without departing from the principles of the present application and such modifications and adaptations are intended to be considered within the scope of the present application.

Claims (10)

1. A method for sending a control command, comprising:
determining target processing time for processing a control instruction of a target type by target equipment in the process of continuously issuing a plurality of control instructions by a target component of target application by the target object, wherein the plurality of control instructions are used for controlling the target equipment, and the types of the control instructions are all the target types;
and sequentially sending part of the control instructions to the target equipment according to the target processing time.
2. The method according to claim 1, wherein determining a target processing time for the target device to process the control command of the target type comprises:
determining whether the target application sends the control instruction of the target type to the target device;
determining the average time of the target device for processing the control instruction of the target type historically as the target processing time under the condition that the target application is determined to send the control instruction of the target type to the target device;
and under the condition that the target application is determined not to send the control instruction of the target type to the target equipment, sending a first control instruction to the target equipment, determining target time for processing the first control instruction by the target equipment, and determining the target time as the target processing time, wherein the first control instruction is a control instruction which is issued by the target object at the earliest time in the control instructions.
3. The method according to claim 2, wherein determining a target time for the target device to process the first control instruction when the operation log of the target device is acquired comprises:
determining a first time when the target device receives the first control instruction from the operation log, and determining a second time when the target device sends a response message from the operation log, wherein the response message is a message which needs to be sent to the target application after the target device processes the first control instruction;
and determining the target time for the target equipment to process the first control instruction according to the first time and the second time.
4. The method according to claim 2, wherein determining a target time for the target device to process the first control instruction when the operation log of the target device is not acquired comprises:
determining a third moment when the target application sends the first control instruction to the target device;
determining a fourth moment when the target application receives a response message, wherein the response message is a message which needs to be sent to the target application after the target device processes the first control instruction;
and determining the target time for the target equipment to process the first control instruction according to the third time and the fourth time.
5. The method according to claim 1, wherein the control command is transmitted from the host device,
before sequentially sending part of the control instructions to the target device according to the target processing time, the method further includes: before the target processing time is not determined, acquiring a control instruction issued by the target object according to a first acquisition frequency, and caching the acquired target control instruction to an instruction sending list; after the target processing time is determined, acquiring a control instruction issued by the target object according to a second acquisition frequency, and caching the acquired target control instruction to an instruction sending list, wherein the second acquisition frequency and the target processing time have a corresponding relation;
sequentially sending part of the control instructions to the target equipment according to the target processing time, wherein the step of sending comprises the following steps: and sequentially transmitting part of control instructions in the instruction transmission list to the target equipment according to the target processing time.
6. The method according to claim 5, wherein sequentially transmitting part of the control commands in the command transmission list to the target device according to the target processing time comprises:
repeatedly executing the following operations until the instruction sending list is empty:
determining whether the current control instruction to be sent in the instruction sending list is allowed to be sent or not according to the target processing time;
under the condition that the transmission is determined to be allowed, the current control instruction to be transmitted is transmitted to the target application, and the next control instruction in the instruction transmission list is determined as the current control instruction to be transmitted;
and under the condition that the control instruction to be sent is determined not to be allowed to be sent, deleting the control instruction to be sent currently from the instruction sending list, and determining the next control instruction in the instruction sending list as the control instruction to be sent currently.
7. The method according to claim 6, wherein determining whether the control command to be sent currently in the command sending list is allowed to be sent according to the target processing time includes:
determining that the current control instruction to be sent is allowed to be sent under the condition that the control instruction of the target type is not sent before the current control instruction to be sent is sent;
when the control instruction of the target type is sent before the current control instruction to be sent is sent and the time interval between the current time and the last time when the control instruction of the target type is sent is greater than or equal to the target processing time, determining that the current control instruction to be sent is allowed to be sent;
determining that the current control instruction to be sent is not allowed to be sent under the conditions that the control instruction of the target type is sent before the current control instruction to be sent is sent, the time interval from the last time when the control instruction of the target type is sent at the current distance is less than the target processing time, and the next control instruction in the instruction sending list is of the target type;
and determining that the current control instruction to be sent is allowed to be sent under the conditions that the control instruction of the target type is sent before the current control instruction to be sent is sent, the time interval from the current time to the last time to send the control instruction of the target type is less than the target processing time, and the next control instruction in the instruction sending list is not of the target type.
8. An apparatus for transmitting a control command, comprising:
the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining the target processing time of a target device for processing a control instruction of a target type in the process of continuously issuing a plurality of control instructions by a target component of a target application, wherein the plurality of control instructions are all used for controlling the target device, and the types of the control instructions are all the target types;
and the sending module is used for sequentially sending part of the control instructions to the target equipment according to the target processing time.
9. A computer-readable storage medium, comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 7 by means of the computer program.
CN202211350532.9A 2022-10-31 2022-10-31 Control instruction sending method and device, storage medium and electronic device Pending CN115616930A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211350532.9A CN115616930A (en) 2022-10-31 2022-10-31 Control instruction sending method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211350532.9A CN115616930A (en) 2022-10-31 2022-10-31 Control instruction sending method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN115616930A true CN115616930A (en) 2023-01-17

Family

ID=84877280

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211350532.9A Pending CN115616930A (en) 2022-10-31 2022-10-31 Control instruction sending method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115616930A (en)

Similar Documents

Publication Publication Date Title
CN105652675B (en) A kind of control method of smart home device, device, terminal and system
CN113111199A (en) Method and device for continuing playing of multimedia resource, storage medium and electronic device
CN115327934A (en) Intelligent household scene recommendation method and system, storage medium and electronic device
CN114697150A (en) Command issuing method and device, storage medium and electronic device
CN115309062A (en) Device control method, device, storage medium, and electronic apparatus
CN115616930A (en) Control instruction sending method and device, storage medium and electronic device
CN115345225A (en) Method and device for determining recommended scene, storage medium and electronic device
CN115631832A (en) Cooking plan determination method and device, storage medium and electronic device
CN114691731A (en) Usage preference determination method and apparatus, storage medium, and electronic apparatus
CN115167160A (en) Device control method and apparatus, device control system, and storage medium
CN115484119B (en) Control method and device of equipment, storage medium and electronic device
CN115047797A (en) Equipment operation method and device combined with behavior preference and storage medium
CN115312048A (en) Equipment awakening method and device, storage medium and electronic device
CN115296946B (en) Control request decomposition method and device, storage medium and electronic device
CN115473753A (en) Control method and device of gateway equipment, storage medium and electronic device
CN115987935A (en) Notification message pushing method and device, storage medium and electronic device
CN115174297A (en) Attribute information updating method and device, storage medium and electronic device
CN115930378A (en) Control instruction sending method and device and electronic device
CN115934200A (en) Resource pushing method and device, storage medium and electronic device
CN115237487A (en) Page rendering method and device, storage medium and electronic device
CN116010005A (en) Control instruction execution state feedback method and electronic device
CN116092498A (en) Voice instruction response method and device, storage medium and electronic device
CN116382110A (en) Equipment scheduling method and device, storage medium and electronic device
CN116346901A (en) Push content determining method and device, storage medium and electronic device
CN114815642A (en) Control method and device of intelligent equipment, storage medium and electronic device

Legal Events

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