CN112738245B - Method and device for determining equipment response information, storage medium and electronic device - Google Patents

Method and device for determining equipment response information, storage medium and electronic device Download PDF

Info

Publication number
CN112738245B
CN112738245B CN202011606331.1A CN202011606331A CN112738245B CN 112738245 B CN112738245 B CN 112738245B CN 202011606331 A CN202011606331 A CN 202011606331A CN 112738245 B CN112738245 B CN 112738245B
Authority
CN
China
Prior art keywords
equipment
response information
target
control instruction
subscribing
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.)
Active
Application number
CN202011606331.1A
Other languages
Chinese (zh)
Other versions
CN112738245A (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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202011606331.1A priority Critical patent/CN112738245B/en
Publication of CN112738245A publication Critical patent/CN112738245A/en
Application granted granted Critical
Publication of CN112738245B publication Critical patent/CN112738245B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • 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/55Push-based network services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The invention discloses a method and a device for determining equipment response information, a storage medium and an electronic device, wherein the method comprises the following steps: acquiring equipment response information after the target equipment executes the equipment control instruction, wherein the equipment control instruction is generated by a service system, and the equipment response information is used for indicating the target equipment to execute an execution result of the equipment control instruction; the device response information is subscribed in a thread blocking mode, and the device response information is stored in a subscription server, wherein the thread blocking mode is used for subscribing the device response information corresponding to different target devices, namely, the original asynchronous control thought of the target devices is synchronized through subscription of the device response information, so that the problem of overhigh system complexity caused by asynchronous control of the devices in the related technology is solved, the more complex asynchronous control process is omitted, a more reasonable device response service combination is provided, and the execution efficiency of control instructions among the target devices is improved.

Description

Method and device for determining equipment response information, storage medium and electronic device
Technical Field
The present invention relates to the field of communications, and in particular, to a method and an apparatus for determining device response information, a storage medium, and an electronic apparatus.
Background
In recent years, with the development of intelligent household appliances, the number of intelligent devices is increased, and communication scenes from a terminal to a terminal are more and more, such as screen sharing between a mobile phone and a smart device with a screen, data transmission between the two mobile phones, and the like.
At present, most of devices are in asynchronous control, namely the device control is divided into two parts of command sending and response. In this case, the provided API (Application Programming Interface, abbreviated as API) is generally divided into two parts, namely, sending under command and pushing in response, and fig. 1 is a schematic control flow diagram of controlling a device through a device command in the related art; fig. 2 is a flowchart of response reporting after the device command is executed in the related art, and it can be seen that command issuing and response reporting of the device are performed in a segmented manner, and at least 2 to 3 system processing device responses are added by using an asynchronous control IOT (Internet of Things, IOT for short). And each peripheral service system needs to add secondary system processing equipment to respond, so that the complexity of the system is increased, the complexity of the equipment control system is high, and the control of the IOT equipment in a large range is not facilitated.
In the related art, no effective solution has been proposed for the problem of too high system complexity caused by asynchronous control of devices.
Disclosure of Invention
The embodiment of the invention provides a method and a device for determining equipment response information, a storage medium and an electronic device, which at least solve the problems of the related art and the overhigh system complexity caused by asynchronous control of equipment in the related art.
According to an aspect of the embodiments of the present invention, a method for determining device response information is provided, including: acquiring device response information after target equipment executes a device control instruction, wherein the device control instruction is generated by a service system, and the device response information is used for indicating the target equipment to execute an execution result of the device control instruction; and subscribing the equipment response information in a thread blocking mode, and storing the equipment response information in a subscription server, wherein the thread blocking mode is used for subscribing the equipment response information corresponding to different target equipment.
In an exemplary embodiment, subscribing to the device answer information in a thread blocking manner includes: acquiring identification information of target equipment in the equipment control instruction, wherein the identification information is used for indicating a trigger condition for subscribing the equipment response information; under the condition that the triggering condition indicated by the identification information is met, performing pause determination on the equipment response information in a thread blocking mode to obtain a pause result; and subscribing the equipment response information according to the pause result.
In an exemplary embodiment, acquiring device response information after the target device executes the device control instruction includes: acquiring an execution result of a target device executing a device control instruction; converting the execution result into target response information according to a preset protocol rule; and adding the identification information of the target equipment and the serial number of the equipment control instruction into the target response information to obtain the equipment response information after the target equipment executes the equipment control instruction.
In an exemplary embodiment, after storing the device answer information in a subscription server, the method further comprises: sending the equipment response information which is subscribed successfully to a service system of the target equipment; analyzing the equipment response information in the service system to determine an analysis result; and determining a control result of the target equipment executing the equipment control instruction according to the analysis result.
In an exemplary embodiment, before obtaining the device response information after the target device executes the device control instruction, the method further includes: acquiring an application program interface of a preset protocol of the target equipment; assembling the equipment control command at the application program interface to obtain an assembly result; and converting the assembling result into an equipment control instruction according to the preset protocol.
According to another aspect of the embodiments of the present invention, there is also provided an apparatus for determining device response information, including: the device response information is used for indicating the target device to execute the execution result of the device control instruction; and the subscription module is used for subscribing the equipment response information in a thread blocking mode and storing the equipment response information in a subscription server, wherein the thread blocking mode is used for subscribing the equipment response information corresponding to different target equipment.
In an exemplary embodiment, the subscription module is further configured to acquire identification information of a target device in the device control instruction, where the identification information is used to indicate a trigger condition for subscribing to the device response information; under the condition that the triggering condition indicated by the identification information is met, performing pause determination on the equipment response information in a thread blocking mode to obtain a pause result; and subscribing the equipment response information according to the pause result.
In an exemplary embodiment, the obtaining module is further configured to obtain an execution result of the target device executing the device control instruction; converting the execution result into target response information according to a preset protocol rule; and adding the identification information of the target equipment and the serial number of the equipment control instruction into the target response information to obtain the equipment response information after the target equipment executes the equipment control instruction.
In an exemplary embodiment, the apparatus further includes: the analysis module is used for sending the equipment response information which is successfully subscribed to the service system of the target equipment; analyzing the equipment response information in the service system to determine an analysis result; and determining a control result of the target equipment for executing the equipment control instruction according to the analysis result.
In an exemplary embodiment, the apparatus further includes: the assembly module is used for acquiring an application program interface of a preset protocol of the target equipment; assembling the equipment control command at the application program interface to obtain an assembly result; and converting the assembling result into an equipment control instruction according to the preset protocol.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the method for determining the device response information when the computer program runs.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for determining the device response information through the computer program.
In the embodiment of the invention, equipment response information after target equipment executes an equipment control instruction is obtained, wherein the equipment control instruction is generated by a service system, and the equipment response information is used for indicating the target equipment to execute an execution result of the equipment control instruction; the device response information is subscribed in a thread blocking mode, and the device response information is stored in the subscription server, wherein the thread blocking mode is used for subscribing the device response information corresponding to different target devices, namely, the original asynchronous control thought of the target devices is synchronized through subscribing the device response information, the problem of overhigh system complexity caused by the asynchronous control of the devices in the related technology is solved, and further, the user can greatly facilitate the determination and use of the device response information, the experience feeling of the user is improved, the more complex asynchronous control process is omitted, a more reasonable device response service combination is provided, and the execution efficiency of control instructions among the target devices is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a schematic control flow diagram of a related art device controlled by a device command;
fig. 2 is a flowchart of response reporting after the device command execution in the related art is completed;
fig. 3 is a block diagram of a hardware configuration of a computer terminal of a method for determining device response information according to an embodiment of the present invention;
fig. 4 is a flowchart of a method of determining device reply information according to an embodiment of the present invention;
FIG. 5 is a flow diagram of a synchronous control device synchronizing asynchronous behavior of devices in accordance with an alternative embodiment of the present invention;
FIG. 6 is a timing diagram of device synchronization control according to an alternative embodiment of the present invention;
fig. 7 is a block diagram of a configuration of an apparatus for determining device response information according to an embodiment of the present invention.
Detailed Description
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method provided by the embodiment of the application can be executed in a computer terminal, a device terminal or a similar operation device. Taking the example of the method running on a computer terminal, fig. 3 is a block diagram of a hardware structure of the computer terminal of the method for determining device response information according to the embodiment of the present invention. As shown in fig. 3, the computer terminal may include one or more (only one shown in fig. 3) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and in an exemplary embodiment, may further include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 3 is only an illustration and is not intended to limit the structure of the computer terminal. For example, the computer terminal may also include more or fewer components than shown in FIG. 3, or have a different configuration with equivalent functionality to that shown in FIG. 3 or more functionality than that shown in FIG. 3.
The memory 104 may be used to store a computer program, for example, a software program and a module of application software, such as a computer program corresponding to the method for determining the device response information in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to a computer terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
In this embodiment, a method for determining device response information is provided, and fig. 4 is a flowchart of a method for determining device response information according to an embodiment of the present invention, where the flowchart includes the following steps:
step S202, obtaining device response information after the target device executes the device control instruction, wherein the device control instruction is generated by the service system, and the device response information is used for indicating the target device to execute the execution result of the device control instruction;
step S204, subscribing the equipment response information in a thread blocking mode, and storing the equipment response information in a subscription server, wherein the thread blocking mode is used for subscribing the equipment response information corresponding to different target equipment.
Through the steps, equipment response information after the target equipment executes the equipment control instruction is obtained, wherein the equipment control instruction is generated by the service system, and the equipment response information is used for indicating the target equipment to execute the execution result of the equipment control instruction; the device response information is subscribed in a thread blocking mode, and the device response information is stored in the subscription server, wherein the thread blocking mode is used for subscribing the device response information corresponding to different target devices, namely, the original asynchronous control thought of the target devices is synchronized through subscribing the device response information, the problem of overhigh system complexity caused by the asynchronous control of the devices in the related technology is solved, and further, the user can greatly facilitate the determination and use of the device response information, the experience feeling of the user is improved, the more complex asynchronous control process is omitted, a more reasonable device response service combination is provided, and the execution efficiency of control instructions among the target devices is improved.
In an exemplary embodiment, subscribing to the device answer information in a thread blocking manner includes: acquiring identification information of target equipment in the equipment control instruction, wherein the identification information is used for indicating a trigger condition for subscribing the equipment response information; under the condition that the triggering condition indicated by the identification information is met, performing pause determination on the equipment response information in a thread blocking mode to obtain a pause result; and subscribing the equipment response information according to the pause result.
In short, to ensure fast subscription of device response information of a target device, when a device control instruction is issued, the control instruction carries identification information of the target device, and a trigger condition for subscribing the device response information can be determined according to the identification information, where the trigger condition is a subscription condition preset according to a device control requirement and a target object requirement and used for indicating subscription of the device response information, and when the subscription condition is satisfied, the device response information is subscribed in a thread blocking manner.
In an exemplary embodiment, acquiring device response information after the target device executes the device control instruction includes: acquiring an execution result of a target device executing a device control instruction; converting the execution result into target response information according to a preset protocol rule; and adding the identification information of the target equipment and the serial number of the equipment control instruction into the target response information to obtain the equipment response information after the target equipment executes the equipment control instruction.
Because the execution result of the control target device is represented by the device-aware instruction, in order to facilitate confirmation of the execution result of the device control instruction, the execution result needs to be converted into target response information according to a protocol rule of a device gateway connected to the target device, and the identification information of the target device and the serial number of the device control instruction are added to the target response information, so that the execution result corresponding to the corresponding device control instruction can be quickly confirmed after the target device performs multiple controls.
In an exemplary embodiment, after storing the device answer information in a subscription server, the method further comprises: sending the equipment response information successfully subscribed to the service system of the target equipment; analyzing the equipment response information in the service system to determine an analysis result; and determining a control result of the target equipment for executing the equipment control instruction according to the analysis result.
In short, in order to make the device response information obtained by the service system more explicit, the device response information is parsed and arranged by the service system to obtain a control result that can be displayed on the terminal or other display devices.
In an exemplary embodiment, before obtaining the device response information after the target device executes the device control instruction, the method further includes: acquiring an application program interface of a preset protocol of the target equipment; assembling the equipment control command at the application program interface to obtain an assembly result; and converting the assembling result into an equipment control instruction according to the preset protocol.
That is to say, in order to improve the control efficiency of the target device, at the application program interface, the control command with relevance may be assembled and converted into a corresponding device control instruction according to the relevance of the issued control command and the configuration protocol output by the interface.
In order to better understand the technical solutions of the embodiments and the alternative embodiments of the present invention, the following explains the flow of the method for determining the device response information with reference to the example, but is not limited to the technical solutions of the embodiments of the present invention.
In an optional embodiment of the invention, a method for synchronously controlling IOT intelligent equipment is provided, and the thought of the original asynchronous control of the equipment is synchronized by using java locks, threads and kafka technology, so that more reasonable API and service combination is provided for upper-layer services.
As an alternative embodiment, the key technologies of the synchronization control device are as follows:
1) And the JAVA lock uses the JAVA object lock, waits for the equipment response message, and releases the object lock if the equipment response message is received or the time is out.
2) JAVA THREAD, which issues device control using the JAVA THREAD technology.
3) And the JAVA thread pool executes the threads by using the JAVA executer Service.
4) And the KAFKA message platform sends the equipment response message to the KAFKA, the equipment subscribes the message after issuing control, and if the message of the current control is received, the equipment control is successful.
Fig. 5 is a flowchart of a synchronization control device for synchronizing asynchronous behaviors of devices according to an alternative embodiment of the present invention, where the flowchart is divided into three parts:
first section S502: equipment asynchronous control, namely starting a thread by using an execution Service and asynchronously issuing a command to an equipment gateway; the equipment gateway analyzes the data and converts the data into an instruction of the equipment according to a protocol; the equipment gateway transmits the equipment instruction to the equipment according to the protocol; the equipment receives an equipment instruction;
second part S504: the equipment responds to the message to the KAFKA server, and the equipment starts to execute the equipment instruction after receiving the instruction; after the equipment executes the instruction, sending a response to the equipment gateway; the equipment gateway analyzes the response according to the protocol; sending a response to the message platform;
third portion S506: subscribing the equipment control response message and receiving the response of equipment control; according to the response result, sending the result of the current control;
optionally, fig. 6 is a timing diagram of device synchronization control according to an alternative embodiment of the present invention;
from the system architecture level, the synchronous device control basically relates to six systems, i.e., a service system (preferably, a system that can use an IOT service), an M2M (Machine to Machine, abbreviated as M2M) API (device access service entry that provides a common interface for device access), an M2M channel (responsible for addressing of devices and caching of real-time data of devices), a device gateway (responsible for device access, maintaining of device state and secure access of devices), devices (devices that conform to the IOT access specification), KAFKA (an open source streaming message platform developed by the Apache software foundation, a high throughput distributed subscription message system), and so on.
Specifically, after the M2M API completes the device command assembly, the device command is asynchronously sent to the M2M channel, the device command reaches the device gateway through the M2M channel, and the device gateway converts the command into a device cognitive command according to a protocol and sends the device cognitive command to the device. After the equipment executes the instruction, the equipment sends a response to the equipment gateway, the equipment gateway receives the response and then assembles a message to send to the M2M channel, and the response message is sent to the KAFKA server through the M2M channel. And the M2M API blocks the current thread, subscribes the equipment response message, and after receiving the equipment response message, arranges the response result and sends the response result to the service system.
It should be noted that the difficulty of asynchronous to synchronous conversion lies in system decoupling and QOS (quality of service, QOS for short), and the optional embodiment of the present invention adopts KAFKA middleware, publishing and subscribing message decoupling devices, device gateways, M2M channels and M2M APIs for decoupling at the system level, thereby reducing the complexity of the system, and furthermore, QOS can be configured on KAFAK.
Through the embodiment, the complexity and the cost of the system are reduced by adding a link of issuing and subscribing the message, the QOS of the message needs to be confirmed in the message link, the accurate arrival of the message is ensured, the problem of overhigh system complexity caused by equipment asynchronous control in the related technology is solved, the user can greatly determine and use the equipment response information, the experience feeling of the user is improved, the more complicated asynchronous control process is omitted, more reasonable equipment response service combination is provided, and the execution efficiency of the control instruction between target equipment is improved.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method according to the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention or portions thereof contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a device for determining device response information is further provided, where the device is used to implement the foregoing embodiments and preferred embodiments, and details are not repeated for what has been described. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 7 is a block diagram of a configuration of an apparatus for determining device response information according to an embodiment of the present invention, as shown in fig. 7, the apparatus includes:
an obtaining module 72, configured to obtain device response information after a target device executes a device control instruction, where the device control instruction is generated by a service system, and the device response information is used to instruct the target device to execute an execution result of the device control instruction;
and a subscribing module 74, configured to subscribe the device response information in a thread blocking manner, and store the device response information in a subscription server, where the thread blocking manner is used to subscribe the device response information corresponding to different target devices.
By the technical scheme, equipment response information after the target equipment executes the equipment control instruction is obtained, wherein the equipment control instruction is generated by the service system, and the equipment response information is used for indicating the target equipment to execute the execution result of the equipment control instruction; the device response information is subscribed in a thread blocking mode, and the device response information is stored in the subscription server, wherein the thread blocking mode is used for subscribing the device response information corresponding to different target devices, namely, the original asynchronous control thought of the target devices is synchronized through subscribing the device response information, the problem of overhigh system complexity caused by the asynchronous control of the devices in the related technology is solved, and further, the user can greatly facilitate the determination and use of the device response information, the experience feeling of the user is improved, the more complex asynchronous control process is omitted, a more reasonable device response service combination is provided, and the execution efficiency of control instructions among the target devices is improved.
In an exemplary embodiment, the subscription module is further configured to acquire identification information of a target device in the device control instruction, where the identification information is used to indicate a trigger condition for subscribing to the device response information; under the condition that the triggering condition indicated by the identification information is met, performing pause determination on the equipment response information in a thread blocking mode to obtain a pause result; and subscribing the equipment response information according to the pause result.
In short, to ensure fast subscription of device response information of a target device, when a device control instruction is issued, the control instruction carries identification information of the target device, and a trigger condition for subscribing the device response information can be determined according to the identification information, where the trigger condition is a subscription condition preset according to a device control requirement and a target object requirement and used for indicating subscription of the device response information, and when the subscription condition is satisfied, the device response information is subscribed in a thread blocking manner.
In an exemplary embodiment, the obtaining module is further configured to obtain an execution result of the target device executing the device control instruction; converting the execution result into target response information according to a preset protocol rule; and adding the identification information of the target equipment and the serial number of the equipment control instruction into the target response information to obtain the equipment response information after the target equipment executes the equipment control instruction.
Because the execution result of the control target device is represented by the device-aware instruction, in order to facilitate the confirmation of the execution result of the device control instruction, the execution result needs to be converted into target response information according to the protocol rule of the device gateway connected to the target device, and the identification information of the target device and the serial number of the device control instruction are added to the target response information, so that the execution result corresponding to the corresponding device control instruction can be quickly confirmed after the target device performs multiple controls.
In an exemplary embodiment, the apparatus further comprises: the analysis module is used for sending the equipment response information which is successfully subscribed to the service system of the target equipment; analyzing the equipment response information in the service system to determine an analysis result; and determining a control result of the target equipment executing the equipment control instruction according to the analysis result.
In short, in order to make the device response information obtained by the service system more explicit, the device response information is parsed and arranged by the service system to obtain a control result that can be displayed on the terminal or other display devices.
In an exemplary embodiment, the apparatus further comprises: the assembling module is used for acquiring an application program interface of a preset protocol of the target equipment; assembling the equipment control command at the application program interface to obtain an assembly result; and converting the assembly result into an equipment control instruction according to the preset protocol.
That is, in order to improve the control efficiency of the target device, at the application program interface, the control command with relevance may be assembled and converted into a corresponding device control instruction according to the relevance of the issued control command and the configuration protocol output by the interface.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are located in different processors in any combination.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring equipment response information after target equipment executes an equipment control instruction, wherein the equipment control instruction is generated by a service system, and the equipment response information is used for indicating the target equipment to execute an execution result of the equipment control instruction;
s2, subscribing the equipment response information in a thread blocking mode, and storing the equipment response information in a subscription server, wherein the thread blocking mode is used for subscribing the equipment response information corresponding to different target equipment.
An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
In an exemplary embodiment, the computer readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention further provide an electronic device, comprising a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
In an exemplary embodiment, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
In an exemplary embodiment, the processor may be configured to perform the following steps by a computer program:
s1, acquiring equipment response information after target equipment executes an equipment control instruction, wherein the equipment control instruction is generated by a service system, and the equipment response information is used for indicating the target equipment to execute an execution result of the equipment control instruction;
s2, subscribing the equipment response information in a thread blocking mode, and storing the equipment response information in a subscription server, wherein the thread blocking mode is used for subscribing the equipment response information corresponding to different target equipment.
It will be apparent to those skilled in the art that the various modules or steps of the invention described above may be implemented using a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and they may be implemented using program code executable by the computing devices, such that they may be stored in a memory device and executed by the computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into various integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A method for determining device response information, comprising:
acquiring equipment response information after target equipment executes an equipment control instruction, wherein the equipment control instruction is generated by a service system, and the equipment response information is used for indicating the target equipment to execute an execution result of the equipment control instruction;
subscribing the equipment response information in a thread blocking mode, and storing the equipment response information in a subscription server, wherein the thread blocking mode is used for subscribing the equipment response information corresponding to different target equipment;
wherein subscribing to the device response information in a thread blocking manner includes: acquiring identification information of target equipment in the equipment control instruction, wherein the identification information is used for indicating a trigger condition for subscribing the equipment response information; under the condition that the triggering condition indicated by the identification information is met, performing pause determination on the equipment response information in a thread blocking mode to obtain a pause result; the trigger condition is a preset subscription condition for indicating subscription equipment to answer information according to equipment control requirements and target object requirements; and subscribing the equipment response information according to the pause result.
2. The method of claim 1, wherein obtaining the device response information after the target device executes the device control command comprises:
acquiring an execution result of a target device executing a device control instruction;
converting the execution result into target response information according to a preset protocol rule;
and adding the identification information of the target equipment and the serial number of the equipment control instruction into the target response information to obtain the equipment response information after the target equipment executes the equipment control instruction.
3. The method of claim 1, wherein the device reply information is stored at a subscription server, and wherein the method further comprises:
sending the equipment response information successfully subscribed to the service system of the target equipment;
analyzing the equipment response information in the service system to determine an analysis result;
and determining a control result of the target equipment executing the equipment control instruction according to the analysis result.
4. The method of claim 1, wherein before obtaining the device response information after the target device executes the device control command, the method further comprises:
acquiring an application program interface of a preset protocol of the target equipment;
assembling a device control command at the application program interface to obtain an assembly result;
and converting the assembling result into an equipment control instruction according to the preset protocol.
5. An apparatus for determining device response information, comprising:
the device response information is used for indicating the target device to execute the execution result of the device control instruction;
the subscription module is used for subscribing the equipment response information in a thread blocking mode and storing the equipment response information in a subscription server, wherein the thread blocking mode is used for subscribing the equipment response information corresponding to different target equipment;
wherein subscribing to the device response information in a thread blocking manner includes: acquiring identification information of target equipment in the equipment control instruction, wherein the identification information is used for indicating a trigger condition for subscribing the equipment response information; under the condition that the triggering condition indicated by the identification information is met, performing pause determination on the equipment response information in a thread blocking mode to obtain a pause result; the trigger condition is a preset subscription condition for indicating subscription equipment to answer information according to equipment control requirements and target object requirements; and subscribing the equipment response information according to the pause result.
6. The apparatus according to claim 5, wherein the obtaining module is further configured to obtain an execution result of the target device executing the device control instruction; converting the execution result into target response information according to a preset protocol rule; and adding the identification information of the target equipment and the serial number of the equipment control instruction into the target response information to obtain the equipment response information after the target equipment executes the equipment control instruction.
7. A computer-readable storage medium, comprising a stored program, wherein the program is operable to perform the method of any of claims 1 to 4.
8. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 4 by means of the computer program.
CN202011606331.1A 2020-12-28 2020-12-28 Method and device for determining equipment response information, storage medium and electronic device Active CN112738245B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011606331.1A CN112738245B (en) 2020-12-28 2020-12-28 Method and device for determining equipment response information, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011606331.1A CN112738245B (en) 2020-12-28 2020-12-28 Method and device for determining equipment response information, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN112738245A CN112738245A (en) 2021-04-30
CN112738245B true CN112738245B (en) 2023-03-28

Family

ID=75610092

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011606331.1A Active CN112738245B (en) 2020-12-28 2020-12-28 Method and device for determining equipment response information, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN112738245B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109094611A (en) * 2018-09-30 2018-12-28 湖南中车时代通信信号有限公司 A kind of device and method for improving analogue system transponder message and sending precision
CN111143061A (en) * 2019-12-18 2020-05-12 海尔优家智能科技(北京)有限公司 Multi-device linkage control method and device and storage medium
CN111182065A (en) * 2019-12-30 2020-05-19 深圳奇迹智慧网络有限公司 Message processing method and device based on MQTT protocol and computer equipment
CN111212085A (en) * 2020-01-16 2020-05-29 厦门网宿有限公司 Internet of things platform synchronous calling method, Internet of things system and network equipment
CN111224768A (en) * 2020-03-27 2020-06-02 广东博智林机器人有限公司 Response simulation method, device, equipment and computer readable storage medium
CN111866072A (en) * 2020-06-10 2020-10-30 烽火通信科技股份有限公司 Message filter expansion method, application system and application method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109094611A (en) * 2018-09-30 2018-12-28 湖南中车时代通信信号有限公司 A kind of device and method for improving analogue system transponder message and sending precision
CN111143061A (en) * 2019-12-18 2020-05-12 海尔优家智能科技(北京)有限公司 Multi-device linkage control method and device and storage medium
CN111182065A (en) * 2019-12-30 2020-05-19 深圳奇迹智慧网络有限公司 Message processing method and device based on MQTT protocol and computer equipment
CN111212085A (en) * 2020-01-16 2020-05-29 厦门网宿有限公司 Internet of things platform synchronous calling method, Internet of things system and network equipment
CN111224768A (en) * 2020-03-27 2020-06-02 广东博智林机器人有限公司 Response simulation method, device, equipment and computer readable storage medium
CN111866072A (en) * 2020-06-10 2020-10-30 烽火通信科技股份有限公司 Message filter expansion method, application system and application method

Also Published As

Publication number Publication date
CN112738245A (en) 2021-04-30

Similar Documents

Publication Publication Date Title
US11700540B2 (en) Method and device for monitoring network data
CN107295609B (en) Network slice processing method and device, terminal and base station
CN111865736B (en) Equipment control method and device
US20230038071A1 (en) Resource configuration method and apparatus, device, and storage medium
CN112671904B (en) Method and device for transmitting equipment state information, storage medium and electronic device
CN111885115A (en) Equipment binding change method and device
CN112423322B (en) Model information sending method, device, storage medium and electronic device
CN112566078A (en) Device connection method and apparatus, storage medium, and electronic apparatus
CN112804675A (en) Wireless communication core network and method for analyzing movement of user equipment therein
CN113285810B (en) Target equipment login method and device, storage medium and electronic device
CN106452828A (en) Provision protocol transmission-based terminal configuration method and system
CN111277599B (en) Remote call processing method and device
CN112738245B (en) Method and device for determining equipment response information, storage medium and electronic device
CN111884938A (en) Router information acquisition method and device
CN107466018B (en) Data transmission method of terminal equipment and terminal equipment
CN111385110B (en) Network management method and device
CN115915106A (en) Data subscription method, device and network element
CN107147694B (en) Information processing method and device
CN112671915A (en) Message pushing processing method and intelligent device
WO2024078400A1 (en) Model request method and apparatus, communication device, and readable storage medium
CN112333735B (en) Time slot interval adjusting method and communication device
CN112203236B (en) Data transmission method and device
CN117202162A (en) Information transmission method and device, storage medium and electronic device
CN117518853A (en) Control method and device of intelligent equipment and intelligent home system
CN117440516A (en) Service self-adaptive configuration method, device, electronic equipment and computer storage medium

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