CN115032901A - Equipment control method and electronic equipment - Google Patents

Equipment control method and electronic equipment Download PDF

Info

Publication number
CN115032901A
CN115032901A CN202111582256.4A CN202111582256A CN115032901A CN 115032901 A CN115032901 A CN 115032901A CN 202111582256 A CN202111582256 A CN 202111582256A CN 115032901 A CN115032901 A CN 115032901A
Authority
CN
China
Prior art keywords
identifier
attribute
attributes
equipment
condition
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.)
Granted
Application number
CN202111582256.4A
Other languages
Chinese (zh)
Other versions
CN115032901B (en
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.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202111582256.4A priority Critical patent/CN115032901B/en
Publication of CN115032901A publication Critical patent/CN115032901A/en
Application granted granted Critical
Publication of CN115032901B publication Critical patent/CN115032901B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • 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]

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)
  • Computer And Data Communications (AREA)
  • Selective Calling Equipment (AREA)

Abstract

The embodiment of the application discloses an equipment control method and electronic equipment, relates to the field of electronic equipment, and can select a plurality of pieces of equipment meeting the requirements of a user at the same time, so that the plurality of pieces of equipment can be controlled at the same time, and the operation of the user is reduced. The specific scheme is as follows: the method comprises the steps that a first electronic device receives a screening condition of a device to be controlled, wherein the screening condition is input by a user and comprises a plurality of device attributes and a logical relationship among the device attributes; and the first electronic equipment sends the screening conditions to the second electronic equipment, so that the second electronic equipment controls the equipment meeting the screening conditions.

Description

Equipment control method and electronic equipment
Technical Field
The present disclosure relates to the field of electronic devices, and in particular, to a device control method and an electronic device.
Background
With the development of network technology and computer technology, more and more smart home devices are installed in a home environment by a user, for example, smart home devices such as a smart television, a smart air conditioner, a smart lamp, and a smart socket.
In order to facilitate management and control of all the smart home devices of the user, the server (e.g., a server) may store information of all the smart home devices under the user name. The user can access the server through the client on the electronic device to acquire information of all the intelligent home devices under the user name. The user can also send a control instruction for one of the intelligent household devices to the server through the client, and then the intelligent household device can be remotely controlled through the server.
However, when the user needs to control a plurality of smart home devices through the client, the user needs to send a control instruction for one of the smart home devices to the server one by one through the client, which causes the operation of the user to be troublesome.
Disclosure of Invention
The embodiment of the application provides an equipment control method and electronic equipment, which can simultaneously select a plurality of pieces of equipment meeting user requirements, further can simultaneously control the plurality of pieces of equipment, and reduces user operations.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical solutions:
in a first aspect, an embodiment of the present application provides an apparatus control method, which is applied to a first electronic apparatus, and the apparatus control method may include: the method comprises the steps that a first electronic device receives a screening condition of a device to be controlled, wherein the screening condition is input by a user and comprises a plurality of device attributes and a logical relationship among the device attributes; and the first electronic equipment sends the screening conditions to the second electronic equipment, so that the second electronic equipment controls the equipment meeting the screening conditions.
Based on the method of the first aspect, when a user needs to control multiple devices at the same time, a first electronic device, such as a client, may identify multiple device attributes of a device that the user wants to control and a logical relationship between the device attributes at the same time, and send the multiple device attributes of the device that the user wants to control and the logical relationship between the device attributes to a second electronic device, such as a server, so that the server can screen out multiple devices that meet the user's needs, and the server can remotely control the screened multiple devices at the same time. Therefore, according to the scheme, when the user needs to control multiple devices at the same time, the operation of the user can be reduced, and the experience of the user is improved.
With reference to the first aspect, in another possible implementation manner, before the first electronic device sends the screening condition to the second electronic device, the device control method may further include: the first electronic equipment acquires a first identifier of each equipment attribute in the screening condition and a second identifier of the logical relationship according to the first preset corresponding relationship; the first electronic equipment generates an identifier of the screening condition according to the first identifier and the second identifier; the first electronic equipment sends the screening conditions to the second electronic equipment, and the screening conditions comprise: the first electronic device sends the identification of the screening condition to the second electronic device.
Based on the possible implementation manner, the first electronic device, for example, the client may generate the identifier corresponding to the device that the user wants to control according to the identifiers corresponding to the multiple device attributes of the device that the user wants to control and the identifiers corresponding to the logical relationship between the device attributes, so that the client may send the identifier corresponding to the device that the user wants to control to the server.
With reference to the first aspect, in another possible implementation manner, the generating, by the first electronic device, the identifier of the screening condition according to the first identifier and the second identifier may include: the first electronic device carries out serialization processing on the first identifier and the second identifier according to a first preset rule to generate an identifier of the screening condition, wherein the first preset rule is used for indicating the serialization rule of the first identifier and the second identifier.
Based on the possible implementation manner, the first electronic device may perform serialization processing on the identifiers corresponding to the multiple device attributes of the device that the user wants to control and the identifiers corresponding to the logical relationship between the device attributes, so as to generate the identifier corresponding to the device that the user wants to control, and thus the client may send the identifier corresponding to the device that the user wants to control to the server.
With reference to the first aspect, in another possible implementation manner, the device attribute includes one or more of the following attributes: device type, presence status, and link type.
Based on the possible implementation, the device that the user wants to control can be accurately determined through the device attributes including the device type, the online status, and the link type.
With reference to the first aspect, in another possible implementation manner, when the device attribute is a device type, the first identifier includes: the device type identification and the device sub-attribute identification included by the device type; the device type comprises device sub-attributes including a mobile phone or a tablet computer; in the case that the device attribute is in the online state, the first identifier includes: the identifier of the online state and the identifier of the device sub-attribute included in the online state; the device sub-attribute included in the presence status includes the presence device; in the case where the device attribute is a link type, the first identification includes: the link type identification and the link type identification of the included device sub-attribute; the device sub-attribute included in the link type includes near field communication.
Based on the possible implementation manner, the first electronic device may obtain identifiers corresponding to multiple device attributes of the device that the user wants to control, so that the identifiers corresponding to the multiple device attributes may be utilized to generate the identifiers corresponding to the device that the user wants to control, and the client may send the identifiers corresponding to the device that the user wants to control to the server.
In a second aspect, an embodiment of the present application provides an apparatus control method, which is applied to a second electronic apparatus, and the apparatus control method may include: the second electronic equipment receives the screening conditions sent by the first electronic equipment; the screening condition comprises a plurality of equipment attributes and a logical relationship among the equipment attributes; and the second electronic equipment determines and controls the equipment meeting the screening conditions according to the screening conditions.
Based on the method in the second aspect, a second electronic device, for example, a server, may determine multiple devices that a user wants to control according to multiple device attributes of the device that the user wants to control and a logical relationship between the device attributes, which are sent by a first electronic device (for example, a client), so that the server can remotely control the screened multiple devices at the same time. Therefore, according to the scheme, when the user needs to control a plurality of devices at the same time, the operation of the user can be reduced, and the experience of the user is improved.
With reference to the second aspect, in another possible implementation manner, the receiving, by the second electronic device, the filtering condition sent by the first electronic device may include: the second electronic equipment receives the identification of the screening condition sent by the first electronic equipment; the determining, by the second electronic device, the device meeting the screening condition according to the screening condition may include: the second electronic equipment determines a first identifier of each equipment attribute and a second identifier of a logical relationship between each equipment attribute, wherein the first identifier is included in the screening condition, according to the identifier of the screening condition; the second electronic equipment determines the equipment attributes and the logic relationship among the equipment attributes according to the second preset corresponding relationship, the first identifier and the second identifier; and the second electronic equipment determines the equipment meeting the screening conditions according to the equipment attributes, the logical relationship among the equipment attributes and the equipment information stored in the second electronic equipment, wherein the equipment attributes and the logical relationship are included in the screening conditions.
Based on the possible implementation manner, the second electronic device, for example, the server may determine, according to the identifier of the screening condition sent by the first electronic device (for example, the client), a plurality of device attributes of the device that the user wants to control and a logical relationship between the device attributes, so that a plurality of devices that the user wants to control can be determined.
With reference to the second aspect, in another possible implementation manner, the determining, by the second electronic device, the first identifier of each device attribute included in the filtering condition and the second identifier of the logical relationship between the device attributes according to the identifier of the filtering condition may include: and the second electronic equipment performs deserialization processing on the identifier of the screening condition according to a second preset rule to determine the first identifier of each equipment attribute and the second identifier of the logical relationship among the equipment attributes, wherein the first identifier of each equipment attribute is included in the screening condition, and the second preset rule is used for indicating a rule for deserializing the identifier of the screening condition.
Based on the possible implementation manner, the second electronic device, for example, the server may perform deserialization on the identifiers of the screening conditions, so as to obtain identifiers corresponding to the multiple device attributes of the device that the user wants to control and identifiers corresponding to the logical relationship between the device attributes, and thus, the multiple device attributes of the device that the user wants to control and the logical relationship between the device attributes can be determined.
With reference to the second aspect, in another possible implementation manner, the device attribute includes one or more of the following attributes: device type, presence status, and link type.
Based on the possible implementation, the device that the user wants to control can be accurately determined through the device attributes including the device type, the online status, and the link type.
With reference to the second aspect, in another possible implementation manner, when the device attribute is a device type, the first identifier includes: the device type identification and the device sub-attribute identification included by the device type; the device type comprises device sub-attributes including a mobile phone or a tablet computer; in the case that the device attribute is in the online state, the first identifier includes: the identifier of the online state and the identifier of the device sub-attribute included in the online state; the device sub-attributes included in the presence status include presence devices; in the case where the device attribute is a link type, the first identification includes: the link type identification and the link type identification of the included device sub-attribute; the device sub-attribute included in the link type includes near field communication.
Based on the possible implementation manner, a first electronic device, such as a client, may obtain identifiers corresponding to multiple device attributes of a device that a user wants to control, so that an identifier corresponding to the device that the user wants to control may be generated by using the identifiers corresponding to the multiple device attributes, and thus the client may send the identifier corresponding to the device that the user wants to control to a server.
In a third aspect, an embodiment of the present application provides an apparatus control device, which may be applied to a first electronic apparatus, for implementing the method in the first aspect. The functions of the device control apparatus can be realized by hardware, and can also be realized by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, for example, a receiving module and a transmitting module, etc.
The receiving module may be configured to receive a filtering condition of a device that is input by a user and is desired to be controlled, where the filtering condition includes a plurality of device attributes and a logical relationship between the device attributes.
The sending module may be configured to send the screening condition to the second electronic device, so that the second electronic device controls the device that meets the screening condition.
With reference to the third aspect, in another possible implementation manner, the device control apparatus may further include an obtaining module and a generating module. The obtaining module may be configured to obtain, according to the first preset corresponding relationship, a first identifier of each device attribute in the screening condition and a second identifier of the logical relationship. And the generating module can be used for generating the identifier of the screening condition according to the first identifier and the second identifier. The sending module may be configured to send the identifier of the screening condition to the second electronic device.
With reference to the third aspect, in another possible implementation manner, the generating module may be further configured to perform serialization processing on the first identifier and the second identifier according to a first preset rule to generate an identifier of the screening condition, where the first preset rule is used to indicate a serialization rule of the first identifier and the second identifier.
With reference to the third aspect, in another possible implementation manner, the device attribute includes one or more of the following attributes: device type, presence status, and link type.
With reference to the third aspect, in another possible implementation manner, when the device attribute is a device type, the first identifier includes: the device type identification and the device sub-attribute identification included by the device type; the device type comprises device sub-attributes including a mobile phone or a tablet computer;
in the case that the device attribute is in the online state, the first identifier includes: the identifier of the online state and the identifier of the device sub-attribute included in the online state; the device sub-attributes included in the presence status include presence devices;
in the case where the device attribute is a link type, the first identification includes: an identifier of the link type and an identifier of a device sub-attribute included in the link type; the device sub-attribute included in the link type includes near field communication.
In a fourth aspect, an embodiment of the present application provides an apparatus control device, which can be applied to a second electronic apparatus, for implementing the method in the second aspect. The functions of the device control apparatus can be realized by hardware, and can also be realized by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, for example, a receiving module, a determining module, a controlling module, and the like.
The receiving module may be configured to receive the filtering condition sent by the first electronic device; the screening condition includes a plurality of device attributes and a logical relationship between the device attributes.
And the determining module can be used for determining the equipment meeting the screening conditions according to the screening conditions.
And the control module can be used for controlling the equipment meeting the screening condition.
With reference to the fourth aspect, in another possible implementation manner, the receiving module may be configured to receive, by the device, an identifier of the screening condition sent by the first electronic device.
The determining module may be further configured to determine, according to the identifier of the filtering condition, a first identifier of each device attribute included in the filtering condition and a second identifier of a logical relationship between the device attributes.
The determining module may be further configured to determine, according to the second preset corresponding relationship, the first identifier, and the second identifier, the device attributes included in the screening condition and the logical relationship between the device attributes.
The determining module may be further configured to determine, according to the device attributes included in the screening condition, the logical relationship among the device attributes, and the device information stored in the second electronic device, a device that meets the screening condition.
With reference to the fourth aspect, in another possible implementation manner, the determining module may be further configured to perform deserialization processing on the identifier of the screening condition according to a second preset rule, so as to determine the first identifier of each device attribute and the second identifier of the logical relationship between the device attributes that are included in the screening condition, where the second preset rule is used to indicate a rule for deserializing the identifier of the screening condition.
With reference to the fourth aspect, in another possible implementation manner, the device attribute includes one or more of the following attributes: device type, presence status, and link type.
With reference to the fourth aspect, in another possible implementation manner, in a case that the device attribute is a device type, the first identifier includes: the device type identification and the device sub-attribute identification included by the device type; the device type comprises device sub-attributes including a mobile phone or a tablet computer;
in the case that the device attribute is in the online state, the first identifier includes: the identifier of the online state and the identifier of the device sub-attribute included in the online state; the device sub-attributes included in the presence status include presence devices;
in the case where the device attribute is a link type, the first identification includes: an identifier of the link type and an identifier of a device sub-attribute included in the link type; the link type includes a device sub-attribute that is included as near field communication.
In a fifth aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory for storing instructions executable by the processor. The processor is configured to execute the above instructions to cause the electronic device to implement the device control method according to the first aspect or any one of the possible implementation manners of the first aspect; or, the processor is configured to execute the above instructions, so that the electronic device implements the device control method according to the second aspect or any one of the possible implementation manners of the second aspect.
In a sixth aspect, embodiments of the present application provide a computer-readable storage medium having computer program instructions stored thereon. The computer program instructions, when executed by the electronic device, cause the electronic device to implement a device control method as described in the first aspect or any one of its possible implementations; alternatively, the computer program instructions, when executed by the electronic device, cause the electronic device to implement the device control method as described in the second aspect or any of its possible implementations.
In a seventh aspect, an embodiment of the present application provides a computer program product, which includes computer readable code, when the computer readable code is run in an electronic device, causing the electronic device to implement the device control method according to the first aspect or any one of the possible implementation manners of the first aspect; alternatively, the computer readable code, when run in an electronic device, causes the electronic device to implement the device control method of the second aspect or any of its possible implementations.
It should be understood that, the beneficial effects of the third to seventh aspects may be referred to the description of the first or second aspect, and are not repeated herein.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of an apparatus middleware provided in an embodiment of the present application;
fig. 3 is a first flowchart illustrating an apparatus control method according to an embodiment of the present disclosure;
fig. 4 is a second flowchart illustrating an apparatus control method according to an embodiment of the present application;
FIG. 5 is a first schematic diagram of predicate parsing provided in an embodiment of the present application;
FIG. 6 is a second schematic diagram of predicate parsing provided in an embodiment of the present application;
FIG. 7 is a third schematic diagram of predicate parsing provided by an embodiment of the present application;
FIG. 8 is a fourth schematic diagram of predicate parsing provided by an embodiment of the present application;
FIG. 9 is a fifth schematic diagram of predicate parsing provided by an embodiment of the present application;
FIG. 10 is a sixth schematic diagram of predicate parsing provided by an embodiment of the present application;
FIG. 11 is a seventh schematic diagram of predicate parsing provided in an embodiment of the present application;
fig. 12 is a first schematic structural diagram of an apparatus control device according to an embodiment of the present disclosure;
fig. 13 is a schematic structural diagram of a device control apparatus according to an embodiment of the present application.
Detailed Description
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 a part of the embodiments of the present application, 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 application.
The terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present application, "a plurality" means two or more unless otherwise specified.
At present, more and more intelligent household devices, such as intelligent televisions, intelligent air conditioners, intelligent lamps, intelligent sockets and the like, are installed in a household environment by a user. Under the background that the number of smart home devices of users is gradually increased, how to perform centralized management and control on the smart home devices is very important.
The generation of the device management middleware provides a platform for centralized management and control of the intelligent household devices. The user can obtain the information of all the intelligent home devices under the user name through the device management middleware, and the user can also send control instructions to the intelligent home devices through the device management middleware, so that the purpose of remotely controlling the intelligent home is achieved.
The device management middleware may include a client and a server. The server (e.g., server) may store information of all smart home devices under the user name. And then, the user can access the server through the client on the electronic equipment to acquire information of all the intelligent household equipment under the user name. The user can also send a control instruction for one of the smart home devices (i.e., the device meeting the user's requirements) to the server through the client. After the server receives the control instruction sent by the client, the server can screen the intelligent household equipment meeting the user requirements from all the intelligent household equipment, and therefore the intelligent household equipment can be remotely controlled through the server.
For example, the user may input a control instruction for the near field device through the client, that is, the user needs to control the near field device. The client may send the control instruction of the near field device input by the user to the server. After the server receives a control instruction for the near field equipment sent by the client, the server can screen out the intelligent home equipment meeting the user requirement, namely the near field equipment, from all the intelligent home equipment, so that the near field equipment can be remotely controlled through the server.
For another example, the user may input a control instruction for the smart television through the client, that is, the user needs to control the smart television, for example, adjust the sound of the smart television. The client can send the control instruction of the intelligent television set input by the user to the server. After the server receives a control instruction for the intelligent television sent by the client, the server can screen the intelligent household equipment meeting the user requirements, namely the intelligent television, from all the intelligent household equipment, so that the intelligent television can be remotely controlled through the server.
However, when a user needs to control a plurality of smart home devices through a client, the user needs to send a control instruction for one of the smart home devices to a server one by one through the client. The client can not identify a plurality of intelligent household devices meeting the user requirements at the same time, and therefore the server can not screen the plurality of intelligent household devices meeting the user requirements at the same time, and then the server can not remotely control the plurality of intelligent household devices which are screened out at the same time.
For example, when the user needs to control the smart television and the smart air conditioner through the client, for example, after the user leaves home, the smart television and the smart air conditioner may be controlled to be turned off through the client. The user needs to input control instructions for the intelligent television and the intelligent air conditioner through the client side respectively. For example, a user may input a control instruction for the smart television through the client, that is, the user needs to turn off the smart television. And the client sends a control instruction for closing the intelligent television set, which is input by the user, to the server. After the server receives a control instruction for the intelligent television sent by the client, the server can screen the intelligent television from all the intelligent household devices and remotely close the intelligent television.
Then, the user can input a control instruction for the intelligent air conditioner through the client, that is, the user needs to turn off the control instruction of the intelligent air conditioner. And the client sends a control instruction for closing the intelligent air conditioner, which is input by the user, to the server. After the server receives a control instruction for the intelligent air conditioner sent by the client, the server can screen the intelligent air conditioner from all the intelligent household equipment and remotely close the intelligent air conditioner.
Therefore, when a user needs to control a plurality of smart home devices through a client, the user needs to send a control instruction to one of the smart home devices to a server one by one through the client, which causes the operation of the user to be troublesome and the experience of the user to be poor.
In view of the above problems, an embodiment of the present application provides an apparatus control method, which is applied to an electronic apparatus, such as an electronic apparatus corresponding to a client, where when a user needs to control multiple apparatuses simultaneously, the client can identify a screening condition that meets a user requirement, construct a predicate corresponding to the user requirement, and send the constructed predicate to a server. Therefore, the server side can screen out a plurality of devices meeting the user requirements simultaneously according to predicates sent by the client side, and then the server side can remotely control the screened devices simultaneously. Therefore, according to the scheme, when the user needs to control multiple devices at the same time, the operation of the user can be reduced, and the experience of the user is improved.
The following describes an apparatus control method provided in an embodiment of the present application.
The device control method provided by the embodiment of the application can be applied to electronic devices, such as an electronic device corresponding to the client (hereinafter, referred to as a client) and an electronic device corresponding to the server (hereinafter, referred to as a server). The client refers to a program corresponding to the server and capable of providing local services for the user.
In some examples, the electronic device corresponding to the client may be a laptop, a tablet, a handheld computer, a PC, a Personal Digital Assistant (PDA), a wearable device, or other electronic devices. The embodiment of the present application does not limit the specific form of the electronic device corresponding to the client. The electronic device corresponding to the server side can be a server, and the server can store information of all the intelligent home devices under the user name.
The electronic device corresponding to the client and the electronic device corresponding to the server may be the same electronic device or different electronic devices. In the embodiment of the application, the electronic device corresponding to the client and the electronic device corresponding to the server may be different electronic devices, that is, the electronic device corresponding to the client may be referred to as a first electronic device, and the electronic device corresponding to the server may be referred to as a second electronic device.
The first electronic device and the second electronic device may have the same structure or different structures, and in the embodiments of the present application, the first electronic device and the second electronic device have the same structure as an example and are schematically described.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 1, the electronic device 100 may include: at least one processor 101, a communication link 102, a memory 103, and a communication interface 104.
Among other things, the processor 101 may perform various functions of the electronic device 100 by running or executing software programs stored in the memory 103, as well as invoking data stored in the memory 103.
In particular implementations, electronic device 100 may include one processor or may include multiple processors, as one embodiment. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
The Memory 103 may be a Read-Only Memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical disk storage, optical disk storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to these. The memory 103 may be separate and coupled to the processor 101 via a communication link 102. The memory 103 may also be integrated with the processor 101.
The memory 103 is used for storing software programs for executing the scheme of the application, and is controlled by the processor 101 to execute.
The communication interface 104, which may be any device using any transceiver or the like, is used to communicate with other devices or communication networks.
The communication line 102 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one line is shown in FIG. 1, but that does not indicate only one bus or type of bus.
It will be appreciated that, in general, the implementation of electronic device functions requires the cooperation of software in addition to hardware support.
For example, in some examples of the application, as shown in fig. 2, when the client identifies a screening Condition meeting a user requirement, and constructs a predicate corresponding to the user requirement, and sends the constructed predicate to the server, the client at least needs support of hardware such as a processor and a memory, and further needs to use cooperation of software such as a Condition screening module (i.e., Condition), a predicate Builder (i.e., Builder), an interface (e.g., Selectable interface), and a predicate construction capability Center (i.e., Center). As shown in fig. 2, when the server is capable of screening out the multiple devices at the same time, the server at least needs support of hardware such as a processor and a memory, and needs to use cooperation of software such as a predicate Parser (i.e., Parser), an interface (e.g., a Selectable interface), and a predicate construction capability center.
The client side comprises a condition screening module which can be used for receiving requirement information input by a user, identifying the requirement information input by the user and determining screening conditions meeting the requirement of the user, wherein the screening conditions can comprise a plurality of conditions and a logical relation among the conditions. The condition for satisfying the user requirement can be the device attribute and the device sub-attribute for satisfying the user requirement. A logical relationship between a plurality of conditions, such as an and or relationship between a plurality of conditions.
The predicate builder included in the client can be used for building predicates corresponding to user requirements according to the multiple conditions and the logical relations among the multiple conditions determined by the condition screening module included in the client, and the serialization codes and the marking codes generated by the Selectable interface included in the client. Predicates, i.e., terms that are used to replace or reveal the nature of their objects, characteristics, or relationships between objects. That is to say, the predicate constructed by the predicate builder included in the client may represent codes of devices capable of being required by the user, for codes corresponding to a plurality of conditions input by the user and a logical relationship between the conditions.
The predicate builder included in the client can also be used for sending the built predicate to a predicate resolver of the server, so that the predicate resolver of the server can parse the received predicate to obtain a plurality of conditions input by the user and a logical relationship among the plurality of conditions, and the server can screen a plurality of devices meeting the user requirements according to the logical relationship among the plurality of conditions input by the user and the logical relationship among the plurality of conditions.
The selected interface included in the client may be configured to serialize the sub-attributes included in the device attribute, generate a corresponding serialization code, and generate a mark code of the device attribute. The selected interface included in the client may also be configured to store the generated serialization codes corresponding to the device sub-attributes, the mark codes corresponding to the device attributes, the correspondence between the serialization codes corresponding to the device sub-attributes and the device sub-attributes, and the correspondence between the mark codes corresponding to the device attributes and the device attributes to a predicate construction capability center included in the client.
The predicate construction capability center included in the client is used for storing the serialization codes, the marking codes, the corresponding relations between the serialization codes and the equipment sub-attributes and the corresponding relations between the marking codes and the equipment attributes generated by the selected interface included in the client, and sending the serialization codes, the marking codes, the corresponding relations between the serialization codes and the equipment sub-attributes and the corresponding relations between the marking codes and the equipment attributes generated by the selected interface included in the client to the predicate construction capability center of the server.
The predicate analyzer of the server can be used for receiving predicates sent by the predicate builder included in the client, and analyzing the received predicates by combining the Selectable interface included in the server and the predicate building capability center of the server included in the server, so that a plurality of conditions input by a user and a logical relationship among the conditions are obtained, and the server can screen out a plurality of devices meeting the user requirements.
The selected interface of the server may be used to perform deserialization on the serialized codes included in the predicates received by the predicate parser of the server, so as to obtain the device sub-attributes corresponding to the serialized codes.
The predicate construction capability center of the server side can be used for receiving and storing the serialized codes, the marker codes, the corresponding relations between the serialized codes and the equipment sub-attributes and the corresponding relations between the marker codes and the equipment attributes, which are sent by the predicate construction capability center included in the client side.
For example, referring to fig. 2, the client determines a plurality of conditions input by the user and a plurality of logical relationships between the conditions, and according to the plurality of conditions input by the user and the plurality of logical relationships between the conditions, the process of constructing the predicate may include the following steps:
when a user needs to control a plurality of devices simultaneously, the user can input the requirement information of the user on the client.
After a user inputs requirement information of the user on a client, a condition screening module included in the client can receive the requirement information input by the user. After receiving the requirement information input by the user, the condition screening module included in the client can identify the requirement information input by the user and determine a plurality of conditions input by the user and a logical relationship among the conditions.
After the condition screening module included in the client determines the plurality of conditions input by the user and the logical relationship between the plurality of conditions, the condition screening module included in the client may send the plurality of conditions input by the user and the logical relationship between the plurality of conditions determined to be input by the user to the predicate builder included in the client.
After a predicate builder included in a client receives a plurality of conditions input by a user and a logical relationship between the conditions, which are sent by a condition screening module included in the client, the predicate builder included in the client can obtain a serialization code of a device sub-attribute corresponding to each condition and a mark code of a device attribute corresponding to each condition from a predicate building capability center included in the client through a Selectable interface included in the client.
Before a predicate builder included in a client obtains a serialization code of a device sub-attribute corresponding to each condition and a mark code of the device attribute corresponding to each condition from a predicate building capability center included in the client through a selective interface included in the client, the selective interface included in the client can serialize all the device sub-attributes to generate corresponding serialization codes and generate mark codes corresponding to all the device attributes. After the selected interface included in the client generates the serialization codes corresponding to all the device sub-attributes and the marking codes corresponding to all the device attributes, the selected interface included in the client stores the generated serialization codes corresponding to the device sub-attributes, the marking codes corresponding to the device attributes, the correspondence between the serialization codes corresponding to the device sub-attributes and the device sub-attributes, and the correspondence between the marking codes corresponding to the device attributes and the device attributes to a predicate construction capability center included in the client.
After a predicate builder included in a client acquires a serialization code of a device sub-attribute corresponding to each condition and a mark code of the device attribute corresponding to each condition, a predicate meeting user requirements is built by combining codes corresponding to logical relations among a plurality of conditions, namely, codes corresponding to the logical relations among the plurality of conditions and the plurality of conditions input by a user are built.
After a predicate builder included in the client builds a predicate, the built predicate may be sent to a parser of the client.
For another example, as shown in fig. 2, after the server receives the predicate sent by the client, the server may analyze the received predicate, so as to obtain multiple conditions input by the user and a logical relationship between the multiple conditions, that is, multiple devices meeting the user requirement, where a process of analyzing the predicate may include the following steps:
after the resolver of the service end receives the predicate sent by the predicate builder of the client end, the serialization codes and the mark codes included in the predicate can be resolved.
After the parser of the server parses the serialized codes corresponding to the device sub-attributes and the mark codes corresponding to the device attributes, which are included in the predicate, the serialized codes corresponding to the device sub-attributes, the mark codes corresponding to the device attributes, the corresponding relationship between the serialized codes corresponding to the device sub-attributes and the device sub-attributes, and the corresponding relationship between the mark codes corresponding to the device attributes and the device attributes, which are stored in the capability center, can be constructed through the predicate of the server, and the logical relationships among a plurality of conditions and a plurality of conditions input by a user can be determined.
After the resolver at the server resolves a plurality of conditions input by the user and a plurality of logical relationships between the conditions, the resolver at the server may screen out a device satisfying the user requirement from a plurality of devices stored at the server.
Before the parser of the service end determines a plurality of conditions input by a user and a logic relationship among the plurality of conditions according to a serialized code corresponding to the device sub-attribute, a mark code corresponding to the device attribute, a correspondence between the serialized code corresponding to the device sub-attribute and the device sub-attribute, and a correspondence between the mark code corresponding to the device attribute and the device attribute, which are stored by the predicate construction capability center of the service end, the service end comprises a predicate construction capability center which can receive and store the serialized code corresponding to the device sub-attribute, the mark code corresponding to the device attribute, the correspondence between the serialized code corresponding to the device sub-attribute and the device sub-attribute, and the correspondence between the mark code corresponding to the device attribute and the device attribute, which are sent by the predicate construction capability center of the client end.
The following describes in detail the apparatus control method provided in the embodiment of the present application with reference to fig. 2. In this embodiment, the method may include: a predicate construction process and a predicate analysis process.
As shown in FIG. 3, the "predicate construction" flow may include the following S301-S305.
S301, the client receives the requirement information input by the user.
When a user needs to control a device (such as a smart home device) through a client (which may also be referred to as a first electronic device), the user may input requirement information of the user on the client.
The requirement information of the user may be the filtering condition of the device which the user inputs to control. That is, the filtering condition may include a plurality of conditions satisfying the user's demand and a logical relationship between the plurality of conditions. The condition for satisfying the user requirement may be a device sub-attribute included in the device attribute satisfying the user requirement. That is, the filtering condition may include a plurality of device attributes and a logical relationship between the device attributes.
The requirement information input by the user may be requirement information of the user for one device, or requirement information of a plurality of devices. This is not limited in the examples of the present application. In the embodiment of the present application, the requirement information input by the user includes requirement information of multiple devices, which is schematically described, that is, the user needs to control the multiple devices through the client at the same time, and the user inputs information of the multiple devices that need to be controlled on the client.
The requirement information input by the user may include device attributes. The device attributes, i.e. the specification, model, technical parameters, etc. of the device can be distinguished from other devices. The device attributes may include the type of device (i.e., DeviceProductType), the online status of the device (i.e., OlinStatus), and the link type of the device (i.e., LinkType), among others. Each device attribute may include a plurality of sub-attributes. The device sub-attributes are characteristics of the device, such as specific specification, specific model, specific technical parameters and the like.
For example, when the device attribute is a type of device, the type of device may include a plurality of device sub-attributes, such as a television, a tablet, an air conditioner, a mobile phone, and the like.
The presence of the device may indicate whether the device has access to the wireless network. When the device attribute is the online status of the device, the online status of the device may also include a plurality of device sub-attributes, such as online or offline.
The link type of the device may indicate a communication manner that the device can perform. When the device attribute is a link type of the device, a device sub-attribute included in the link type of the device may be near field communication.
For example, when the user wants to obtain a near-field and online television or tablet, the requirement information input by the user at the client may be the near-field and online television or tablet, that is, the requirement information input by the user includes a device attribute of a device (corresponding to a device sub-attribute, the television or the tablet), an online status of the device (corresponding to a sub-attribute, the device is online), and a link type of the device (corresponding to a sub-attribute, the near-field communication).
For example, as shown in fig. 2, the client receives the requirement information input by the user, and the condition filtering module included in the client receives the requirement information input by the user.
After the client receives the requirement information (i.e., the screening condition of the device that the user inputs and wants to control) input by the user, the client may send the screening condition to the server (also referred to as a second electronic device), so that the server may determine the device that meets the screening condition through the screening condition, and then the server may control the device that meets the screening condition.
In some examples, the client sends the filter conditions to the server, which may include S302-S305 described below.
S302, the client determines a plurality of conditions meeting the user requirements and relations among the conditions according to the requirement information input by the user.
After the client receives the information of the equipment input by the user, the client determines a plurality of conditions meeting the requirements of the user and the relationship among the conditions according to the requirement information input by the user. The condition satisfying the user requirement may be a device sub-attribute included in the device attribute satisfying the user requirement. I.e. one condition corresponds to one device sub-attribute.
In some examples, the client may determine, according to the requirement information input by the user, a device attribute included in the requirement information input by the user, and then, the client may determine, according to the device attribute, a device sub-attribute corresponding to each device attribute included in the requirement information input by the user. A device attribute may be referred to as a condition from which a device or class of devices may be determined.
After the client determines a plurality of conditions meeting the user requirements according to the requirement information input by the user, the client may determine the relationship between the plurality of conditions. The relationship between the plurality of conditions may be a logical relationship between the plurality of conditions, that is, an and-or relationship between the plurality of conditions.
For example, when the demand information received by the client is a near-field and online television or tablet computer, the client may determine that the device attribute included in the demand information input by the user is a device type, a device online state, and a device link type. After the client determines the device attributes included in the information input by the user, the sub-attributes included in each device attribute can be determined according to the requirement information input by the user, namely the sub-attributes included in the type of the device are a television and a tablet computer, the sub-attributes included in the online state of the device are online, and the sub-attributes included in the link type of the device are near field communication.
That is, the client may determine four conditions, i.e., condition a is a near-field device, condition B is an online device, condition C is a television device, and condition D is a tablet device, according to the requirement information input by the user.
After the client determines a plurality of conditions, the client may determine the relationship between each condition according to the information input by the user as a near-field and online television or tablet. Since the information input by the user includes a near field and is online, that is, the condition a and the condition B are in an and relationship, and the information input by the user includes a television or a tablet computer, that is, the condition C and the condition D are in an or relationship. The information input by the user includes a near-field and online television or tablet computer, that is, the relationship between the condition a and the condition C or the condition D is an and relationship, and the relationship between the condition B and the condition C or the condition D is an and relationship. That is, the requirement information input by the client user, the determined conditions, and the logical expression of the relationship between the conditions may be: a ^ B ^ N (C ^ D) is used.
For example, referring to fig. 2, the client determines a plurality of conditions that satisfy the user requirement and a relationship between the plurality of conditions according to the requirement information input by the user, and the condition screening module included in the client may determine a plurality of conditions that satisfy the user requirement and a relationship between the plurality of conditions according to the requirement information input by the user.
S303, the client determines the corresponding identification of each condition and the corresponding identification of the relationship among a plurality of conditions.
After the client determines a plurality of conditions meeting the user requirements and a relationship between the plurality of conditions according to the requirement information input by the user, the client may obtain an identifier (may be referred to as a first identifier in this embodiment) determining each device attribute and an identifier (may be referred to as a second identifier in this embodiment) determining a relationship between the device attributes according to the first preset corresponding relationship. The first preset correspondence may include a correspondence between an identifier of the device attribute and the device attribute, and a correspondence between a logical relationship between the plurality of device attributes and an identifier of the logical relationship.
The first identifier may include an identifier of a device attribute and an identifier of a device sub-attribute included in the device attribute. For example, in the case where the device attribute is a device type, the first identification may include: an identification of the device type and an identification of device sub-attributes comprised by the device type. The device type may include device sub-attributes including a cell phone or a tablet. In the case that the device attribute is in the online state, the first identifier may include: an identification of the presence status and an identification of a device sub-attribute comprised by the presence status. The device sub-attributes included in the presence status include presence devices. In the case where the device attribute is a link type, the first identification may include: an identification of the link type and an identification of a device sub-attribute that the link type includes. The link type includes a device sub-attribute including near field communication.
In some examples, the first identifier may also be an identifier that includes a device sub-attribute for the device attribute, that is, the first identifier may be an identifier corresponding to a condition, and may also be referred to as a predicate corresponding to the condition, that is, a code corresponding to the condition. The identifier corresponding to the condition may include an identifier of the device attribute and an identifier of a device sub-attribute included in the device attribute. For example, the identifier corresponding to the condition may include a length of the identifier corresponding to the condition, a tag code of the device attribute corresponding to the device sub-attribute (which may also be referred to as an identifier corresponding to the device attribute), and a serialization code corresponding to the device sub-attribute (which may also be referred to as an identifier corresponding to the device sub-attribute).
The predicates corresponding to the conditions may include the length of a code corresponding to the device sub-attribute, a tag code of the device attribute corresponding to the device sub-attribute (which may also be referred to as an identifier corresponding to the device attribute), and a serialized code corresponding to the device sub-attribute (which may also be referred to as an identifier corresponding to the device sub-attribute). The length of the code corresponding to the device sub-attribute, i.e. the sum of the length of the mark code of the device attribute corresponding to the device sub-attribute and the length of the serialized code corresponding to the device sub-attribute.
In some examples, the client determining the code corresponding to each condition may include that the client obtains, from the tag codes of the device attributes stored by the client, the tag codes of the device attributes (which may also be referred to as a first condition, that is, the first condition is any one of a plurality of conditions) corresponding to the condition (which may also be referred to as a first device attribute), and obtains, from the serialization codes of the device sub-attributes stored by the client, the serialization codes corresponding to the device sub-attributes (which may also be referred to as a first device sub-attribute) corresponding to the condition. And then, the client determines the length of the code corresponding to the sub-attribute according to the mark code of the equipment attribute corresponding to the equipment sub-attribute and the serialized code corresponding to the equipment sub-attribute. And then, the client determines the code corresponding to the condition according to the length of the code corresponding to the equipment sub-attribute, the mark code of the equipment attribute corresponding to the equipment sub-attribute and the serialized code corresponding to the equipment sub-attribute.
The mark code of the device attribute stored by the client may be a mark code of each device attribute generated through a Selectable interface of the client. After the client generates the mark code of each device attribute through the Selectable interface, the generated mark code of the device attribute and the corresponding relationship between the mark code and the device attribute can be stored in a predicate construction capability center of the client.
For example, the tag code of the device attribute generated by the client through the Selectable interface, that is, the tag code of the type of the device, may be 0001. The mark code of the device attribute, that is, the mark code of the online status of the device, generated by the client through the Selectable interface may be 0002. The mark code of the device attribute generated by the client through the Selectable interface, that is, the mark code of the link type of the device, may be 0003.
After the predicate construction capability center of the client stores the tag code of the device attribute and the corresponding relationship between the tag code and the device attribute, the tag code of the device attribute and the corresponding relationship between the tag code and the device attribute can be sent to the predicate construction capability center of the server.
In some examples, the serialization code corresponding to the device sub-attribute stored by the client may be a serialization code corresponding to each device sub-attribute generated through a Selectable interface of the client. After the client generates the serialization codes corresponding to each device sub-attribute through the Selectable interface, the serialization codes corresponding to the generated device sub-attributes and the corresponding relations between the serialization codes and the device sub-attributes can be stored in a predicate construction capability center of the client.
For example, the device sub-attribute generated by the client through the Selectable interface, that is, the serialization code corresponding to the television set, may be 0001. The device sub-attribute generated by the client through the selecttable interface, that is, the serialization code corresponding to the tablet computer may be 0002. The device sub-attribute generated by the client through the selecttable interface, that is, the serialization code corresponding to the online device, may be 0001. The device sub-attribute generated by the client through the Selectable interface, that is, the serialization code corresponding to the near field communication may be 0001.
After the predicate construction capability center of the client stores the serialization codes corresponding to the device sub-attributes and the corresponding relationships between the serialization codes and the device sub-attributes, the serialization codes corresponding to the device sub-attributes and the corresponding relationships between the serialization codes and the device sub-attributes can be sent to the predicate construction capability center of the server.
For example, the client determines the conditions according to the requirement information input by the user, i.e., the condition a is a near-field device, the condition B is an online device, the condition C is a television device, and the condition D is a tablet device. For condition a, the corresponding device attribute is a link of the device, and the device sub-attribute corresponding to condition a is a near field device. The client may obtain that the mark code of the device attribute corresponding to the condition a is 0003 from the mark codes corresponding to the stored device attributes, and the length of the mark code is 4. The client may obtain, from the stored serialization codes corresponding to the device sub-attributes, that the serialization code of the device sub-attribute corresponding to condition a is 0001, and the length of the serialization code is 4. Thereafter, the client may determine that the length of the code corresponding to condition a is 8. That is, the client may determine that the predicate corresponding to condition a is 800030001.
For the same reason, the client may determine that the predicate corresponding to condition B is 800020001. The client may determine that the predicate corresponding to condition C is 800010001. The client may determine that the predicate corresponding to condition D is 800010002.
In some examples, after the client determines the relationship between the plurality of conditions, the client may determine a predicate to which the relationship between the plurality of conditions corresponds.
The relation among the conditions can comprise an and-or relation, the and-or relation among the conditions can be represented by an expression, and the expression can be in parentheses, so that when the client determines the code corresponding to the relation among the conditions, the predicate corresponding to the parentheses can also be determined.
In some examples, the left brackets may be identified with-1, i.e., the left brackets correspond to a predicate of-1. The right brackets can be identified by-2, i.e. the predicate corresponding to the right brackets is-2. The OR relationship between the conditions can be identified by-3, i.e. the predicate corresponding to the OR relationship between the conditions is-3. The AND relationship between the plurality of conditions may be identified by-4, i.e., the predicate corresponding to the AND relationship between the plurality of conditions is-4.
For example, as shown in fig. 2, after the condition filtering module included in the client determines, according to the requirement information input by the user, a plurality of conditions that satisfy the user requirement and a relationship between the plurality of conditions, the condition filtering module included in the client may send the determined plurality of conditions that satisfy the user requirement and the relationship between the plurality of conditions to the predicate builder of the client. After receiving the conditions and the relations among the conditions, the predicate builder of the client determines the predicates corresponding to the conditions and the relations among the conditions.
S304, the client determines the identification meeting the user requirement according to the identification corresponding to each condition and the identification corresponding to the relationship among the conditions.
After the client determines the predicate corresponding to each condition (i.e., the identifier corresponding to each condition) and the predicate corresponding to the relationship between the conditions (i.e., the identifier corresponding to the relationship between the conditions), the client may determine the predicate satisfying the user requirement (which may also be referred to as an identifier satisfying the user requirement) according to the first preset rule, the predicate corresponding to each condition, and the predicate corresponding to the relationship between the conditions. The predicate can also be called a built predicate, and the built predicate is a code capable of meeting the requirements of the user. The predicates meeting the user requirements can comprise predicates corresponding to each condition and predicates corresponding to the relationship between the conditions. The first preset rule is used for indicating a serialization rule of the first identifier and the second identifier. That is, the client may perform serialization processing on the first identifier and the second identifier according to the first preset rule to generate the identifier of the screening condition.
For example, the client determines, according to the requirement information input by the user, that the condition is a near-field device, the condition B is an online device, the condition C is a television device, and the condition D is a tablet device, and the expressions of relationships among the conditions are as follows: A.n.B.n (C.u.D) is given as an example. The client can determine that the predicate corresponding to the condition a is 800030001, the predicate corresponding to the condition B is 800020001, the predicate corresponding to the condition C is 800010001, and the predicate corresponding to the condition D is 800010002. The predicate corresponding to the left bracket is-1, the predicate corresponding to the right bracket is-2, the predicate corresponding to the relationship among the conditions is-3, and the predicate corresponding to the relationship or the predicate among the conditions is-4.
For the expression A n B n (C U D), the client can determine a predicate corresponding to the expression C U D, namely-1800010001-.
After the client determines the predicate corresponding to B ∞ (C ¬ D), the client may determine the code corresponding to expression a ≡ B ≡ (C $ D), that is, -1800030001-4-1800020001-4-1800010001 ∑ 3800010002-2-2-2.
It should be noted that, when the predicate satisfying the user requirement is constructed by the client, the predicate satisfying the user requirement may further include a version number of the protocol, an entity class corresponding to the protocol, and a specific predicate sequence.
For example, as shown in fig. 2, after the predicate builder included in the client determines the predicate corresponding to each condition and the predicates corresponding to the relationships between the conditions, the predicate builder included in the client may build the predicates meeting the user requirement according to the predicate corresponding to each condition and the predicates corresponding to the relationships between the conditions.
S305, the client sends the identification meeting the user requirement to the server.
After the predicate satisfying the user requirement (i.e., the identifier satisfying the user requirement, i.e., the identifier of the screening condition) is determined according to the predicate corresponding to each condition (i.e., the identifier corresponding to each condition) and the predicate corresponding to the relationship between the conditions (i.e., the identifier corresponding to the relationship between the conditions), the client can send the constructed predicate satisfying the user requirement to the server (which may also be referred to as a second electronic device), so that the server can analyze the device satisfying the user requirement according to the predicate sent by the client. That is, after the client performs serialization processing on the first identifier and the second identifier according to the first preset rule to generate the identifier of the screening condition, the client may send the generated identifier of the screening condition to the server.
For example, as shown in fig. 2, after a predicate builder included in a client builds a predicate that meets a user requirement, the predicate builder included in the client may send the built predicate that meets the user requirement to a server, so that the server may parse a device that meets the user requirement according to the predicate sent by the client.
According to the scheme, when a user needs to control multiple devices simultaneously, the client can identify multiple conditions meeting the user requirements simultaneously, establish predicates corresponding to the user requirements, and send the established predicates to the server. So that the server can screen out the multiple devices at the same time. Therefore, according to the scheme, when the user needs to control a plurality of devices at the same time, the operation of the user can be reduced, and the experience of the user is improved.
As shown in FIG. 4, the "predicate parsing" flow may include the following S401-S403.
S401, the server receives the identification which is sent by the client and meets the user requirement.
After the client (also referred to as a first electronic device) constructs an identifier meeting the user requirement (i.e., an identifier of a screening condition of a device that a user inputs and wants to control), the client may send the constructed predicate meeting the user requirement to the server (also referred to as a second electronic device), so that the server may parse the device meeting the user requirement according to the predicate meeting the user requirement sent by the client.
For example, as shown in connection with fig. 2, a predicate parser included in the service end may receive a predicate that meets a user requirement and is sent by the client end.
After the server receives the identifier of the screening condition of the device to be controlled, which is input by the user and sent by the client, the server can determine the device attributes and the logical relationship among the device attributes included in the screening condition according to the identifier of the screening condition, and then the server can determine the device meeting the screening condition according to the device attributes, the logical relationship among the device attributes and the device information stored by the server and control the device meeting the screening condition.
S402, the server determines a plurality of conditions included in the predicate and relations among the conditions according to the received identifier meeting the user requirement.
After the server receives the predicate satisfying the user requirement (i.e., the identification of the filtering condition of the device desired to be controlled input by the user) sent by the client, the server may determine, according to the received predicate satisfying the user requirement, a plurality of conditions included in the predicate satisfying the user requirement, and a relationship between the plurality of conditions.
The server may perform deserialization processing on the identifier of the screening condition according to a second preset rule to determine a first identifier of each device attribute and a second identifier of a logical relationship between the device attributes, where the first identifier of each device attribute is included in the screening condition, and the second preset rule is used to indicate a rule for deserializing the identifier of the screening condition. For example, the second preset rule may be to determine whether the identifier is an identifier of a device attribute or an identifier of a logical relationship between device attributes according to a value of the identifier.
After the server determines the first identifier of each device attribute and the second identifier of the logical relationship between the device attributes, which are included in the screening condition, the server may determine, according to the second preset corresponding relationship, the first identifier, and the second identifier, each device attribute and the logical relationship between the device attributes, which are included in the screening condition. The second preset correspondence may include a correspondence between the device attribute and the identifier of the device attribute, and a correspondence between a logical relationship between the device attributes and the identifier of the logical relationship.
For example, because the predicate satisfying the user requirement received by the server is a string of codes, the server may sequentially determine a value of each code included in the predicate (i.e., a value corresponding to each bit identifier included in the identifier satisfying the user requirement), and determine, according to the value of each bit code, whether the code belongs to a code corresponding to a condition or a code corresponding to a relationship between a plurality of conditions, so that the server may determine a plurality of conditions included in the predicate satisfying the user requirement, and a relationship between the plurality of conditions.
For example, in a case that the service determines that a predicate satisfying the user requirement includes a code whose value of a certain bit is greater than or equal to 0, the service may determine that the code corresponds to a condition included in the predicate. In the case that the server determines that the value of the code of a certain bit included in the predicate is less than 0, the server may determine that the code is a code corresponding to a relationship between a plurality of conditions.
For example, in a case that the server determines that the value of the code of a certain bit included in the predicate is-1, the server may determine that the code corresponds to the left bracket included in the relationship correspondence between the conditions. In the case that the server determines that the value of the code of a certain bit included in the predicate is-2, the server may determine that the code corresponds to the right bracket included in the relationship correspondence between the conditions. In the case that the server determines that the value of the code of a certain bit included in the predicate is-3, the server may determine that the code is a code corresponding to a relationship included in correspondence of a relationship between a plurality of conditions. In the case that the server determines that the value of the code of a certain bit included in the predicate is-4, the server may determine that the code is a code included in or corresponding to a relationship between a plurality of conditions.
For example, taking the predicate that meets the requirement of the user and is received by the server as-1800030001-4-1800020001-4-1800010001 and 3800010002-2-2-2 as an example, the determining, by the server, a plurality of conditions included in the predicate according to the received predicate, and a relationship between the plurality of conditions may include the following steps:
1. the server determines the value of the code of the first bit included in the predicate first.
If the value of the first bit of code is-1, the server may determine that the predicate includes a first bit of code that represents a left bracket included in a relationship between the plurality of conditions.
As shown in fig. 5, when the service determines that the code of the first bit included in the predicate (e.g., P ═ 0 to identify the first bit included in the predicate) indicates that the left parentheses included in the relationship between the conditions are included, the service may store a null value in the condition stack. The condition stack may be used to store a list of devices corresponding to a condition, where the condition may be one of a plurality of conditions included in a predicate determined by the server. The server can distinguish the list of the equipment corresponding to the determined conditions by storing the null value in the condition stack.
2. The server may proceed to determine the value of the code of the second bit included in the predicate.
After the server determines the value of the code of the first bit (e.g., P ═ 0) included in the predicate, the server may proceed to determine the value of the code of the second bit (e.g., P ═ 1) included in the predicate. The value of the code of the second bit (e.g., P ═ 1) included in the predicate is 8, and the service end can determine that the code of the second bit included in the predicate represents the code corresponding to the sub-attribute.
After the server determines the value of the code of the first bit (e.g., P ═ 0) included in the predicate, the server may proceed to determine the value of the code of the third bit (e.g., P ═ 2) included in the predicate. The value of the code of the second bit (e.g., P ═ 1) included in the predicate is 0, and the service end can determine that the code of the third bit included in the predicate represents the code corresponding to the condition.
The service end can continue to determine the value of the code of the fourth bit (for example, P ═ 3) included in the predicate until the service end determines that the value of the code of the tenth bit (for example, P ═ 9) included in the predicate is 1, that is, the code of the second bit to the tenth bit included in the predicate represents one condition included in the predicate.
The server side can determine that the codes from the second place to the tenth place included in the predicate are 800030001, and 8 represents the length of the code of the sub-attribute. I.e. 8 followed by 8 is the code representing the condition to be resolved. The first four digits 0003 represent the mark code corresponding to the device attribute corresponding to the condition (may also be referred to as the identifier corresponding to the device attribute), and the device attribute corresponding to 0003 may be determined to be the link type of the device through the correspondence between the mark code of the device attribute stored in the server and the device attribute. The last four digits 0001 represent the corresponding serialization codes of the device sub-attributes (which may also be referred to as identifiers corresponding to the device sub-attributes), and the device sub-attributes corresponding to 0001 can be determined to be near field communication through the correspondence between the serialization codes corresponding to the device sub-attributes stored in the server and the device sub-attributes.
The server determines that one condition included by the predicate is near field communication by the fact that the code from the second bit to the tenth bit of the predicate is 800030001. The server can screen out all the devices with the device sub-attribute of near field communication through the information of all the devices stored by the server, and the device sub-attribute is recorded as a list A. As shown in fig. 6, the server may store list a in the condition stack.
3. The server continues to determine the value of the code of the eleventh bit that the predicate includes.
The service end can continuously determine the value of the code with the eleventh bit (such as P-10) included in the predicate, and the value of the code with the eleventh bit (such as P-10) is-4, that is, the code with the eleventh bit (such as P-10) included in the predicate represents the and relation among a plurality of conditions. As shown in fig. 7, the server may store the and relation in a relation stack. The relationship stack may be used to store correspondence between a plurality of conditions.
4. The server continues to determine the value of the code of the twelfth bit that the predicate includes.
The server may continue to determine the value of the code of the twelfth bit (e.g., P ═ 11) included in the predicate, and the value of the code of the twelfth bit (e.g., P ═ 11) is-1, that is, the code of the twelfth bit (e.g., P ═ 11) included in the predicate indicates that the relationship between the conditions corresponds to the included left parenthesis. As shown in fig. 8, the server may store a null value in the condition stack.
5. The server continues to determine the value of the code of the thirtieth bit that the predicate includes.
The server may proceed to determine the value of the code of the thirteenth bit (e.g., P-12) that the predicate includes. The value of the code of the thirteenth bit (e.g., P-12) included in the predicate is 8, and the service end may determine that the code of the twelfth bit included in the predicate represents the code corresponding to the condition included in the predicate.
After the service determines the value of the code of the thirteenth bit (e.g., P-12) included in the predicate, the service may continue to determine the value of the code of the twelfth bit (e.g., P-13) included in the predicate until the value of the code of the twenty-first bit (e.g., P-20) included in the predicate is 1, that is, the code of the twelfth bit to the twenty-first bit (e.g., P-20) included in the predicate represents one condition included in the predicate.
The server side can determine that the codes of the thirtieth bit to the twenty-first bit included in the predicate are 800020001, and 8 represents the length of the code of the sub-attribute. I.e. 8 followed by 8 is the code representing the condition to be resolved. The first four digits 0002 represent the mark code of the device attribute corresponding to the condition, and the device attribute corresponding to 0002 can be determined to be the online state of the device through the corresponding relationship between the mark code corresponding to the device attribute stored in the server and the device attribute. The last four digits 0001 represent the serialization codes of the device sub-attributes corresponding to the conditions, and the device sub-attributes corresponding to 0001 can be determined to be online devices through the correspondence between the serialization codes corresponding to the device sub-attributes and the device sub-attributes stored in the server.
The server determines that one condition included in the predicate is an online device by the code of the thirteen bits to the twenty bits included in the predicate being 800020001. The server may screen out all devices whose device sub-attributes are online devices through the information of all devices stored by the server, and record the device sub-attributes as a list B, as shown in fig. 9, where the server may store the list B in a condition stack.
6. The server continues to determine the value of the twenty-second bit of code that the predicate includes.
The server can continuously determine the value of the twenty-second code (for example, P ═ 21) included in the predicate, so as to determine whether the twenty-second code (for example, P ═ 21) belongs to the code corresponding to the condition or the code corresponding to the relationship among the conditions, so as to determine the conditions included in the predicate and the relationship among the conditions. That is, the server may continue to perform steps 1 to 5 until the last code bit (i.e., forty-fifth bit, P ═ 44) included in the predicate is determined, and as shown in fig. 10, the condition stack may include list a (i.e., all devices whose device sub-attributes are near field communication), list B (i.e., all devices whose device sub-attributes are online devices), list C (i.e., all devices whose device sub-attributes are televisions), and list D (i.e., all devices whose device sub-attributes are tablet computers). A plurality of relationships, i.e., and, or, relationships between list a, list B, list C, and list D may be included in the relationship stack. Namely, the server determines a plurality of conditions included in the predicate meeting the user requirement and the relationship among the conditions according to the received predicate.
For example, as shown in fig. 2, after the predicate parser included in the service end receives the predicate that satisfies the user requirement and is sent by the client, the predicate parser included in the service end may determine, according to the received predicate that satisfies the user requirement, a plurality of conditions included in the predicate and a relationship between the plurality of conditions.
S403, the server determines a plurality of devices meeting the user requirements according to the conditions, the relationship among the conditions and the device information of all the users stored by the server.
After the server determines a plurality of conditions included in the predicate which meets the user requirement and relationships among the conditions according to the received predicate which meets the user requirement, the server can determine a plurality of devices which meet the user requirement according to the conditions, the relationships among the conditions and the device information of all the users stored by the server.
For example, continuing to take the predicate received by the service end as-1800030001-4-1800020001-4-1800010001 and 3800010002-2-2 as an example, the service end determines a plurality of device sub-attributes included in the predicate according to the received predicate, as shown in fig. 10, the condition stack may include a list a (i.e., all devices of near field communication in the device information of all users stored by the server, the device sub-attribute is all devices of online devices), a list B (i.e., all devices of online devices in the device information of all users stored by the server, the device sub-attribute is all devices of a television), a list C (i.e., all devices of a tablet computer in the device information of all users stored by the server, the device sub-attribute is all devices of a television), and a list D (i.e., all devices of a tablet computer in the device information of all users stored by the server). A plurality of relationships, i.e., and, or, relationships, between list a, list B, list C, and list D may be included in the relationship stack.
Firstly, the server can determine whether the number of elements in the condition stack is greater than 2, and if so, two elements at the top of the stack in the condition stack and the elements at the top of the stack in the relationship stack are taken out for operation. The elements in the condition stack may include a null value and a list of devices corresponding to the conditions included by the predicate.
For example, as shown in fig. 10, if the server determines that the number of elements in the condition stack is greater than 2, the server may extract two elements at the top of the stack, that is, a list D and a list C, and extract an element (or relationship) at the top of the stack in the relationship stack to perform an operation, so as to obtain a list CD. The list CD includes the devices in list D and the devices in list C.
Then, as shown in fig. 11, the server may take out a new top element, that is, a null value, in the condition stack, and store the list CD in the condition stack, where the list CD becomes a new top of the condition stack.
And then, the server can continuously determine whether the number of the elements in the condition stack is greater than 2, and if so, two elements of the new stack top in the condition stack and the elements of the new stack top in the relationship stack are taken out for operation.
As shown in fig. 11, if the number of elements in the condition stack is greater than 2, the server may extract two elements at the top of the stack, that is, the list CD and the list B, and extract a new element (that is, the and relationship) at the top of the stack to perform an operation, so as to obtain a list BCD, that is, a device in the list BCD, which is an online television or an online tablet computer.
And then, the server side can take out the null value of the new stack top element in the condition stack and store the list BCD in the condition stack to become the new stack top of the condition stack.
And then, the server can continuously determine whether the number of the elements in the condition stack is greater than 2, if so, two elements of the new stack top in the condition stack and the elements of the new stack top in the relationship stack are taken out for operation, so that the list ABCD is obtained, namely the equipment in the list ABCD is a near-field online television or a near-field online tablet computer. That is, the devices in the list ABCD are the devices that meet the needs of the user.
For example, as shown in fig. 2, after the predicate parser included in the service end receives the predicate sent by the client, the predicate parser included in the service end may determine a plurality of devices that meet the user requirement according to a plurality of conditions and a relationship between the plurality of conditions.
After the server determines a plurality of devices (such as a near-field online television or a near-field online tablet computer) meeting the user requirements, the server may control the plurality of devices meeting the user requirements. The server side can also send a plurality of devices meeting the user requirements to the client side, so that the user can control the plurality of devices meeting the user requirements through the client side.
According to the scheme, when a user needs to control multiple devices simultaneously, the client can identify multiple conditions meeting the user requirements simultaneously, establish predicates corresponding to the user requirements, and send the established predicates to the server. Therefore, the server side can screen out a plurality of devices meeting the user requirements simultaneously according to predicates sent by the client side, and then the server side can remotely control the screened devices simultaneously. Therefore, according to the scheme, when the user needs to control a plurality of devices at the same time, the operation of the user can be reduced, and the experience of the user is improved.
Corresponding to the method in the foregoing embodiment, an apparatus control device is also provided in the embodiment of the present application. The device control apparatus may be applied to an electronic device for implementing the method in the foregoing embodiment. The functions of the device can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
For example, fig. 12 shows a schematic structural diagram of the device control apparatus 12, and as shown in fig. 12, the device control apparatus 12 may include: a receiving module 1201 and a transmitting module 1202, etc.
The receiving module 1201 may be configured to receive a filtering condition of a device that is input by a user and is desired to be controlled, where the filtering condition includes a plurality of device attributes and a logical relationship between the device attributes.
The sending module 1202 may be configured to send the screening condition to the second electronic device, so that the second electronic device controls the device that meets the screening condition.
In another possible implementation manner, the device control apparatus may further include an obtaining module 1203 and a generating module 1204. The obtaining module 1203 may be configured to obtain, according to the first preset corresponding relationship, a first identifier of each device attribute in the screening condition and a second identifier of the logical relationship. The generating module 1204 may be configured to generate an identifier of the filtering condition according to the first identifier and the second identifier. The sending module 1202 may be configured to send the identification of the filtering condition to the second electronic device.
In another possible implementation manner, the generating module 1204 may be further configured to perform serialization processing on the first identifier and the second identifier according to a first preset rule to generate an identifier of the screening condition, where the first preset rule is used to indicate a serialization rule of the first identifier and the second identifier.
In another possible implementation, the device attributes include one or more of the following attributes: device type, presence status, and link type.
In another possible implementation manner, in the case that the device attribute is a device type, the first identifier includes: the device type identification and the device sub-attribute identification included by the device type; the device type comprises device sub-attributes including a mobile phone or a tablet computer;
in the case that the device attribute is in the online state, the first identifier includes: the identifier of the online state and the identifier of the device sub-attribute included in the online state; the device sub-attribute included in the presence status includes the presence device;
in the case where the device attribute is a link type, the first identification includes: an identifier of the link type and an identifier of a device sub-attribute included in the link type; the device sub-attribute included in the link type includes near field communication.
As another example, fig. 13 shows a schematic structural diagram of the device control apparatus 13, and as shown in fig. 13, the device control apparatus 13 may include: a receiving module 1301, a determining module 1302, a control module 1303, and the like.
The receiving module 1301 may be configured to receive the filtering condition sent by the first electronic device; the screening condition includes a plurality of device attributes and a logical relationship between the device attributes.
The determining module 1302 may be configured to determine, according to the filtering condition, a device that meets the filtering condition.
And the control module 1303 can be used for controlling the equipment meeting the screening condition.
In another possible implementation manner, the receiving module 1301 may be configured to receive, by a device, an identifier that the first electronic device sends the filtering condition.
The determining module 1302 may be further configured to determine, according to the identifier of the filtering condition, a first identifier of each device attribute included in the filtering condition and a second identifier of a logical relationship between the device attributes.
The determining module 1302 may be further configured to determine, according to the second preset corresponding relationship, the first identifier, and the second identifier, the device attributes included in the screening condition and the logical relationship between the device attributes.
The determining module 1302 may be further configured to determine, according to the device attributes included in the filtering condition, the logical relationship among the device attributes, and the device information stored in the second electronic device, a device that meets the filtering condition.
In another possible implementation manner, the determining module 1302 may be further configured to perform deserialization processing on the identifier of the filtering condition according to a second preset rule, so as to determine the first identifier of each device attribute and the second identifier of the logical relationship between the device attributes, where the first preset rule is used to indicate a rule for deserializing the identifier of the filtering condition.
In another possible implementation, the device attributes include one or more of the following attributes: device type, presence status, and link type.
In another possible implementation manner, in the case that the device attribute is a device type, the first identifier includes: the device type identifier and the device sub-attribute identifier included in the device type; the device type comprises device sub-attributes including a mobile phone or a tablet computer;
in the case that the device attribute is in the online state, the first identifier includes: the identifier of the online state and the identifier of the device sub-attribute included in the online state; the device sub-attributes included in the presence status include presence devices;
in the case where the device attribute is a link type, the first identification includes: an identifier of the link type and an identifier of a device sub-attribute included in the link type; the link type includes a device sub-attribute that is included as near field communication.
It should be understood that the division of units or modules (hereinafter referred to as units) in the above apparatus is only a division of logical functions, and may be wholly or partially integrated into one physical entity or physically separated in actual implementation. And the units in the device can be realized in the form of software called by the processing element; or can be implemented in the form of hardware; part of the units can also be realized in the form of software called by a processing element, and part of the units can be realized in the form of hardware.
For example, each unit may be a processing element separately set up, or may be implemented by being integrated into a chip of the apparatus, or may be stored in a memory in the form of a program, and a function of the unit may be called and executed by a processing element of the apparatus. In addition, all or part of the units can be integrated together or can be independently realized. The processing element described herein, which may also be referred to as a processor, may be an integrated circuit having signal processing capabilities. In the implementation process, the steps of the method or the units above may be implemented by integrated logic circuits of hardware in a processor element or in a form called by software through the processor element.
In one example, the units in the above apparatus may be one or more integrated circuits configured to implement the above method, such as: one or more ASICs, or one or more DSPs, or one or more FPGAs, or a combination of at least two of these integrated circuit forms.
As another example, when a unit in a device may be implemented in the form of a processing element scheduler, the processing element may be a general purpose processor, such as a CPU or other processor capable of invoking programs. As another example, these units may be integrated together and implemented in the form of a system-on-a-chip (SOC).
In one implementation, the means for implementing the respective corresponding steps of the above method by the above apparatus may be implemented in the form of a processing element scheduler. For example, the apparatus may include a processing element and a memory element, the processing element calling a program stored by the memory element to perform the method described in the above method embodiments. The memory elements may be memory elements on the same chip as the processing elements, i.e. on-chip memory elements.
In another implementation, the program for performing the above method may be in a memory element on a different chip than the processing element, i.e. an off-chip memory element. At this time, the processing element calls or loads a program from the off-chip storage element onto the on-chip storage element to call and execute the method described in the above method embodiment.
For example, the embodiments of the present application may also provide an apparatus, such as: an electronic device may include: a processor, a memory for storing instructions executable by the processor. The processor is configured to execute the above instructions, so that the electronic device implements the device control method according to the foregoing embodiment. The memory may be located within the electronic device or external to the electronic device. And the processor includes one or more.
In yet another implementation, the unit of the apparatus for implementing the steps of the method may be configured as one or more processing elements, and these processing elements may be disposed on the electronic device corresponding to the foregoing, where the processing elements may be integrated circuits, for example: one or more ASICs, or one or more DSPs, or one or more FPGAs, or a combination of these types of integrated circuits. These integrated circuits may be integrated together to form a chip.
For example, the embodiment of the present application also provides a chip, and the chip can be applied to the electronic device. The chip includes one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected through a line; the processor receives and executes computer instructions from the memory of the electronic device through the interface circuitry to implement the methods described in the method embodiments above.
Embodiments of the present application further provide a computer program product, which includes computer instructions executed by the electronic device as described above.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical functional division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another device, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or a plurality of physical units, that is, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be embodied in the form of software products, such as: and (5) programming. The software product is stored in a program product, such as a computer readable storage medium, and includes several instructions for causing a device (which may be a single chip, a chip, or the like) or a processor (processor) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
For example, embodiments of the present application may also provide a computer-readable storage medium having stored thereon computer program instructions. The computer program instructions, when executed by the electronic device, cause the electronic device to implement the device control method as described in the preceding method embodiment.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (12)

1. A device control method applied to a first electronic device, the method comprising:
the first electronic equipment receives a screening condition of equipment to be controlled, which is input by a user, wherein the screening condition comprises a plurality of equipment attributes and a logical relationship among the equipment attributes;
and the first electronic equipment sends the screening condition to second electronic equipment, so that the second electronic equipment controls the equipment meeting the screening condition.
2. The method of claim 1, wherein before the first electronic device sends the filter condition to the second electronic device, the method further comprises:
the first electronic equipment acquires a first identifier of each equipment attribute in the screening condition and a second identifier of the logical relationship according to a first preset corresponding relationship;
the first electronic equipment generates an identifier of the screening condition according to the first identifier and the second identifier;
the first electronic device sends the screening condition to a second electronic device, and the screening condition comprises:
and the first electronic equipment sends the identification of the screening condition to the second electronic equipment.
3. The method of claim 2, wherein the first electronic device generates the identifier of the screening condition according to the first identifier and the second identifier, and comprises:
the first electronic device serializes the first identifier and the second identifier according to a first preset rule to generate an identifier of the screening condition, wherein the first preset rule is used for indicating the serializing rule of the first identifier and the second identifier.
4. The method according to any of claims 1-3, wherein the device attributes include one or more of the following attributes: device type, presence status, and link type.
5. The method of claim 4, wherein in the case that the device attribute is the device type, the first identification comprises: an identifier of the device type and an identifier of a device sub-attribute included in the device type; the device type comprises device sub-attributes including a mobile phone or a tablet computer;
in a case that the device attribute is in the line state, the first identifier includes: the identifier of the online state and the identifier of the device sub-attribute included in the online state; the device sub-attribute included in the online status includes an online device;
in the case that the device attribute is the link type, the first identifier includes: an identifier of the link type and an identifier of a device sub-attribute included in the link type; the link type includes a device sub-attribute including near field communication.
6. A device control method, applied to a second electronic device, the method comprising:
the second electronic equipment receives the screening conditions sent by the first electronic equipment; the screening condition comprises a plurality of equipment attributes and a logical relationship among the equipment attributes;
and the second electronic equipment determines and controls the equipment meeting the screening condition according to the screening condition.
7. The method of claim 6, wherein the second electronic device receives the filtering condition sent by the first electronic device, and comprises:
the second electronic equipment receives the identification of the screening condition sent by the first electronic equipment;
the second electronic device determines, according to the screening condition, a device that satisfies the screening condition, including:
the second electronic equipment determines a first identifier of each equipment attribute and a second identifier of a logical relationship between the equipment attributes, wherein the first identifier is included in the screening condition, according to the identifier of the screening condition;
the second electronic device determines the device attributes and the logical relationship among the device attributes included in the screening condition according to a second preset corresponding relationship, the first identifier and the second identifier;
and the second electronic equipment determines the equipment meeting the screening condition according to the equipment attributes included by the screening condition, the logical relationship among the equipment attributes and the equipment information stored in the second electronic equipment.
8. The method according to claim 7, wherein the second electronic device determines, according to the identifier of the filtering condition, a first identifier of each device attribute included in the filtering condition and a second identifier of a logical relationship between the device attributes, including:
and the second electronic equipment performs deserialization processing on the identifier of the screening condition according to a second preset rule to determine a first identifier of each equipment attribute included in the screening condition and a second identifier of a logical relationship between the equipment attributes, wherein the second preset rule is used for indicating a rule for deserializing the identifier of the screening condition.
9. The method according to any of claims 6-8, wherein the device attributes comprise one or more of the following attributes: device type, presence status, and link type.
10. The method of claim 9, wherein in the case that the device attribute is the device type, the first identifying comprises: an identifier of the device type and an identifier of a device sub-attribute included in the device type; the device type comprises device sub-attributes comprising a mobile phone or a tablet computer;
in a case that the device attribute is in an online state, the first identifier includes: the identity of the online state and the identity of the device sub-attribute included in the online state; the device sub-attribute included in the online status includes an online device;
in a case where the device attribute is a link type, the first identifier includes: an identifier of the link type and an identifier of a device sub-attribute included in the link type; the link type includes a device sub-attribute that is included as near field communication.
11. An electronic device, comprising a processor, a memory for storing processor-executable instructions; the processor is configured to, when executing the instructions, cause the electronic device to implement the method of any of claims 1-10.
12. A computer readable storage medium having stored thereon computer program instructions; it is characterized in that the preparation method is characterized in that,
the computer program instructions, when executed by an electronic device, cause the electronic device to implement the method of any of claims 1 to 10.
CN202111582256.4A 2021-12-22 2021-12-22 Equipment control method and electronic equipment Active CN115032901B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111582256.4A CN115032901B (en) 2021-12-22 2021-12-22 Equipment control method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111582256.4A CN115032901B (en) 2021-12-22 2021-12-22 Equipment control method and electronic equipment

Publications (2)

Publication Number Publication Date
CN115032901A true CN115032901A (en) 2022-09-09
CN115032901B CN115032901B (en) 2023-03-28

Family

ID=83118339

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111582256.4A Active CN115032901B (en) 2021-12-22 2021-12-22 Equipment control method and electronic equipment

Country Status (1)

Country Link
CN (1) CN115032901B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060212134A1 (en) * 2005-02-24 2006-09-21 Sara Services & Engineers (Pvt) Ltd., Smart-control PLC based touch screen driven remote control panel for BOP control unit
US20150169071A1 (en) * 2013-12-17 2015-06-18 Google Inc. Edge swiping gesture for home navigation
CN106341432A (en) * 2015-07-06 2017-01-18 天津九洲云物联科技有限公司 Intelligent home system
CN106933889A (en) * 2015-12-31 2017-07-07 华为技术有限公司 For regular collocation method, display methods and the client screened
US20190020495A1 (en) * 2017-07-11 2019-01-17 Philipp Roosli Automation system for deployment in a building
CN109752960A (en) * 2017-11-08 2019-05-14 中兴通讯股份有限公司 A kind of smart home inter-linked controlling method and device
CN109976172A (en) * 2019-03-11 2019-07-05 深圳绿米联创科技有限公司 Method, apparatus, electronic equipment and the storage medium that set condition generates
CN110888902A (en) * 2019-11-18 2020-03-17 北京蓦然认知科技有限公司 Intelligent control configuration method and system
CN111045339A (en) * 2019-11-21 2020-04-21 南京理工大学 Method for describing intelligent household environment requirements based on user behaviors
CN111538844A (en) * 2020-03-20 2020-08-14 华为技术有限公司 Target field knowledge base generation and problem solution method and device
CN111818132A (en) * 2020-06-19 2020-10-23 深圳奇迹智慧网络有限公司 Control method and device of Internet of things equipment, computer equipment and storage medium
CN113282632A (en) * 2021-04-21 2021-08-20 荣耀终端有限公司 Data transmission method and equipment
CN113495491A (en) * 2021-06-24 2021-10-12 深圳市晨北科技有限公司 Method and device for displaying equipment linkage relationship, electronic equipment and storage medium
CN113535987A (en) * 2021-09-13 2021-10-22 杭州涂鸦信息技术有限公司 Linkage rule matching method and related device

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060212134A1 (en) * 2005-02-24 2006-09-21 Sara Services & Engineers (Pvt) Ltd., Smart-control PLC based touch screen driven remote control panel for BOP control unit
US20150169071A1 (en) * 2013-12-17 2015-06-18 Google Inc. Edge swiping gesture for home navigation
CN106341432A (en) * 2015-07-06 2017-01-18 天津九洲云物联科技有限公司 Intelligent home system
CN106933889A (en) * 2015-12-31 2017-07-07 华为技术有限公司 For regular collocation method, display methods and the client screened
US20190020495A1 (en) * 2017-07-11 2019-01-17 Philipp Roosli Automation system for deployment in a building
CN109752960A (en) * 2017-11-08 2019-05-14 中兴通讯股份有限公司 A kind of smart home inter-linked controlling method and device
CN109976172A (en) * 2019-03-11 2019-07-05 深圳绿米联创科技有限公司 Method, apparatus, electronic equipment and the storage medium that set condition generates
CN110888902A (en) * 2019-11-18 2020-03-17 北京蓦然认知科技有限公司 Intelligent control configuration method and system
CN111045339A (en) * 2019-11-21 2020-04-21 南京理工大学 Method for describing intelligent household environment requirements based on user behaviors
CN111538844A (en) * 2020-03-20 2020-08-14 华为技术有限公司 Target field knowledge base generation and problem solution method and device
CN111818132A (en) * 2020-06-19 2020-10-23 深圳奇迹智慧网络有限公司 Control method and device of Internet of things equipment, computer equipment and storage medium
CN113282632A (en) * 2021-04-21 2021-08-20 荣耀终端有限公司 Data transmission method and equipment
CN113495491A (en) * 2021-06-24 2021-10-12 深圳市晨北科技有限公司 Method and device for displaying equipment linkage relationship, electronic equipment and storage medium
CN113535987A (en) * 2021-09-13 2021-10-22 杭州涂鸦信息技术有限公司 Linkage rule matching method and related device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ATIF ALVI,等: "A logical approach to home automation", 《2006 2ND IET INTERNATIONAL CONFERENCE ON INTELLIGENT ENVIRONMENTS - IE 06》 *
薛清锋,等: "专家系统在智能家居设备联动控制中的应用", 《天津城市建设学院学报》 *

Also Published As

Publication number Publication date
CN115032901B (en) 2023-03-28

Similar Documents

Publication Publication Date Title
US10284705B2 (en) Method and apparatus for controlling smart device, and computer storage medium
CN105511873B (en) User interface control display method and device
CN110554958A (en) Graph database testing method, system, device and storage medium
CN108279882B (en) Framework generation method, device, equipment and computer readable medium
CN111399828B (en) Model-driven logic device modeling method and terminal
CN110875850A (en) Firmware upgrading method and system, readable storage medium and terminal equipment
CN112311571A (en) Network topology generation method and device, electronic equipment and non-transient storage medium
CN113127357B (en) Unit test method, apparatus, device, storage medium, and program product
CN115032901B (en) Equipment control method and electronic equipment
CN109558225B (en) Page switching method and device
CN114466387B (en) Updating method and device of configuration file of base station, storage medium and electronic device
CN108092959B (en) BACnet protocol analysis method based on configuration
CN114996246A (en) Data cleaning method for checking multiple fields of table based on NiFi assembly
CN114116712A (en) Extended field processing method and device, electronic equipment and storage medium
CN113590297A (en) Method and equipment for transmitting process parameters back and forth
CN113742581A (en) List generation method and device, electronic equipment and readable storage medium
CN112445811A (en) Data service method, device, storage medium and component based on SQL configuration
CN110960858A (en) Game resource processing method, device, equipment and storage medium
US20230038513A1 (en) Interface display method and device, storage medium, and electronic device
CN116755684B (en) OAS Schema generation method, device, equipment and medium
CN111556478B (en) Bluetooth device
CN112100285B (en) Topology analysis method, device and storage medium of power distribution network model
CN107404464B (en) Signaling decoding method and system
CN116894048A (en) Data query method, device, equipment and storage medium based on artificial intelligence
CN116303919A (en) Question and answer method and system

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
GR01 Patent grant
GR01 Patent grant