CN108833233A - Apparatus control method, terminal and computer readable storage medium - Google Patents

Apparatus control method, terminal and computer readable storage medium Download PDF

Info

Publication number
CN108833233A
CN108833233A CN201810682169.8A CN201810682169A CN108833233A CN 108833233 A CN108833233 A CN 108833233A CN 201810682169 A CN201810682169 A CN 201810682169A CN 108833233 A CN108833233 A CN 108833233A
Authority
CN
China
Prior art keywords
terminal
field
identifier
broadcast message
control method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810682169.8A
Other languages
Chinese (zh)
Inventor
张笑瑜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201810682169.8A priority Critical patent/CN108833233A/en
Publication of CN108833233A publication Critical patent/CN108833233A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2816Controlling appliance services of a home automation network by calling their functionalities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/283Processing of data at an internetworking point of a home automation network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/24Negotiation of communication capabilities

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a kind of apparatus control methods,Terminal and computer readable storage medium,Pass through the device performance parameters and broadcast message of terminal to be controlled in acquisition current environment,Device performance parameters are added in broadcast message,Obtain new broadcast message,By broadcast to the controlling terminal in current environment,And controlling terminal is by obtaining broadcast message,Therefrom obtain the corresponding communication mode of equipment performance,Then controlling terminal is directly controlled according to the communication mode and terminal to be controlled,When this method makes user need that distinct device is rapidly identified and controlled under the present circumstances,The equipment performance that device broadcasts come out in current environment can be got in real time,Communication mode either control mode both to quickly be selected while be supported according to equipment performance,Quickly and effectively,Targetedly realize interactive controlling,Provide interim control efficiency between distinct device,It also improves user and experience is used interchangeably to the control of terminal.

Description

Device control method, terminal, and computer-readable storage medium
Technical Field
The present invention relates to the field of wireless communication technologies, and in particular, to a device control method, a terminal, and a computer-readable storage medium.
Background
Most of existing mobile terminals support a communication mode of a proximity location awareness service (WIFI Aware, NAN protocol), but for some special terminals, some functions cannot achieve mutual communication, for example, some mobile phones support WIFI communication, but may not support bluetooth communication, and devices that are preparing to communicate with the mobile phones cannot obtain a communication mode actually supported by the mobile phones, so the existing modes can only perform test sending in a blind mode together, and can determine the mode after receiving feedback, thereby greatly reducing the communication efficiency between the two terminals.
Particularly, in the control application of the smart home, the existing control method is to install a control interface on a mobile phone, connect the control interface with a home smart home control system in a networking manner, and then perform one-to-one control on the control interface, but for a user who temporarily joins in the control, the operation is relatively troublesome, and various corresponding applications, networking and other operations need to be installed, so that the experience of the user is very poor, and therefore, a method capable of enabling surrounding control equipment to analyze a corresponding communication manner or a support function of the equipment in real time needs to be designed to solve the above problems.
Disclosure of Invention
The invention aims to solve the technical problem that the existing intelligent home is poor in use experience of a user due to the fact that the control and adding mode of each device is complex, and provides a device control method, a terminal and a computer readable storage medium.
In order to solve the technical problem, the invention provides an equipment control method, which is applied to an intelligent home system and comprises the following steps:
acquiring equipment performance parameters and broadcast information of a terminal to be controlled in the current environment;
adding the equipment performance parameters to the broadcast information to obtain a new broadcast message;
broadcasting the broadcast message to a control terminal in the current environment;
and receiving the data sent by the control terminal according to the broadcast message to control the terminal to be controlled.
Optionally, the device performance parameter includes a device performance type and an identifier uniquely corresponding to the device performance type, where the device performance type includes at least one of a supported capability and a model number of the device.
Optionally, the adding the device performance parameter to the broadcast information to obtain a new broadcast message includes:
extracting a service discovery protocol frame in the broadcast information;
dividing a custom field in the service discovery protocol frame into at least two field combinations, wherein each field combination comprises an identification field and a content field corresponding to the identification field;
and sequentially inserting the identifier and the equipment performance type corresponding to the identifier in the equipment performance parameter into an identification field and a content field in the field combination to obtain a new broadcast message.
Optionally, a length field for identifying the length of the content field is further added between the identification field and the content field.
Optionally, when the device performance type is a device support capability of the terminal to be controlled, the adding the device performance parameter to the broadcast information to obtain a new broadcast message includes:
dividing a custom field in the service discovery protocol frame into an identification field and a content field corresponding to the identification field;
and sequentially inserting the identifier and the device supporting capability corresponding to the identifier into the identification field and the content field to obtain a new broadcast message.
Optionally, when the device performance type is a device support capability and a device model of the terminal to be controlled, sequentially inserting the identifier and the device performance type corresponding to the device performance parameter thereof into an identification field and a content field in the field combination includes:
inserting the identifier and the device model corresponding to the identifier into a first field combination of the two field combinations;
sequentially inserting the identifier and device support capabilities corresponding thereto into a field combination other than a first one of the two field combinations.
Further, an embodiment of the present invention further provides an apparatus control method, where the method includes:
receiving a broadcast message sent by a terminal to be controlled;
extracting the equipment performance parameters carried in the broadcast message;
inquiring a communication mode corresponding to the equipment performance parameter from an equipment performance parameter and communication mode corresponding relation table according to the equipment performance parameter;
and controlling the terminal to be controlled according to the communication mode.
Optionally, the querying, according to the device performance parameter, the communication method corresponding to the device performance parameter from the correspondence table between the device performance parameter and the communication method includes:
extracting the identifier in the device performance parameter and the device performance type;
determining a specific type of the device performance types according to the identifier;
determining a corresponding relation table between the corresponding equipment performance type and the communication mode according to the specific type;
and inquiring the communication mode corresponding to the extracted equipment performance type from the relation table.
Further, an embodiment of the present invention further provides a terminal, including a processor, a memory, and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more first programs stored in the memory to implement the steps of the device control method as described in any one of the above;
or,
the processor is configured to execute one or more second programs stored in the memory to implement the steps of the device control method as described above.
Further, an embodiment of the present invention also provides a computer-readable storage medium, in which one or more first programs are stored, and the one or more first programs are executable by one or more processors to implement the steps of the apparatus control method according to any one of the above embodiments;
or,
the computer readable storage medium stores one or more first programs executable by one or more processors to implement the steps of the device control method as described above.
The invention has the beneficial effects that:
the invention provides a device control method, a terminal and a computer readable storage medium, aiming at the defect that the control and adding modes of the existing intelligent home for each device are complex, so that the use experience of a user is poor, the invention provides the device control method which can quickly identify the communication mode or function supported by the opposite device, so as to realize quick control, and particularly, the device performance parameters and the broadcast information of the terminal to be controlled in the current environment are obtained, the device performance parameters are added into the broadcast information to obtain new broadcast information, the broadcast information is broadcasted to the control terminal in the current environment, the control terminal obtains the communication mode corresponding to the device performance by obtaining the broadcast information, and then the control terminal directly controls the terminal to be controlled according to the communication mode, according to the equipment control method, when the user needs to quickly identify and control different equipment in the current environment, the equipment performance broadcasted by the equipment in the current environment can be acquired in real time, so that a communication mode or a control mode which simultaneously supports the equipment and the equipment can be quickly selected according to the equipment performance, interactive control is quickly, effectively and pertinently realized, the temporary control efficiency among different equipment is improved, and the control interactive use experience of the user on the terminal is also improved.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
fig. 1 is a schematic diagram of a hardware structure of an alternative mobile terminal for implementing various embodiments of the present invention;
fig. 2 is a flowchart of an apparatus control method according to a first embodiment of the present invention;
fig. 3 is a flowchart of an apparatus control method according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal according to a third embodiment of the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal supporting the WIFI Aware technology, such as a mobile phone, a tablet computer, a notebook computer, a palm top computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and a fixed terminal supporting the WIFI Aware technology, such as a Digital TV, a desktop computer, and the like.
The following description will be given taking as an example a mobile terminal supporting WIFI Aware technology, and it will be understood by those skilled in the art that the construction according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: RF (Radio Frequency) unit 101, communication module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000(Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division duplex-Long Term Evolution), and TDD-LTE (Time Division duplex-Long Term Evolution).
The communication component 102 is configured to facilitate communications between the mobile terminal 100 and other devices in a wired or wireless manner. The mobile terminal 100 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 102 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 102 further includes a Near Field Communication (NFC) module or WIFIAware communication module to facilitate short range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies, and the WIFI Aware communication module performs mutual communication with other mobile terminals that also support the WIFI Aware technology through WIFI Aware (i.e., NAN protocol), although fig. 1 illustrates the communication component 102, it is understood that it does not belong to the essential component of the mobile terminal, and may be omitted as needed within the scope that does not change the essence of the invention, or change the specific communication mechanism of the module.
In practical application, the communication component can be implemented by adopting a WiFi module, the WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send emails, browse webpages, access streaming media and the like through the WiFi module, so that wireless broadband internet access is provided for the user.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the communication component 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphics processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the communication component 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
Based on the hardware structure of the mobile terminal, the embodiments of the method of the invention are provided.
First embodiment
The device control method provided by the embodiment of the invention is suitable for various terminals, such as portable terminals and wearable devices, the wearable devices specifically comprise the existing common wristband and flexible screen wristband, and even can be wearable mobile terminals, but the terminals are all devices for realizing communication based on the WIFI Aware technology.
In the existing smart home control scenario, functions or device capabilities supported by each device may have a certain difference, but all of the terminals have a common function, and all of the terminals support a proximity location awareness service, and in order to implement a function that can help a user quickly and effectively control or communicate with each device in the scenario, an embodiment of the present invention is implemented by extending a structure of a service discovery protocol frame (NAN Attribute) in the proximity location awareness service, specifically referring to fig. 2, where fig. 2 is a basic flowchart of a device control method provided in this embodiment, an execution main body of the device control method may be a to-be-controlled terminal itself, or a processing device disposed on the to-be-controlled terminal, or even a main control unit on the to-be-controlled terminal, but no matter which execution main body is adopted, communication between the to-be-controlled terminal and the control terminal is implemented based on a WIFAware technology, that is, a neighbor location awareness service (NAN protocol), in this embodiment, a terminal to be controlled is taken as a receiving end, and a control terminal is taken as a sending end for example, where the apparatus control method of the receiving end specifically includes the following steps:
s201, acquiring the device performance parameters and the broadcast information of the terminal to be controlled in the current environment.
Optionally, the device performance parameter includes a device performance type and an identifier uniquely corresponding to the device performance type, where the device performance type includes at least one of a supported capability and a model number of the device.
In practical applications, the identifiers are further divided into device capability identifiers corresponding to capabilities supported by the device and into special identifiers corresponding to the device model.
In practical application, the device performance type may further include a working system used by the device and a device application scenario, and each type is correspondingly provided with an identifier corresponding to the unique identifier thereof.
For example, some devices can only be used for implementing a control function, some devices can only be used for playing audio and video, some devices can only be used for recording and the like, and even some types of devices have special services or functions and the like, which are device performance types, in this step, after the device performance parameters are obtained, the device performance types can be classified, and corresponding identifiers are set according to different types.
For example, the identifier of the capability supported by the device in the device performance parameter may be set to 1, the identifier of the model of the device may be set to 2, and so on.
In this embodiment, the broadcast information at least includes a service discovery protocol frame, where the service discovery protocol frame is mainly used to inform neighboring devices of more device performance parameters of a terminal to be controlled in an area where the neighboring devices are located, so as to facilitate a required interaction mode for the devices in the area to communicate with the terminal to be controlled or some special requirements of the terminal to be controlled when the devices in the area need to communicate with each other.
S202, adding the equipment performance parameters to the broadcast information to obtain a new broadcast message.
In this embodiment, when writing the device capability type and the identifier into the broadcast information, the identifier is first written, and then the device capability type is selected according to the identifier for writing, that is, what device capability type should be written into the broadcast information needs to be determined by the identifier.
In practical application, the service discovery protocol frame contained in the broadcast information has a composition structure as follows: in the step, adding the device performance type and the identifier to the broadcast information specifically means that the device performance type and the identifier are respectively written into the Attribute Body Field in the service discovery protocol frame, and in the writing process, the original Attribute Body Field needs to be split and expanded to expand the identification Field and the content Field, and then the identifier and the device performance type corresponding to the identifier are written into the two expanded fields, so that a new broadcast message is obtained.
In practical applications, for some devices, it may support multiple device capabilities at the same time, and for this case, the step S202 may be implemented by the following steps:
extracting a service discovery protocol frame in the broadcast information;
dividing a custom field in the service discovery protocol frame into at least two field combinations, wherein each field combination comprises an identification field and a content field corresponding to the identification field;
and sequentially inserting the identifier and the equipment performance type corresponding to the identifier in the equipment performance parameter into an identification field and a content field in the field combination to obtain a new broadcast message.
In practical applications, it is assumed that only a service discovery protocol frame is included in the broadcast information, and the format of the protocol frame is: the Sub ID corresponds to an identification field, the Sub ID specifies specific content of information written in the Variable, in the present invention, the Sub ID should write an identifier, for example, a number for marking a capability supported by a device, a number for marking a device model, a number for marking a special function of a device, etc., the corresponding Variable writes a specific device performance type, optionally, if the specified number 0 is a public mark key, the number 0 is correspondingly written in the Sub ID position, and then the specific public key is written in the Variable position, if the specified number 1 is a device support capability flag bit, the number 1 is correspondingly written in the Sub ID position, and then the specific device capability is written in the Variable position, such as supporting a communication mode of bluetooth, NFC, etc., and even the device has a control function, etc.
S203, broadcasting the broadcast message to the control terminal in the current environment.
In practical application, when broadcasting the broadcast information, the broadcast can be realized through a communication module on the terminal to be controlled, and the setting can also be realized through a gateway or a broadcasting device connected with the terminal to be controlled.
And S204, receiving the data sent by the control terminal according to the broadcast message to control the terminal to be controlled.
In this embodiment, when the device performance type is a device support capability of the terminal to be controlled, the adding the device performance parameter to the broadcast information to obtain a new broadcast message includes:
dividing a custom field in the service discovery protocol frame into an identification field and a content field corresponding to the identification field;
and sequentially inserting the identifier and the device supporting capability corresponding to the identifier into the identification field and the content field to obtain a new broadcast message.
Further, in order to facilitate the terminal to extract the received broadcast message, a length field is further provided between the identification field and the content field, where the length field is used to identify a total length of the device capability type inserted in the content field, that is, a Sub length field is further divided between the Sub ID field and the Variable field, and the length of the device capability type written in the Variable field is specified by the length field, that is, the following data frame format: attribute ID + Length + SubID + SubLength + device capability type.
In practical application, the capabilities supported by the devices of some devices are still relatively large, for this situation, when the terminal to be controlled expands and modifies the service discovery protocol frame, the Attribute Body Field therein may be divided into a plurality of Field combinations on average, the specific number may be divided according to the capabilities supported by the devices themselves, and when writing, the device capability identifier is written first correspondingly, and then the specific device capability is written.
Specifically, the user-defined fields in the service discovery protocol frame in the broadcast information are averagely divided into two field combinations which are arranged in parallel, namely, the field combinations are arranged longitudinally, and each field combination is provided with a flag bit field and a content field;
and sequentially writing the equipment capability type and the corresponding identifier thereof into a content field and an identification field in the two field combinations, wherein the specific composition mode is as follows:
in practical application, when the device performance type includes a device support capability and a device model, the device model and its corresponding identifier, and the device capability and its corresponding identifier are respectively and sequentially written into a content field and an identification field in the two field combinations, and the specific composition manner is as follows:
in practical application, when the device performance type is the device support capability and the device model of the terminal to be controlled, the specific step of sequentially inserting the identifier and the device performance type corresponding to the identifier in the device performance parameter into the identification field and the content field in the field combination includes:
inserting the identifier and the device model corresponding to the identifier into a first field combination of the two field combinations;
sequentially inserting the identifier and device support capabilities corresponding thereto into a field combination other than a first one of the two field combinations.
According to the device control method provided by the embodiment, the device performance parameters of the device are broadcasted to the control terminal, the control terminal can acquire the performance parameters corresponding to the device through the broadcast information, and the communication mode corresponding to the device is determined according to the performance parameters or the corresponding control mode is selected to realize control, so that the opposite party can perform targeted and efficient joining control, and meanwhile, the use experience of a user on the WIFI Aware device during interaction is improved.
Second embodiment
Fig. 3 is a basic flowchart of an apparatus control method according to a second embodiment of the present invention, in which a terminal to be controlled is taken as a receiving end, and a control terminal is taken as a sending end, for example, to describe, in this embodiment, an apparatus control method at the sending end specifically includes the following steps:
s301, receiving a broadcast message sent by a terminal to be controlled.
In this step, the broadcast message is data information including at least a service discovery protocol frame in which an identification field and a content field newly added by the terminal to be controlled are included, and an identifier of the terminal to be controlled and a device capability type are written in the identification field and the content field, respectively, wherein the device capability type in the content field is determined by the identifier in the identification field, and the identifier is a category for identifying the device capability.
S302, extracting the device performance parameters carried in the broadcast message.
In this step, when extracting the device performance parameter, first, a service discovery protocol frame needs to be extracted from the broadcast message, the device performance parameter of the terminal to be controlled is written in the service discovery protocol frame, and the device performance parameter in this step is extracted from the service discovery protocol frame.
Further, after the service discovery protocol frame is extracted, the service discovery protocol frame is analyzed and identified, a corresponding identifier is identified from the data frame, the data content carried in the protocol frame is determined to be the type of the device performance according to the identifier, and then step S303 is executed, otherwise, the broadcast message sent by the terminal to be controlled is continuously received.
In this step, when the extracted service discovery protocol frame is provided with a length field between the field of the identifier and the field of the device performance type, the control terminal needs to acquire information in the length field before reading the device performance type, determine the byte length of the device performance to be read next, and finally read the device performance type according to the byte length.
And S303, inquiring the communication mode corresponding to the equipment performance parameter from the corresponding relation table of the equipment performance parameter and the communication mode according to the equipment performance parameter.
This step may also be implemented in some embodiments by:
the querying, according to the device performance parameter, the communication mode corresponding to the device performance parameter from the device performance parameter and communication mode correspondence table includes:
extracting the identifier in the device performance parameter and the device performance type;
determining a specific type of the device performance types according to the identifier;
determining a corresponding relation table between the corresponding equipment performance type and the communication mode according to the specific type;
and inquiring the communication mode corresponding to the extracted equipment performance type from the relation table.
S304, controlling the terminal to be controlled according to the communication mode.
In this embodiment, before step S302, the method further includes extracting flag bit information carried in the broadcast message, and what type of content is stored in the content field can be known through the identifier.
In practical applications, there are some devices with special communication requirements, for example, the Nubia device needs to communicate in a special interaction mode or a cloud interaction mode, the identifier is set to be number 3 by the corresponding classification, and this flag bit is added to the protocol frame, with the following specific results:
in practical application, because the reserved field corresponding to the Attribute ID is limited, the protocol extension mode of the invention is to add SUB ID into the Attribute ID for protocol extension, so that more extension capability is realized on the basis of ensuring compatibility according to the existing protocol, the selected Attribute ID is the reserved field of 14, the SUB ID is the flag bit SUB ID 1 of the new extension protocol identification content is the device support capability flag bit, the SUB ID 2 is the device model identification, and the SUB ID 3 is the device special identification.
For example, in an intelligent home scene, home equipment capable of supporting audio and video may add more detailed content of the capability supported by the home equipment to indicate the audio format and the video definition supported by the home equipment by using a field of sub id 1, and the master control equipment may automatically select an interactive mode using an instruction or an interactive mode using a voice control or an interactive mode using an interface by using the flag bit.
The device-specific identifier may appear in a conference scene or some special security level scenes, for example, the nubia device and the function support specific to the nubia device itself may be identified by the field whether the nubia device is the nubia device, and then the terminal provides a specific interactive mode or an information data mode according to the specificity of the device.
The device performance parameters of the device in the current scene are acquired through the device control mode provided by the embodiment, and the corresponding communication mode is selected for different devices according to the device performance parameters to realize control, so that a controller can more pertinently and quickly select a proper communication mode or a processing method to effectively operate the on-site device, and the use experience of a user is improved.
Third embodiment
Referring to fig. 4, fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention, where the bracelet includes: a processor 41, a memory 42 and a communication bus 43, communication between the processor 41 and the memory 42 being effected via said communication bus 43.
The processor 41 typically controls the overall operation of the server to which it belongs. For example, processor 41 performs computations, validation, etc. The processor 41 may be a Central Processing Unit (CPU).
In this embodiment, when the terminal to be controlled serves as a receiving end, the processor 41 at least needs to have the following functions:
acquiring equipment performance parameters and broadcast information of a terminal to be controlled in the current environment;
adding the equipment performance parameters to the broadcast information to obtain a new broadcast message;
broadcasting the broadcast message to a control terminal in the current environment;
and receiving the data sent by the control terminal according to the broadcast message to control the terminal to be controlled.
In practical application, the device performance parameter includes a device performance type and an identifier uniquely corresponding to the device performance type, and the device performance type includes at least one of a supported capability and a model number of the device; further, the device performance type may further include a working system used by the device and a device application scenario, and each type is correspondingly provided with an identifier corresponding to the unique identifier thereof.
In this embodiment, the terminal to be controlled and the control terminal adopt a communication device supporting a neighbor induction network WIFIAware technology.
Optionally, the broadcast message is a data packet at least including a service discovery protocol frame, and the device performance parameter of the terminal to be controlled is written in the service discovery protocol frame, so as to facilitate identification and differentiation of the device performance by an external terminal, the terminal to be controlled adds an identifier while adding a device performance type, and the identifier is used to identify the type of the device performance written in the broadcast message, specifically, the type of the device performance written in the service discovery protocol frame, such as device capability, device specific identifier, and the like.
The method specifically includes that the terminal to be controlled adds the device performance type and the identifier corresponding to the device performance type to the broadcast information, and includes the following steps:
firstly, extracting a service discovery protocol frame in the broadcast information;
dividing a custom field in the service discovery protocol frame into at least two field combinations, wherein each field combination comprises an identification field and a content field corresponding to the identification field;
and then, sequentially inserting the identifier and the device performance type corresponding to the identifier in the device performance parameter into an identification field and a content field in the field combination to obtain a new broadcast message.
In practical application, a length field is further provided between an identification field and a content field in a service discovery protocol frame, and the length field is used for identifying the total length of the device performance type inserted in the content field.
In practical application, the device performance types of some devices are still relatively many, for this situation, when the terminal to be controlled expands and modifies the service discovery protocol frame, the Attribute Body Field therein may be divided into a plurality of Field combinations on average, the specific number may be divided according to the performance types supported by the device itself, and when writing, the identifier is written in first correspondingly, and then the device performance types are written in.
In this embodiment, if the device performance type includes a device model and a device application scenario, the adding the identifier corresponding to the device performance and the device performance to the broadcast information includes:
dividing the self-defined field in the service discovery protocol frame in the broadcast information into two field combinations which are arranged in parallel, namely, the field combinations are arranged longitudinally, and each field combination is provided with an identifier field and a content field;
and respectively writing the device model, the identifier corresponding to the device model, the device application scene and the zone bit corresponding to the device application scene into a content field and an identification field in the two field combinations in sequence.
In this embodiment, when the terminal to be controlled transmits, the processor 41 at least needs to further have the following functions:
receiving a broadcast message sent by a terminal to be controlled;
extracting the equipment performance parameters carried in the broadcast message;
inquiring a communication mode corresponding to the equipment performance parameter from an equipment performance parameter and communication mode corresponding relation table according to the equipment performance parameter;
and controlling the terminal to be controlled according to the communication mode.
In practical application, in the process of extracting the device performance, a service discovery protocol frame needs to be extracted from broadcast information, then the service discovery protocol frame is analyzed and identified, a corresponding identifier is identified from the protocol frame, and the data content carried in the protocol frame is determined to be the type of the device performance according to the identifier.
The querying, according to the device performance parameter, the communication mode corresponding to the device performance parameter from the device performance parameter and communication mode correspondence table includes:
extracting the identifier in the device performance parameter and the device performance type;
determining a specific type of the device performance types according to the identifier;
determining a corresponding relation table between the corresponding equipment performance type and the communication mode according to the specific type;
and inquiring the communication mode corresponding to the extracted equipment performance type from the relation table.
In practical applications, the processing steps of the processor 41 can be specifically realized by setting software codes for realizing corresponding functions, and optionally, the memory 42 stores software codes readable by the processor 41 and executable by the processor 41, and includes instructions for controlling the processor 41 to execute the above-described functions (i.e., software execution functions). In this embodiment, the memory 42 at least needs to store a program needed to implement the processor 41 to execute the above functions to implement the modification of the terminal to be controlled and the data frame on the control terminal, and to increase the device performance and the corresponding identifier on the device.
The memory 42, which is typically a semiconductor memory unit, includes a Random Access Memory (RAM), a Read Only Memory (ROM), and a CACHE memory (CACHE), of which RAM is the most important memory. The memory 42 is one of the important components in the computer, and is a bridge for communicating with the CPU, and the operation of all programs in the computer is performed in the memory, and is used for temporarily storing the operation data in the CPU and the data exchanged with the external memory such as the hard disk, and the CPU transfers the data to be operated to the memory for operation as long as the computer is in operation, and the CPU transmits the result after the operation is completed, and the operation of the memory also determines the stable operation of the computer.
The wearable device provided by this embodiment further includes a sensor 44, and the sensor 44 may be configured to acquire a second terminal or a user operation on the first terminal, for example, when the first terminal is a mobile phone and the second terminal is a mobile phone and a user needs to control the air conditioner through the mobile phone, first, the device capability supported by the air conditioner needs to be acquired through the above communication method, the sliding track of the user on the mobile phone is acquired through the sensor to obtain a corresponding control instruction, and the control instruction is sent to the air conditioning device according to the control method and the interaction method selected by the acquired device capability, so as to control the air conditioner in real time.
The present embodiments also provide a computer readable storage medium storing one or more first programs executable by one or more processors to perform the steps of:
acquiring device performance parameters and broadcast information of a terminal to be controlled in the current environment, wherein the device performance parameters comprise a device performance type and an identifier uniquely corresponding to the device performance type, and the device performance type comprises at least one of the device support capability and the device model;
adding the equipment performance parameters to the broadcast information to obtain a new broadcast message;
broadcasting the broadcast message to a control terminal in the current environment;
and receiving the data sent by the control terminal according to the broadcast message to control the terminal to be controlled.
Or,
the computer readable storage medium stores one or more second programs executable by one or more processors to implement the steps of:
receiving a broadcast message sent by a terminal to be controlled;
extracting the equipment performance parameters carried in the broadcast message;
inquiring a communication mode corresponding to the equipment performance parameter from an equipment performance parameter and communication mode corresponding relation table according to the equipment performance parameter;
and controlling the terminal to be controlled according to the communication mode.
To sum up, according to the device control method, the mobile terminal and the computer-readable storage medium provided by the present invention, the device performance parameter and the broadcast information of the terminal to be controlled in the current environment are obtained, the device performance parameter is added to the broadcast information to obtain a new broadcast message, the broadcast message is broadcast to the control terminal in the current environment, and the control terminal obtains the communication mode corresponding to the device performance from the broadcast message by obtaining the broadcast message, and then the control terminal directly controls the terminal to be controlled according to the communication mode The interactive control is realized in a targeted manner, the temporary control efficiency among different devices is improved, and the control interactive use experience of the user on the terminal is also improved.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. An equipment control method is applied to an intelligent home system and is characterized by comprising the following steps:
acquiring equipment performance parameters and broadcast information of a terminal to be controlled in the current environment;
adding the equipment performance parameters to the broadcast information to obtain a new broadcast message;
broadcasting the broadcast message to a control terminal in the current environment;
and receiving the data sent by the control terminal according to the broadcast message to control the terminal to be controlled.
2. The device control method according to claim 1, wherein the device performance parameter includes a device performance type including at least one of a device supported capability and a device model number, and an identifier uniquely corresponding to the device performance type.
3. The device control method according to claim 2, wherein the adding the device performance parameter to the broadcast information to obtain a new broadcast message comprises:
extracting a service discovery protocol frame in the broadcast information;
dividing a custom field in the service discovery protocol frame into at least two field combinations, wherein each field combination comprises an identification field and a content field corresponding to the identification field;
and sequentially inserting the identifier and the equipment performance type corresponding to the identifier in the equipment performance parameter into an identification field and a content field in the field combination to obtain a new broadcast message.
4. The device control method according to claim 3, wherein a length field for identifying the length of the content field is further added between the identification field and the content field.
5. The device control method according to claim 3, wherein when the device capability type is a device support capability of the terminal to be controlled, the adding the device capability parameter to the broadcast information to obtain a new broadcast message comprises:
dividing a custom field in the service discovery protocol frame into an identification field and a content field corresponding to the identification field;
and sequentially inserting the identifier and the device supporting capability corresponding to the identifier into the identification field and the content field to obtain a new broadcast message.
6. The device control method according to claim 3, wherein, when the device capability type is a device support capability and a device model number of the terminal to be controlled, the sequentially inserting the identifier and the device capability type corresponding to the identifier in the device capability parameter into an identification field and a content field in the field combination comprises:
inserting the identifier and the device model corresponding to the identifier into a first field combination of the two field combinations;
sequentially inserting the identifier and device support capabilities corresponding thereto into a field combination other than a first one of the two field combinations.
7. An apparatus control method, characterized in that the method comprises:
receiving a broadcast message sent by a terminal to be controlled;
extracting the equipment performance parameters carried in the broadcast message;
inquiring a communication mode corresponding to the equipment performance parameter from an equipment performance parameter and communication mode corresponding relation table according to the equipment performance parameter;
and controlling the terminal to be controlled according to the communication mode.
8. The device control method according to claim 7, wherein the querying, according to the device performance parameter, a communication method corresponding to the device performance parameter from a device performance parameter-communication method correspondence table includes:
extracting the identifier in the device performance parameter and the device performance type;
determining a specific type of the device performance types according to the identifier;
determining a corresponding relation table between the corresponding equipment performance type and the communication mode according to the specific type;
and inquiring the communication mode corresponding to the extracted equipment performance type from the relation table.
9. A terminal comprising a processor, a memory, and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more first programs stored in the memory to implement the steps of the device control method according to any one of claims 1 to 6;
or,
the processor is configured to execute one or more second programs stored in the memory to implement the steps of the device control method according to claim 7 or 8.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores one or more first programs executable by one or more processors to implement the steps of the device control method according to any one of claims 1 to 6;
or,
the computer-readable storage medium stores one or more second programs executable by one or more processors to implement the steps of the device control method according to claim 7 or 8.
CN201810682169.8A 2018-06-27 2018-06-27 Apparatus control method, terminal and computer readable storage medium Pending CN108833233A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810682169.8A CN108833233A (en) 2018-06-27 2018-06-27 Apparatus control method, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810682169.8A CN108833233A (en) 2018-06-27 2018-06-27 Apparatus control method, terminal and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN108833233A true CN108833233A (en) 2018-11-16

Family

ID=64139132

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810682169.8A Pending CN108833233A (en) 2018-06-27 2018-06-27 Apparatus control method, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108833233A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112911086A (en) * 2021-01-29 2021-06-04 卡莱特云科技股份有限公司 Classification control method and device for batch video processing equipment
WO2021189186A1 (en) * 2020-03-23 2021-09-30 Oppo广东移动通信有限公司 Communication control method and related device thereof
CN113961064A (en) * 2021-09-13 2022-01-21 武汉灏存科技有限公司 Method, device and equipment for controlling equipment interaction based on workstation and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104243607A (en) * 2014-09-29 2014-12-24 小米科技有限责任公司 Method and device for acquiring equipment information
CN106878917A (en) * 2015-12-11 2017-06-20 比亚迪股份有限公司 The transfer control method of information, system, terminal and data acquisition unit

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104243607A (en) * 2014-09-29 2014-12-24 小米科技有限责任公司 Method and device for acquiring equipment information
CN106878917A (en) * 2015-12-11 2017-06-20 比亚迪股份有限公司 The transfer control method of information, system, terminal and data acquisition unit

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021189186A1 (en) * 2020-03-23 2021-09-30 Oppo广东移动通信有限公司 Communication control method and related device thereof
CN112911086A (en) * 2021-01-29 2021-06-04 卡莱特云科技股份有限公司 Classification control method and device for batch video processing equipment
CN112911086B (en) * 2021-01-29 2023-10-10 卡莱特云科技股份有限公司 Classification control method and device for batch video processing equipment
CN113961064A (en) * 2021-09-13 2022-01-21 武汉灏存科技有限公司 Method, device and equipment for controlling equipment interaction based on workstation and storage medium
CN113961064B (en) * 2021-09-13 2024-04-05 武汉灏存科技有限公司 Device interaction control method, device, equipment and storage medium based on workstation

Similar Documents

Publication Publication Date Title
CN111835488B (en) Method for determining mapping of antenna port and terminal
CN108777859A (en) Data processing method, terminal between mobile terminal and wearable device and storage medium
CN109857297B (en) Information processing method and terminal equipment
CN110266323B (en) Signal control circuit, terminal equipment and signal control method
CN111124569B (en) Application sharing method, electronic device and computer readable storage medium
CN110096203B (en) Screenshot method and mobile terminal
CN110020386B (en) Application page sharing method, mobile terminal and computer readable storage medium
WO2019076377A1 (en) Image viewing method and mobile terminal
CN111061404A (en) Control method and first electronic device
CN107864086B (en) Information rapid sharing method, mobile terminal and computer readable storage medium
CN111475066B (en) Background switching method of application program and electronic equipment
CN108833233A (en) Apparatus control method, terminal and computer readable storage medium
CN109683778B (en) Flexible screen control method and device and computer readable storage medium
CN107748680B (en) Kernel configuration method, terminal and computer readable storage medium
CN107688497B (en) Memory regulation and control method, equipment and computer readable storage medium
CN109062678A (en) A kind of Working mode switching method, wearable device and computer storage medium
CN107506103A (en) A kind of terminal control method, terminal and computer-readable recording medium
CN109739406B (en) File sending method and terminal
CN109257739B (en) eSIM card operation method, mobile terminal and eSIM card device
CN109219039B (en) eSIM card operation method, mobile terminal and eSIM card device
CN109089258B (en) eSIM card operation method, mobile terminal and eSIM card device
CN109121087A (en) Communication means, terminal and computer readable storage medium
CN109068317A (en) Communication means, communication processing apparatus and computer readable storage medium
CN109068370A (en) Communication means, mobile terminal and computer readable storage medium
CN111343618B (en) Display method and electronic equipment

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181116