CN115877722A - Device control method, device, electronic device, and computer-readable storage medium - Google Patents

Device control method, device, electronic device, and computer-readable storage medium Download PDF

Info

Publication number
CN115877722A
CN115877722A CN202111137084.XA CN202111137084A CN115877722A CN 115877722 A CN115877722 A CN 115877722A CN 202111137084 A CN202111137084 A CN 202111137084A CN 115877722 A CN115877722 A CN 115877722A
Authority
CN
China
Prior art keywords
preset
control strategy
user
information
current scene
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
CN202111137084.XA
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.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology 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 Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN202111137084.XA priority Critical patent/CN115877722A/en
Publication of CN115877722A publication Critical patent/CN115877722A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The embodiment of the invention discloses a device control method, a device, electronic equipment and a computer readable storage medium; in the embodiment of the application, when the intelligent device corresponding to the preset control strategy is controlled according to the preset control strategy, the current scene information corresponding to the preset control strategy is obtained in real time. And then comparing the current scene information with preset information in a preset control strategy. If the current scene information is inconsistent with the preset information, the preset control strategy is not applicable to the current scene any more, the preset control strategy is updated according to the current scene information, and an updated control strategy is obtained, so that the updated control strategy is applicable to the current scene. And finally, controlling the intelligent equipment according to the updated control strategy. Therefore, the preset control strategy can be changed in real time according to the current scene information, and more convenience is brought to the user.

Description

Device control method, device, electronic device and computer-readable storage medium
Technical Field
The invention relates to the technical field of smart home, in particular to a device control method and device, electronic equipment and a computer readable storage medium.
Background
Along with the development of science and technology, intelligent equipment is more and more intelligent, has brought very big convenience for the user. Currently, after a user installs an intelligent device, the user sets a device control strategy first, and then omits to control the intelligent device according to the control strategies.
However, in the process of controlling the smart device according to the control strategy, the control strategy is fixed and cannot be changed in real time, which results in that no more convenience can be brought to the user.
Disclosure of Invention
Embodiments of the present invention provide an apparatus control method and apparatus, an electronic device, and a computer-readable storage medium, which can solve the technical problem that a control policy cannot be changed in real time in a process of controlling an intelligent apparatus according to the control policy.
An apparatus control method comprising:
when the intelligent equipment corresponding to the preset control strategy is controlled according to the preset control strategy, current scene information corresponding to the preset control strategy is acquired in real time;
comparing the current scene information with preset information in the preset control strategy;
if the current scene information is inconsistent with the preset information, updating the preset control strategy according to the current scene information to obtain an updated control strategy;
and controlling the intelligent equipment according to the update control strategy.
Optionally, before the obtaining current scene information corresponding to a preset control policy in real time when the intelligent device corresponding to the preset control policy is controlled according to the preset control policy, the method further includes:
receiving an initial control strategy input by a user;
acquiring a preset conflict table;
checking the initial control strategy according to the preset conflict table;
and if the initial control strategy does not comprise the information in the preset conflict table, storing the initial control strategy as a preset control strategy.
Optionally, the initial control policy includes execution content corresponding to the smart device, and the preset conflict table is a preset parameter mutual exclusion table;
correspondingly, the checking the initial control policy according to the preset conflict table, and if the initial control policy does not include the information in the preset conflict table, storing the initial control policy as a preset control policy, including:
checking the execution content according to the preset parameter mutual exclusion table;
and if the execution content does not comprise the parameters in the preset parameter mutual exclusion table, storing the initial control strategy as a preset control strategy.
Optionally, the initial control policy includes a trigger condition corresponding to the intelligent device, and the preset conflict table is a preset condition conflict table;
correspondingly, the checking the initial control policy according to the preset conflict table, and if the initial control policy does not include the information in the preset conflict table, storing the initial control policy as a preset control policy, including:
checking the trigger condition according to the preset condition conflict table;
and if the triggering condition does not include the condition in the preset condition conflict table, storing the initial control strategy as a preset control strategy.
Optionally, after the controlling the smart device according to the update control policy, the method further includes:
obtaining an execution result after the intelligent device executes the update control strategy;
determining the distance between a user and each terminal device;
and sending the execution result to the terminal equipment with the shortest distance to the user for prompting so that the user can acquire the execution result.
Optionally, determining the distance between the user and each terminal device includes:
broadcasting user distance request information to each terminal device so that the terminal device determines the distance between a user and the terminal device based on the user distance request information;
and receiving the distance between the user and the terminal returned by the terminal equipment.
Optionally, after the controlling the smart device according to the update control policy, the method further includes:
obtaining an execution result of the intelligent device after executing the update control strategy;
broadcasting user distance request information to each terminal device, so that the terminal device determines the distance between a user and the terminal device based on the user distance request information, and searching the ticket number corresponding to the distance;
receiving the ticket number returned by each terminal device;
and sending the execution result to the terminal equipment with the highest ticket number for prompting so that the user can obtain the execution result.
Optionally, the current scene information is current position information of the user; correspondingly, the obtaining of the current scene information corresponding to the preset control strategy in real time includes:
acquiring a user current position point corresponding to the preset control strategy;
constructing a preset graph by taking the current position point of the user as a center and a preset distance as a length;
and taking the position information corresponding to the preset graph as the current position information of the user.
Optionally, before the obtaining current scene information corresponding to a preset control policy in real time when the intelligent device corresponding to the preset control policy is controlled according to the preset control policy, the method further includes:
when detecting that the current scene condition meets the trigger condition in the preset control strategy, sending the execution content in the preset control strategy to the intelligent equipment corresponding to the preset control strategy;
if the transmission fails, determining target intelligent equipment with the distance to the intelligent equipment within a preset threshold value;
and sending the execution content to the target intelligent equipment so that the target intelligent equipment forwards the execution content to the intelligent equipment.
Optionally, before the sending the execution content in the preset control policy to the smart device corresponding to the preset control policy, the method further includes:
determining the state of the intelligent equipment;
determining the execution type of the preset control strategy;
and if the state is an executable state and the execution types are all executed, transmitting the execution content in the preset control strategy to the standby intelligent equipment so that the standby intelligent equipment executes the execution content.
Optionally, after determining the state of the smart device, the method includes:
and if the state is a partial execution state and the execution type is partial execution, transmitting the executable content of the intelligent equipment to the intelligent equipment.
Accordingly, an embodiment of the present invention provides an apparatus control device, including:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring current scene information corresponding to a preset control strategy in real time when the intelligent equipment corresponding to the preset control strategy is controlled according to the preset control strategy;
the comparison module is used for comparing the current scene information with preset information in the preset control strategy;
the updating module is used for updating the preset control strategy according to the current scene information to obtain an updated control strategy if the current scene information is inconsistent with the preset information;
and the control module is used for controlling the intelligent equipment according to the update control strategy.
In addition, an electronic device according to an embodiment of the present invention includes a processor and a memory, where the memory stores a computer program, and the processor is configured to run the computer program in the memory to implement the device control method according to the embodiment of the present invention.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, and the computer program is suitable for being loaded by a processor to execute any one of the device control methods provided in the embodiment of the present invention.
As can be seen from the above, in the embodiment of the present application, when the intelligent device corresponding to the preset control policy is controlled according to the preset control policy, the current scene information corresponding to the preset control policy is obtained in real time. And then comparing the current scene information with preset information in a preset control strategy. If the current scene information is inconsistent with the preset information, the preset control strategy is not applicable to the current scene any more, the preset control strategy is updated according to the current scene information, and an updated control strategy is obtained, so that the updated control strategy is applicable to the current scene. And finally, controlling the intelligent equipment according to the updated control strategy. Therefore, the preset control strategy can be changed in real time according to the current scene information, and more convenience is brought to the user.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart of an apparatus control method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an apparatus control device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a device control method, a device control device and a computer readable storage medium. Wherein the device control apparatus may be integrated in an electronic device, which may be a server.
The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, network acceleration service (CDN), big data and an artificial intelligence platform.
The terminal device may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart watch, a smart device, and the like. The terminal device and the server may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
The intelligent equipment refers to equipment connected through the internet of things technology. The mutual information between the terminal device, the smart device, and the server may be encrypted using an encryption algorithm, for example, using Secure SHell (SSH).
The following are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
In the related art, in the process of controlling the smart device according to the control strategy, the control strategy is fixed and cannot be changed in real time, so that more convenience cannot be brought to the user.
For example, when the control policy is "when the user is at home and receives a soup-making start instruction, and the soup-making machine is controlled to operate" (to ensure safety, some intelligent devices operate when the user is at home), if the server detects that the user is at home and receives a soup-making start instruction, the server controls the soup-making machine to start operating. After the soup cooker starts to operate, if the user leaves home halfway, the user wants to continue to operate the soup cooker, but in order to ensure safety, the user closes the soup cooker, so that more convenience cannot be brought to the user.
In order to solve the technical problem, the application provides an equipment control method, and in the method, when the intelligent equipment corresponding to the preset control strategy is controlled according to the preset control strategy, the current scene information corresponding to the preset control strategy is obtained in real time. And then comparing the current scene information with preset information in a preset control strategy. If the current scene information is inconsistent with the preset information, the preset control strategy is not applicable to the current scene any more, the preset control strategy is updated according to the current scene information, and an updated control strategy is obtained, so that the updated control strategy is applicable to the current scene. And finally, controlling the intelligent equipment according to the updated control strategy. Therefore, the preset control strategy can be changed in real time according to the current scene information, and more convenience is brought to the user.
The following describes in detail the device control method provided in the embodiments of the present application.
As shown in fig. 1, the specific flow of the device control method is as follows:
s101, when the intelligent device corresponding to the preset control strategy is controlled according to the preset control strategy, current scene information corresponding to the preset control strategy is obtained in real time.
When the current condition meets the preset control strategy, the server controls the intelligent equipment corresponding to the preset control strategy according to the preset control strategy, and acquires the current scene information corresponding to the preset control strategy in real time when the intelligent equipment is controlled according to the preset control strategy.
The preset control strategy is a control strategy preset by a user, and the control strategy can include a trigger condition, intelligent device information, execution content corresponding to the intelligent device and the like. For example, when the preset control policy is that "when the user is at home and receives a start instruction for cooking soup, the soup cooking machine is controlled to start cooking soup", the trigger condition is that "when the user is at home and receives a start instruction", the intelligent device information is the soup cooking machine, and the corresponding execution content of the intelligent device is "soup cooking".
The current scene information is real-time information of a scene executing the preset control strategy, and can be set according to the actual situation of the scene executing the preset control strategy. For example, in the embodiment of the present application, the current context information may be current location information of the user and/or current operating state information of the smart device. The present application is not limited thereto.
For example, when the preset control policy is "when the user is at home and receives a soup-cooking start instruction, and the soup-cooking machine is controlled to start cooking soup", the scene in which the preset control policy is executed is a soup-cooking scene, and the current scene information may be current location information of the user and/or current operating state information of the smart device.
For another example, when the preset control policy is "the temperature of the environment is greater than the threshold value, and the air conditioner is turned on", the scene executing the preset control policy is a refrigeration scene, and the current scene information may be the current temperature information of the environment.
It should be noted that the current scene information may further include time information, current weather state information, indoor temperature information, outdoor temperature information, indoor humidity information, outdoor humidity information, and the like.
S102, comparing the current scene information with preset information in a preset control strategy.
After the server acquires the current scene information, the current scene information is compared with preset information in a preset control strategy. And if the current scene information is consistent with the preset information, the verification is passed, and if the current scene information is not consistent with the preset information, the verification is not passed.
For example, when the preset control policy is "the user is at home and receives a soup-cooking start instruction, and the soup-cooking machine is controlled to start cooking soup", the preset information is "the user is at home", and the current scene information may be the current location information of the user. And if the current position information of the user is that the user is at home, the current position information of the user is consistent with the preset information 'the user is at home'. And if the current position information of the user is that the user is not at home, the current position information of the user is inconsistent with the preset information 'the user is at home'.
And S103, if the current scene information is inconsistent with the preset information, updating the preset control strategy according to the current scene information to obtain an updated control strategy.
If the current scene information is inconsistent with the preset information, the scene condition corresponding to the preset control strategy is changed, at this moment, the preset control strategy is not applicable to the current scene any more, and the server updates the preset control strategy according to the current scene information to obtain an updated control strategy.
The process of updating the preset control strategy may be: and acquiring standby content corresponding to the current scene information, and modifying the triggering conditions in the preset control strategy or the execution content corresponding to the intelligent equipment according to the standby content. Or, modifying the intelligent device information in the preset control strategy according to the current scene information.
For example, the preset control policy is "when the user is at home and receives a soup-cooking start command, the soup-cooking machine is controlled to start cooking soup". When the current scene information is the current position information of the user, if the current position information of the user is that the user is not at home, it is indicated that the current scene condition does not meet the triggering condition of the preset control strategy, that is, the preset control strategy is no longer applicable to the current scene. Then, the standby content "sending the running condition of the soup cooker to the mobile phone of the user" corresponding to the situation that the user is not at home can be obtained (so that the user can know the situation of the soup cooker at any time and the safety is ensured), the triggering condition "the user is at home" in the preset control strategy is deleted, and "sending the running condition of the soup cooker to the mobile phone of the user" is added to the execution content in the preset control strategy.
For another example, the preset control policy is "when it is detected that the user arrives at home at 7 to 8 points, the lights in the living room and the kitchen are turned on", the current scene information is the current location information of the user, and if the current location information of the user is that the user is in the study room, the "lights in the living room and the kitchen are turned on" in the preset control policy may be modified to be lights in the living room and the study room.
And S104, controlling the intelligent equipment according to the updated control strategy.
And after the server obtains the update control strategy, the intelligent equipment is controlled according to the update control strategy. It should be noted that the intelligent device corresponding to the preset control policy may be the same as or different from the intelligent device corresponding to the updated control policy. The user can set according to actual conditions, and the application is not limited herein.
As can be seen from the above, in the embodiment of the present application, when the intelligent device corresponding to the preset control policy is controlled according to the preset control policy, the current scene information corresponding to the preset control policy is obtained in real time. And then comparing the current scene information with preset information in a preset control strategy. If the current scene information is inconsistent with the preset information, the preset control strategy is not applicable to the current scene any more, the preset control strategy is updated according to the current scene information, and an updated control strategy is obtained, so that the updated control strategy is applicable to the current scene. And finally, controlling the intelligent equipment according to the updated control strategy. Therefore, the preset control strategy can be changed in real time according to the current scene information, and more convenience is brought to the user.
When the user sets the control policy of the intelligent device, the server or the terminal device does not check the control policy set by the user. When a logic error exists in the control strategy set by the user, the error is found only when the control strategy is actually implemented, so that the intelligent device cannot be controlled according to the needs of the user.
For example, the preset control policy is "turn off and turn on the air conditioner when 7 o 'clock to 8 o' clock and it is detected that the user arrives at home", and at this time, "turn off" and "turn on" are two execution contents with conflict, and the air conditioners cannot be executed simultaneously. For another example, when the preset control policy is "the user is at home and the user is not at home," turn on the air conditioner "," the user is at home "and" the user is not at home "are two triggering conditions that conflict with each other.
In order to solve the technical problem, in some embodiments, when the server receives an initial control policy input by a user, a preset conflict table is obtained, and then the initial control policy is checked according to the preset conflict table. If the initial control policy does not include the information in the preset conflict table, which indicates that the initial control policy does not have a logic error, the initial control policy may be stored as a preset control policy.
And if the initial control strategy comprises the information in the preset conflict table, highlighting the information, and prompting a user to delete and modify the information.
The preset conflict table is a table preset by a user, and when the user sets the preset conflict table, the server can verify the preset conflict table through the rule engine.
The initial control strategy comprises execution content corresponding to the intelligent equipment, and the preset conflict table is a preset parameter mutual exclusion table.
Correspondingly, checking the initial control strategy according to the preset conflict table, and if the initial control strategy does not include the information in the preset conflict table, storing the initial control strategy as the preset control strategy, including:
and checking the execution content according to the preset parameter mutual exclusion table. And if the execution content does not comprise the parameters in the preset parameter mutual exclusion table, storing the initial control strategy as a preset control strategy.
In addition, the initial control strategy may also include a trigger condition corresponding to the intelligent device, and the preset conflict table is a preset condition conflict table.
Correspondingly, checking the initial control strategy according to the preset conflict table, and if the initial control strategy does not include the information in the preset conflict table, storing the initial control strategy as the preset control strategy, including:
and checking the trigger condition according to a preset condition conflict table. And if the trigger condition does not comprise the condition in the preset condition conflict table, storing the initial control strategy as a preset control strategy.
The specific storage mode of the preset control policy may be selected by a user according to an actual situation, for example, in an embodiment of the present application, a form of a single linked list or a directed acyclic graph is selected for storage, which is not specifically limited herein.
After the user inputs the trigger condition in the initial control strategy, the server can determine the coefficient of each intelligent device matched with the trigger condition, and then display the list of the intelligent devices with high matching coefficients in front of the list of the intelligent devices, so that the user can quickly select the executing intelligent device corresponding to the trigger condition.
For example, when the triggering condition is "when the temperature is greater than 28 °, the smart device executing the triggering condition is a temperature sensor, and the server may rank the identification of each temperature sensor in front of the list of smart devices.
It should be noted that, in order to ensure the security of data, the server may encrypt the preset control policy by using an asymmetric encryption algorithm and then store the encrypted control policy. And, if the user is to input the initial control strategy on terminal equipment, then terminal equipment can be earlier as presetting the control strategy when the network is relatively poor and store in the local (when terminal equipment is nearer with intelligent equipment's distance, for example, terminal equipment is at home, then terminal equipment can be through LAN according to presetting the direct control intelligent equipment of control strategy), then when the network is better, will predetermine the control strategy again and send the server to and save.
When the terminal device stores the initial control policy as a preset control policy in the server, the token and the preset control policy may be sent to the server together in order to ensure security. And after receiving the token and the preset control strategy, the server verifies the token, and if the verification is passed, the server stores the preset control strategy. If the verification fails, the terminal device is not authenticated, and the preset control strategy storage fails.
When the network of the intelligent device corresponding to the preset control strategy is poor, the server cannot timely send the preset control strategy to the intelligent device, so that the preset control strategy cannot be timely implemented.
When the network of the intelligent device is poor, in order to send the preset control policy to the intelligent device in time, in another embodiment, the method further includes:
and when the current scene condition is detected to meet the trigger condition in the preset control strategy, transmitting the execution content in the preset control strategy to the intelligent equipment corresponding to the preset control strategy. And if the transmission fails, determining target intelligent equipment with the distance from the intelligent equipment within a preset threshold value, and transmitting the execution content to the target intelligent equipment. Because the distance between the target intelligent device and the intelligent device is within the preset threshold, the target intelligent device can forward the execution content to the intelligent device in a short-distance wireless communication mode. And the intelligent device executes the received execution content again.
The short-range wireless Communication methods include, but are not limited to, bluetooth technology (Bluetooth), narrowband Internet of Things (NB-IoT), near Field Communication (NFC), zigbee technology (Zigbee), infrared peer-to-peer Communication technology (Lora), and Wi-Fi technology.
It should be understood that, when the update control policy fails to be sent, the server may also send the update control policy to the target smart device, and the target smart device forwards the update control policy to the smart device.
In this embodiment, when the network with the intelligent device of the preset control device is poor, the execution content in the preset control policy is sent to the target intelligent device whose distance from the intelligent device is within the preset threshold, and the target intelligent device forwards the execution content to the intelligent device, so that the preset control policy can be executed in time.
Since a user generally sets at least two preset control policies, if the intelligent devices corresponding to the two preset control policies are the same, the intelligent device may receive the execution content of another preset control policy when executing one of the preset control policies, but the intelligent device cannot execute the execution content of one preset control policy at this time, which results in that the control result required by the user cannot be achieved.
In order to solve the timely problem, in the embodiment of the application, before the execution content in the preset control strategy is sent to the intelligent device corresponding to the preset control strategy, the state of the intelligent device and the execution type of the preset control strategy are determined. And if the state is the non-executable state and the execution types are all executed, transmitting the execution content in the preset control strategy to the standby intelligent equipment so that the standby intelligent equipment executes the execution content, thereby achieving the control result required by the user.
For example, the first preset control policy is "start the television of the gym to play yoga video when detecting that the user is in the gym", the second preset control policy is "forward the video to the television of the gym when receiving the video sent by the preset friend", and the execution type of the second preset control policy is all execution. When the television of the gymnasium executes the execution content in the first preset control strategy and the server receives the video sent by the preset friend, the server determines the state of the television of the gymnasium and the execution type of the second preset control strategy, and at the moment, if the state of the television of the gymnasium is the non-executable state and the execution type is completely executed, the server searches the tablet computer of the standby equipment gymnasium and forwards the video in the second preset control strategy to the tablet computer of the gymnasium, so that the tablet computer can play the video.
And if the state is the non-executable state and the execution type is the non-executable state, waiting for the television of the gymnasium to play the yoga video, and then playing the video by the television of the gymnasium.
And if the state is a partial execution state and the execution type is partial execution, the executable execution content of the intelligent device is sent to the intelligent device.
For example, the first preset control policy is "start a television of the gym to play yoga video (the video has no sound)" when detecting that the user is in the gym ", the second preset control policy is" forward the video connection to the television of the gym when receiving the video connection initiated by the preset friend, "and the execution type of the second preset control policy is partial execution. When the television of the gymnasium executes the execution content in the first preset control strategy and the server receives the video connection initiated by the preset friend, the server determines the state of the television of the gymnasium and the execution type of the second preset control strategy, and at the moment, the state of the television of the gymnasium is a partial execution state and the execution type is a partial execution, the server can convert the video connection into a voice connection and send the voice connection to the television of the gymnasium. Alternatively, the server may send the video connection directly to the gym's television, which then converts the video connection to a voice connection.
After controlling the intelligent device according to the update control policy, if the user is far away from the intelligent device, the user cannot obtain an execution result of the intelligent control device executing the update control policy. In order to obtain the execution result of the smart device in a timely manner, in some other embodiments, after controlling the smart device according to the updated control policy, the method further includes:
and obtaining an execution result after the intelligent equipment executes the update control strategy, and determining the distance between the user and each terminal equipment. And sending the execution result to the terminal equipment with the shortest distance to the user for prompting so that the user can obtain the execution result.
The form of the prompt includes at least one of text, picture, audio, and video. It should be understood that the form of the prompt may be set according to the function of the terminal device. For example, when the terminal device is a smart audio, the prompt may be in the form of audio.
In this embodiment, the execution result of the intelligent device is sent to the terminal device with the shortest distance to the user for prompting, so that the user can obtain the execution result in time.
The process of determining the distance between the user and each terminal device by the server may be: the server broadcasts user distance request information to each terminal device, and after each terminal device receives the user distance request information, the distance between the user and the terminal device is determined, and the distance between the user and the terminal device is returned to the server. The server obtains the distance between the user and each terminal device.
Alternatively, after determining the distance between the user and the terminal device, the terminal device may search for the number of tickets corresponding to the distance (the higher the number of tickets is, the shorter the distance is), and return the number of tickets to the server. And after receiving the ticket number returned by each terminal device, the server sends the execution result to the terminal device with the highest ticket number for prompting.
It should be noted that the higher the number of tickets, the longer the distance. The server sends the execution result to the terminal device with the lowest ticket number for display.
Alternatively, the process of determining the distance between the user and each terminal device by the server may also be: the current position information of the user is acquired through the position sensor, then the distance between the current position information of the user and each terminal device is calculated (the position information of each terminal device is stored in the server in advance), and the server acquires the distance between the user and each terminal device.
It should be understood that, in order to improve the accuracy of the obtained current position information of the user, when the server obtains the current position information of the user through the position sensor, the server may also obtain brightness information of the position where the user is located through the brightness sensor, and obtain background sound of the environment where the user is located through the sound sensor, and then determine the current position information of the user through the position information, the brightness information, and the background sound obtained by the position sensor.
The position sensor can be an infrared position sensor, a capacitance position sensor and a key-triggered position sensor. The server may bind the location sensor to the user in advance.
In other embodiments, the current context information is user current location information; correspondingly, the method for acquiring the current scene information corresponding to the preset control strategy in real time comprises the following steps:
and acquiring a user current position point corresponding to a preset control strategy. And then constructing a preset graph by taking the current position point of the user as a center and taking the preset distance as the length. And taking the position information corresponding to the preset graph as the current position information of the user.
Or, a preset graph is constructed by taking the positioning point selected by the user as the center and then taking the preset distance as the length. And taking the position information corresponding to the preset graph as the current position information of the user.
The preset pattern may be a circle, a polygon, a rectangle, a square, etc. The number of the preset distances is set according to the preset graph. For example, when the preset pattern is a rectangle, two preset distances exist, one preset distance is used as the length of the rectangle, and the other preset distance is used as the width of the rectangle. When the preset pattern is a circle, the preset distance is one as the radius of the circle.
In other embodiments, after the intelligent device is controlled according to the updated control protocol, if the execution content of the updated control protocol is different from the execution content of the preset control protocol, and the trigger condition of the updated control protocol is the same as the trigger condition of the preset control protocol, the server may control the intelligent device according to the updated control protocol, or may control the intelligent device according to the preset control protocol, if the server detects that the current scene condition satisfies the trigger condition again.
Optionally, the smart device may save the control policy that was executed last time. Therefore, if the network state of the intelligent device is poor, the server may only send the execution instruction to the intelligent device if it detects again that the current scene condition satisfies the trigger condition, and the intelligent device executes the control policy executed last time.
In order to better implement the above method, an embodiment of the present invention further provides an apparatus control device, which may be as shown in fig. 2, and the apparatus control device includes:
the obtaining module 201 is configured to obtain current scene information corresponding to a preset control policy in real time when controlling an intelligent device corresponding to the preset control policy according to the preset control policy.
The comparing module 202 is configured to compare the current scene information with preset information in a preset control policy.
The updating module 203 is configured to, if the current scene information is inconsistent with the preset information, update the preset control policy according to the current scene information to obtain an updated control policy.
And the control module 204 is used for controlling the intelligent equipment according to the updated control strategy.
Optionally, the device control apparatus further includes:
and the receiving module is used for receiving the initial control strategy input by the user.
And the table acquisition module is used for acquiring the preset conflict table.
The checking storage module is used for checking the initial control strategy according to a preset conflict table; and if the initial control strategy does not comprise the information in the preset conflict table, storing the initial control strategy as a preset control strategy.
Optionally, the initial control policy includes execution content corresponding to the smart device, and the preset conflict table is a preset parameter mutual exclusion table.
Accordingly, the checking memory module is specifically configured to perform:
checking the execution content according to a preset parameter mutual exclusion table;
and if the execution content does not comprise the parameters in the preset parameter mutual exclusion table, storing the initial control strategy as a preset control strategy.
Optionally, the initial control policy includes a trigger condition corresponding to the intelligent device, and the preset conflict table is a preset condition conflict table.
Accordingly, the checking memory module is specifically configured to perform:
checking the trigger condition according to a preset condition conflict table;
and if the triggering condition does not include the condition in the preset condition conflict table, storing the initial control strategy as a preset control strategy.
Optionally, the device control apparatus further includes:
and the result acquisition module is used for acquiring an execution result after the intelligent equipment executes the updated control strategy.
And the distance determining module is used for determining the distance between the user and each terminal device.
And the result sending module is used for sending the execution result to the terminal equipment with the shortest distance to the user for prompting so that the user can obtain the execution result.
Optionally, the distance determining module is specifically configured to perform:
broadcasting user distance request information to each terminal device so that the terminal device determines the distance between a user and the terminal device based on the user distance request information;
receiving the distance between the user and the terminal returned by the terminal equipment;
optionally, the device control apparatus further includes:
the broadcast module is used for broadcasting user distance request information to each terminal device so that the terminal device determines the distance between the user and the terminal device based on the user distance request information and searches the ticket number corresponding to the distance;
and the ticket number receiving module is used for receiving the ticket number returned by each terminal device.
Correspondingly, the result sending module is specifically configured to perform:
and sending the execution result to the terminal equipment with the highest ticket number for prompting so that the user can obtain the execution result.
Optionally, the current scene information is current position information of the user;
accordingly, the obtaining module 201 is specifically configured to perform:
acquiring a user current position point corresponding to a preset control strategy;
constructing a preset graph by taking the current position point of the user as a center and taking a preset distance as a length;
and taking the position information corresponding to the preset graph as the current position information of the user.
Optionally, the device control apparatus further includes:
and the detection module is used for sending the execution content in the preset control strategy to the intelligent equipment corresponding to the preset control strategy when detecting that the current scene condition meets the trigger condition in the preset control strategy.
And the equipment determining module is used for determining target intelligent equipment with the distance to the intelligent equipment within a preset threshold value if the transmission fails.
And the content sending module is used for sending the execution content to the target intelligent equipment so that the target intelligent equipment forwards the execution content to the intelligent equipment.
Optionally, the device control apparatus further includes:
and the equipment determining module is used for determining the state of the intelligent equipment.
And the type determining module is used for determining the execution type of the preset control strategy.
Correspondingly, the content sending module is specifically configured to perform:
and if the state is the non-executable state and the execution types are all executed, transmitting the execution content in the preset control strategy to the standby intelligent equipment so that the standby intelligent equipment executes the execution content.
Correspondingly, the content sending module is specifically configured to perform:
and if the state is a partial execution state and the execution type is partial execution, transmitting the executable execution content of the intelligent equipment to the intelligent equipment.
In specific implementation, the above modules may be implemented as independent entities, or may be combined arbitrarily, and implemented as the same or several entities, and the specific implementation manner and the corresponding beneficial effects of the above modules may refer to the foregoing method embodiments, which are not described herein again.
An embodiment of the present invention further provides an electronic device, as shown in fig. 3, which shows a schematic structural diagram of the electronic device according to the embodiment of the present invention, specifically:
the electronic device may include components such as a processor 301 of one or more processing cores, memory 302 of one or more computer-readable storage media, a power supply 303, and an input unit 304. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 3 does not constitute a limitation of the electronic device and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 301 is the electronic device control center, connects various parts of the whole electronic device by various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing computer programs and/or modules stored in the memory 302 and calling data stored in the memory 302, thereby performing overall monitoring of the electronic device. Optionally, processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 301.
The memory 302 may be used to store computer programs and modules, and the processor 301 executes various functional applications and data processing by operating the computer programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 302 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.
The electronic device further comprises a power supply 303 for supplying power to the various components, and preferably, the power supply 303 may be logically connected to the processor 301 through a power management system, so that functions of managing charging, discharging, and power consumption are realized through the power management system. The power supply 303 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The electronic device may further include an input unit 304, and the input unit 304 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the electronic device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 301 in the electronic device loads the executable file corresponding to the process of one or more application programs into the memory 302 according to the following instructions, and the processor 301 runs the computer program stored in the memory 302, so as to implement various functions, such as:
when the intelligent equipment corresponding to the preset control strategy is controlled according to the preset control strategy, current scene information corresponding to the preset control strategy is obtained in real time;
comparing the current scene information with preset information in a preset control strategy;
if the current scene information is inconsistent with the preset information, updating a preset control strategy according to the current scene information to obtain an updated control strategy;
and controlling the intelligent equipment according to the updated control strategy.
The detailed implementation of the above operations and the corresponding advantages can be seen from the foregoing embodiments, and are not described herein again.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, where the computer program can be loaded by a processor to execute the steps in any one of the apparatus control methods provided by the embodiments of the present invention. For example, the computer program may perform the steps of:
when the intelligent equipment corresponding to the preset control strategy is controlled according to the preset control strategy, current scene information corresponding to the preset control strategy is obtained in real time;
comparing the current scene information with preset information in a preset control strategy;
if the current scene information is inconsistent with the preset information, updating a preset control strategy according to the current scene information to obtain an updated control strategy;
and controlling the intelligent equipment according to the updated control strategy.
The detailed implementation of the above operations and the corresponding advantages can be seen from the foregoing embodiments, and are not described herein again.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), random Access Memory (RAM), magnetic or optical disks, and the like.
Since the computer program stored in the computer-readable storage medium can execute the steps in any device control method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any device control method provided in the embodiments of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described again here.
According to an aspect of the application, there is provided, among other things, a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the device control method.
The above detailed description is provided for a device control method, apparatus and computer-readable storage medium according to the embodiments of the present invention, and the principle and implementation of the present invention are described herein by applying specific embodiments, and the description of the above embodiments is only used to help understanding the method and core ideas of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed, and in summary, the content of the present specification should not be construed as limiting the present invention.

Claims (14)

1. An apparatus control method characterized by comprising:
when the intelligent equipment corresponding to the preset control strategy is controlled according to the preset control strategy, current scene information corresponding to the preset control strategy is acquired in real time;
comparing the current scene information with preset information in the preset control strategy;
if the current scene information is inconsistent with the preset information, updating the preset control strategy according to the current scene information to obtain an updated control strategy;
and controlling the intelligent equipment according to the update control strategy.
2. The device control method according to claim 1, wherein before the obtaining of the current scene information corresponding to a preset control policy in real time when the smart device corresponding to the preset control policy is controlled according to the preset control policy, the method further comprises:
receiving an initial control strategy input by a user;
acquiring a preset conflict table;
checking the initial control strategy according to the preset conflict table;
and if the initial control strategy does not comprise the information in the preset conflict table, storing the initial control strategy as a preset control strategy.
3. The device control method according to claim 2, wherein the initial control policy includes execution content corresponding to the smart device, and the preset conflict table is a preset parameter mutual exclusion table;
correspondingly, the checking the initial control strategy according to the preset conflict table, and if the initial control strategy does not include the information in the preset conflict table, storing the initial control strategy as a preset control strategy, including:
checking the execution content according to the preset parameter mutual exclusion table;
and if the execution content does not comprise the parameters in the preset parameter mutual exclusion table, storing the initial control strategy as a preset control strategy.
4. The device control method according to claim 2, wherein the initial control policy includes a trigger condition corresponding to the smart device, and the preset conflict table is a preset condition conflict table;
correspondingly, the checking the initial control strategy according to the preset conflict table, and if the initial control strategy does not include the information in the preset conflict table, storing the initial control strategy as a preset control strategy, including:
checking the trigger condition according to the preset condition conflict table;
and if the triggering condition does not include the condition in the preset condition conflict table, storing the initial control strategy as a preset control strategy.
5. The device control method according to claim 1, further comprising, after said controlling the smart device according to the update control policy:
obtaining an execution result after the intelligent equipment executes the update control strategy;
determining the distance between a user and each terminal device;
and sending the execution result to the terminal equipment with the shortest distance to the user for prompting so that the user can obtain the execution result.
6. The device control method of claim 5, wherein determining distances between the user and the respective terminal devices comprises:
broadcasting user distance request information to each terminal device so that the terminal device determines the distance between a user and the terminal device based on the user distance request information;
and receiving the distance between the user and the terminal returned by the terminal equipment.
7. The device control method of claim 1, wherein after said controlling the smart device according to the updated control strategy, further comprising:
obtaining an execution result after the intelligent equipment executes the update control strategy;
broadcasting user distance request information to each terminal device, so that the terminal device determines the distance between a user and the terminal device based on the user distance request information, and searching the number of tickets corresponding to the distance;
receiving the ticket number returned by each terminal device;
and sending the execution result to the terminal equipment with the highest ticket number for prompting so that the user can obtain the execution result.
8. The device control method according to claim 1, wherein the current scene information is user current location information; correspondingly, the obtaining current scene information corresponding to the preset control strategy in real time includes:
acquiring a user current position point corresponding to the preset control strategy;
constructing a preset graph by taking the current position point of the user as a center and a preset distance as a length;
and taking the position information corresponding to the preset graph as the current position information of the user.
9. The device control method according to claim 1, wherein before the acquiring current scene information corresponding to a preset control policy in real time when the smart device corresponding to the preset control policy is controlled according to the preset control policy, the method further comprises:
when detecting that the current scene condition meets the trigger condition in the preset control strategy, sending the execution content in the preset control strategy to the intelligent equipment corresponding to the preset control strategy;
if the transmission fails, determining target intelligent equipment with the distance from the intelligent equipment within a preset threshold value;
and sending the execution content to the target intelligent device so that the target intelligent device forwards the execution content to the intelligent device.
10. The device control method according to claim 9, wherein before the sending the execution content in the preset control policy to the smart device corresponding to the preset control policy, the method further comprises:
determining a state of the smart device;
determining the execution type of the preset control strategy;
and if the state is a non-executable state and the execution type is full execution, transmitting the execution content in the preset control strategy to the standby intelligent equipment so that the standby intelligent equipment executes the execution content.
11. The device control method according to claim 10, comprising, after the determining the state of the smart device:
and if the state is a partial execution state and the execution type is partial execution, transmitting the executable execution content of the intelligent equipment to the intelligent equipment.
12. An apparatus control device, characterized by comprising:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring current scene information corresponding to a preset control strategy in real time when intelligent equipment corresponding to the preset control strategy is controlled according to the preset control strategy;
the comparison module is used for comparing the current scene information with preset information in the preset control strategy;
the updating module is used for updating the preset control strategy according to the current scene information to obtain an updated control strategy if the current scene information is inconsistent with the preset information;
and the control module is used for controlling the intelligent equipment according to the updated control strategy.
13. An electronic device, comprising a processor and a memory, the memory storing a computer program, the processor being configured to execute the computer program in the memory to perform the device control method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that it stores a computer program adapted to be loaded by a processor to execute the device control method of any one of claims 1 to 11.
CN202111137084.XA 2021-09-27 2021-09-27 Device control method, device, electronic device, and computer-readable storage medium Pending CN115877722A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111137084.XA CN115877722A (en) 2021-09-27 2021-09-27 Device control method, device, electronic device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111137084.XA CN115877722A (en) 2021-09-27 2021-09-27 Device control method, device, electronic device, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN115877722A true CN115877722A (en) 2023-03-31

Family

ID=85763025

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111137084.XA Pending CN115877722A (en) 2021-09-27 2021-09-27 Device control method, device, electronic device, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN115877722A (en)

Similar Documents

Publication Publication Date Title
US20200100162A1 (en) Systems And Methods For Managing Network Devices
KR101715538B1 (en) Method, apparatus, program, and recording medium for recommending scene mode of smart device
WO2016065812A1 (en) Scenario mode setting-based smart device control method and apparatus
WO2016065813A1 (en) Method and apparatus for customising smart device scenario mode
US20170255362A1 (en) Apparatus and method for remotely controlling peripheral devices in mobile communication terminal
CN109600285B (en) Method and device for dynamically constructing environment regulation rule list in smart home
EP3905671A1 (en) Method and device for processing request
US20160127174A1 (en) Method and server of configuring scenario mode for smart devices
CN106911650B (en) Intelligent household control method, device and system
US20190019402A1 (en) Set-top box gateway architecture for universal remote controller
WO2018227159A1 (en) Dynamic model-based access right predictions
CN112585981B (en) Method for content playback with continuity and electronic device thereof
CN114488828B (en) Control method and device of intelligent home system and intelligent home system
WO2013002034A1 (en) Server for household equipment network system
CN112702633A (en) Multimedia intelligent playing method and device, playing equipment and storage medium
CN109144971A (en) Apparatus bound method and matching system
CN113395193B (en) Equipment control method and device, computer equipment and storage medium
CN109218994B (en) Equivalent equipment Bluetooth communication method and device based on gateway
CN112083655B (en) Electronic equipment control method and related equipment
CN114221985A (en) Device control method, device, electronic device and computer-readable storage medium
US9860238B2 (en) Smart remote control system
CN115877722A (en) Device control method, device, electronic device, and computer-readable storage medium
CN113179197B (en) Household appliance resource sharing method, household appliance resource sharing device and storage device
KR101782863B1 (en) Game server for saving game data, game data storing method thereof and computer recordable medium
CN109151786B (en) Bluetooth communication method and device based on gateway scheduling connection

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