WO2020143013A1 - Method and apparatus for processing query request, computer device and storage medium - Google Patents

Method and apparatus for processing query request, computer device and storage medium Download PDF

Info

Publication number
WO2020143013A1
WO2020143013A1 PCT/CN2019/071277 CN2019071277W WO2020143013A1 WO 2020143013 A1 WO2020143013 A1 WO 2020143013A1 CN 2019071277 W CN2019071277 W CN 2019071277W WO 2020143013 A1 WO2020143013 A1 WO 2020143013A1
Authority
WO
WIPO (PCT)
Prior art keywords
shadow
information
resource
query request
type
Prior art date
Application number
PCT/CN2019/071277
Other languages
French (fr)
Chinese (zh)
Inventor
唐海
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to CN201980002760.7A priority Critical patent/CN110753921B/en
Priority to PCT/CN2019/071277 priority patent/WO2020143013A1/en
Publication of WO2020143013A1 publication Critical patent/WO2020143013A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines

Definitions

  • the present application relates to the field of Internet of Things technology, and in particular, to a query request processing method, device, computer equipment, and storage medium.
  • intelligent household appliances begin to enter the lives of ordinary residents, and intelligent household appliances can be divided into ordinary devices (Normal Devices, ND) and resource-constrained devices (Resource Constrained Device, RCD).
  • Ordinary equipment refers to equipment with strong capabilities in processing speed, continuous work, networking, etc.
  • Resource-restricted equipment is relatively lacking in hardware resources compared to ordinary equipment, resulting in poor business processing capabilities and endurance.
  • Resource-constrained devices may periodically go to sleep (saving power) in the network, or fail to process large numbers of business requests in real time.
  • a device identical to the RCD can be generated on the router or cloud and other devices according to the RCD resource backup, that is, the shadow device (shadow device), which can fully represent the shadow device
  • the shadow device receives the control request or response message of the third-party device, and the shadow device and the RCD keep the resources synchronized.
  • the configuration terminal configures the RCD (light) as a shadow device
  • Light can complete the registration process of the shadow device on the cloud platform, and complete the resource synchronization between light and light shadow device during the registration process.
  • the third-party device modifies the state of light shadow device, it indirectly completes the operation of light.
  • light may send the request to RCD first.
  • RCD After completing the operation of the control request, RCD returns a response message to light shadow device, light shadow device completes the modification of resources.
  • the third-party device can discover both the RCD and the shadow device, but the third-party device cannot operate the RCD and can only operate the shadow device. If the user selects the RCD, the RCD will return an error message. Unnecessary troubles for users, resulting in unintelligent human-computer interaction and reduced service quality.
  • an embodiment of the present invention provides a method for processing a query request.
  • the method includes:
  • the device query request includes a device type
  • the device query request is processed according to the device information of the shadow device.
  • the processing of the device query request according to the device information of the shadow device includes:
  • the first response message includes device information of the shadow device.
  • the device information of the shadow device includes an identification ID and/or port information of the shadow device.
  • the device information of the shadow device further includes at least one of device type, interface information, software and hardware version information, and supported languages.
  • the first response message further includes operable resource information of the shadow device.
  • the operational resource information includes at least one of a uniform resource identifier URI of the operational resource, interface information of the operational resource, and a resource type of the operational resource.
  • the method before configuring resources through the shadow device and obtaining device information of the shadow device, the method further includes:
  • the shadow device is established in the cloud, a step of configuring resources through the shadow device and acquiring device information of the shadow device is performed.
  • the processing the device query request according to the device information of the shadow device includes: discarding the device query request.
  • the processing of the device query request according to the device information of the shadow device includes: sending a second response message to a third-party device; the second response message is used to indicate the resource There are shadow devices for restricted devices.
  • the detecting whether the resource-restricted device corresponding to the device type has a shadow device includes:
  • an embodiment of the present invention provides a method for processing a query request.
  • the method includes:
  • the device query request includes a device type
  • the response message includes device information of the shadow device of the resource-restricted device corresponding to the device type.
  • the device information of the shadow device includes an identification ID and/or port information of the shadow device.
  • the device information of the shadow device further includes at least one of device type, interface information, software and hardware version information, and supported languages.
  • the reply message further includes operable resource information of the shadow device.
  • the operational resource information includes at least one of a uniform resource identifier URI of the operational resource, interface information of the operational resource, and a resource type of the operational resource.
  • an embodiment of the present invention provides a method for processing a query request.
  • the method includes:
  • the device query request includes the device type
  • the response message includes device information of the shadow device of the resource limited device corresponding to the device type.
  • the device information of the shadow device includes an identification ID and/or port information of the shadow device.
  • the device information of the shadow device further includes at least one of device type, interface information, software and hardware version information, and supported languages.
  • the reply message further includes operable resource information of the shadow device.
  • the operational resource information includes at least one of a uniform resource identifier URI of the operational resource, interface information of the operational resource, and a resource type of the operational resource.
  • an embodiment of the present invention provides an apparatus for processing a query request.
  • the apparatus includes:
  • the first receiving module is used to receive a device query request; the device query request includes a device type;
  • a detection module configured to detect whether a shadow device exists in the resource-restricted device corresponding to the device type
  • the response module is configured to process the device query request according to the device information of the shadow device if there is a shadow device in the resource-restricted device.
  • an embodiment of the present invention provides an apparatus for processing a query request.
  • the apparatus includes:
  • a second receiving module configured to receive a device query request; the device query request includes a device type;
  • the first sending module is configured to send a response message according to the device query request; the response message includes device information of the shadow device of the resource-restricted device corresponding to the device type.
  • an embodiment of the present invention provides an apparatus for processing a query request.
  • the apparatus includes:
  • the second sending module is used to send a device query request; the device query request includes a device type;
  • a third receiving module configured to receive a response message sent by the resource-restricted device corresponding to the device type and/or the shadow device of the resource-restricted device; the response message includes the resource-restricted device corresponding to the device type Device information for shadow devices.
  • an embodiment of the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, any of the above first to third aspects is implemented Item of the method.
  • an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the method according to any one of the first to third aspects above is implemented A step of.
  • An embodiment of the present application provides a query request processing method, apparatus, computer equipment, and storage medium.
  • the RCD After receiving a device query request sent by a third-party device, the RCD detects whether there is a shadow device.
  • the three-party device sends the device information of the shadow device, or does not respond, and the shadow device responds to the third-party device.
  • the RCD detects that a shadow device synchronized with its resources has been established, when processing the device query request of the third-party device, regardless of the processing method, it is based on the device information of the shadow device to the third-party device.
  • the third-party device when the third-party device performs the subsequent control process, whether the response obtained from the RCD or the shadow device is about the device information of the shadow device, the third-party device can only control the shadow device, avoiding the third-party device
  • the trouble of choosing RCD makes the human-computer interaction more intelligent and greatly improves the service quality.
  • FIG. 1 is an application environment diagram of a query request processing method provided by an embodiment
  • FIG. 2 is an internal structure diagram of a third-party device provided by an embodiment
  • FIG. 3 is a schematic diagram of a method for processing a query request provided by an embodiment
  • FIG. 4 is a schematic flowchart of a method for processing a query request according to an embodiment
  • FIG. 5 is a schematic process diagram of a method for processing a query request according to an embodiment
  • FIG. 6 is a schematic flowchart of a method for processing a query request according to an embodiment
  • FIG. 7 is a schematic flowchart of a method for processing a query request according to an embodiment
  • FIG. 8 is a schematic flowchart of a method for processing a query request according to an embodiment
  • FIG. 9 is a schematic flowchart of a query request processing method provided by an embodiment
  • FIG. 10 is a structural block diagram of a query request processing device provided by an embodiment
  • FIG. 11 is a structural block diagram of a query request processing device provided by an embodiment
  • FIG. 12 is a structural block diagram of a query request processing device provided by an embodiment
  • FIG. 13 is a structural block diagram of a query request processing device provided by an embodiment
  • FIG. 14 is a structural block diagram of an apparatus for processing a query request according to an embodiment.
  • This application provides a method for processing query requests, which can be applied to the application environment shown in FIG. 1, including resource-constrained devices (Resource, Constrained Device, RCD), shadow devices (Shadow device), and third-party devices, where , RCD, Shadow device and third-party devices can communicate with each other, and the communication method can be wireless communication, such as: WIFi, infrared communication or 3G, 4G, 5G, etc., this embodiment does not limit this.
  • the RCD may be an intelligent household appliance with limited resources, such as lamps and air conditioners, or an intelligent terminal, such as a mobile phone or a PAD.
  • the resources of the Shadow device and the resources of the RCD are completely synchronized.
  • the Shadow device can be set in the cloud or on other devices in the same local area network as the RCD.
  • the embodiment of the present application does not limit the specific type of Shadow device.
  • the third-party device may be a server or other processing devices, which is not limited in this embodiment.
  • the above server may include a processor, a memory, a network interface, and a database connected through a system bus.
  • the processor of the server is used to provide computing and control capabilities.
  • the memory of the server includes non-volatile storage media and internal memory.
  • the non-volatile storage medium stores an operating system, a computer program, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
  • the database of the server is used to query the data of the processing method of the request.
  • the server's network interface is used to communicate with other external devices through a network connection. When the computer program is executed by the processor, a query request processing method is realized.
  • the configuration device Send the address information to establish the lightshadowdevice and the necessary information to access the address information, for example: the necessary information can include the address of the cloud platform, the access token of the cloud platform (access token), the uniform resource identifier of the lightshadowdvice ( Uniform Resource Identifier (URI) and so on. That is, Mediator registers a light shadow device for light in the cloud. After the establishment is complete, all resources of light and light shadow are synchronized.
  • the third-party device sends a request to change the working state of light to light shadow device
  • light shadow device receives
  • the request is sent to light, and light changes the working state, and feeds back a completion message to light shadow device, which means that light shadow has completed the modification of light.
  • the RCD device establishes shadow device
  • there are two devices with the same resource in the network but these two devices with the same resource have different device IDs, and the operation of one of the resources produces the same Operation result.
  • the RCD establishes the shadow device, generally only the shadow device needs to interact with the third party, which means that the third party should not directly operate the RCD.
  • third-party devices cannot access any resources of the RCD.
  • the third-party devices can discover both the RCD device and the shadow device, but they can only operate the shadow device and cannot operate the RCD device. If the user selects the RCD and performs the operation, the RCD will return an error message. Based on this, the embodiments of the present application provide a query request processing method, device, computer device, and storage medium, which are designed to solve the above-mentioned shadow established in the RCD. After device, the third-party device can discover both RCD and Shadow device, but the third-party device cannot operate RCD, only the shadow device. If the user selects RCD, the RCD will return an error message, bringing unnecessary Trouble, resulting in unintelligent human-computer interaction, which reduces the technical problems of service quality.
  • the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below through the embodiments and the accompanying drawings.
  • the following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
  • the execution bodies in FIG. 4 and FIG. 7 are resource-constrained devices, and the execution in FIG. 8
  • the main body is a shadow device, and the executive body of FIG. 9 is a third-party device.
  • the execution subject of each embodiment may also be a query request processing device, where the device may implement part or all of the resource update through software, hardware, or a combination of software and hardware.
  • FIG. 4 provides a method for processing a query request. This embodiment involves detecting whether a shadow device exists after receiving the device query request from the RCD, and querying a third-party device based on the detection result. The specific process of requesting a response. As shown in Figure 4, the method includes:
  • S101 Receive a device query request; the device query request includes a device type.
  • the device query request represents a request for acquiring or modifying RCD resources sent by a third-party device, where the device query request includes the device type, that is, the device type including the RCD.
  • the third-party device may be a terminal device, such as a mobile phone, a PAD, a personal computer, etc., or a computer device or a server, etc., which is not limited in this embodiment.
  • the way in which the third-party device sends the device query request may be to send the multicast message in the local area network where the RCD is located, or it may be another way, which is not limited in this embodiment.
  • the RCD receiving device query request may be that light receives a device query request sent by a third-party device in the local area network.
  • the shadow device indicates that a device identical to the RCD is generated on other devices according to the resource backup of the RCD.
  • the newly generated device that is, the shadow device can completely send requests and receive responses on behalf of the RCD.
  • the shadow device and RCD keep resources in sync.
  • the shadow device may be installed in the cloud or in the same local area network as the RCD, which is not limited in this embodiment.
  • the RCD can detect whether there is a shadow device by detecting whether There is information storing the shadow device. If the information of the shadow device is stored, it indicates that there is a shadow device in the RCD.
  • the device query request sent by the third-party device can only be received by the RCD corresponding to the device type carried in the request.
  • the third-party device sends multicast.
  • the RCD detects that there is a shadow device, and responds to the device query request according to the device information of the shadow device.
  • the RCD response method may be not to respond, or to return the device information of the shadow device to the third-party device, or to feed back the message that the shadow device exists to the third-party device, etc.
  • the RCD response to the third-party device may be in the form of unicast. It should be noted that the case where the RCD does not respond is based on the fact that the RCD and the corresponding shadow device are located in the same local area network. Because the shadow device also receives the device query request sent by the third-party device, in this case, the shadow device It will return its own device information to the third-party device, so that the third-party device can make subsequent control requests based on the device information of the shadow device.
  • This embodiment provides a method for processing a query request. After receiving a device query request sent by a third-party device, the RCD detects whether a shadow device exists, and if so, chooses to directly send the device information of the shadow device to the third-party device or Without answering, the shadow device answers to the third-party device.
  • the RCD processes the device query request of the third-party device, no matter which processing method, it gives the third-party device the device information based on the shadow device.
  • the third-party device performs the subsequent control process, whether the response obtained from the RCD or the shadow device is about the device information of the shadow device, the third-party device can only control the shadow device, avoiding the third party
  • the device chooses the trouble of RCD, which makes the human-computer interaction more intelligent and greatly improves the service quality.
  • step S103 in the above embodiment there are three ways for the RCD to respond to the device query request sent by the third-party device according to the device information of the shadow device.
  • the three response methods are described in detail below.
  • a possible implementation manner of the above S103 includes: configuring resources through a shadow device to obtain device information of the shadow device; sending a first response message to a third-party device according to the device information of the shadow device; The first response message includes device information of the shadow device.
  • the shadow device configuration resources are used for resource-limited devices to register shadow devices and save them in the RCD.
  • RCD After detecting the existence of a shadow device, RCD first obtains the device information of the shadow device from the shadow device configuration resource, and then sends a first response message to the third-party device, where the first response message includes the device information of the shadow device, where RCD
  • the method of sending the first response message to the third-party device may be by wireless communication, such as Wi-Fi, infrared communication, or 3G, 4G, 5G, etc., which is not limited in this embodiment.
  • the device information of the shadow device includes identification ID and/or port information of the shadow device.
  • the device information of the shadow device further includes at least one of device type, interface information, software and hardware version information, and supported languages.
  • the identification ID of the shadow device represents the identity credential information of the shadow device, where the identification ID may be a number, a letter, or a combination of numbers and letters, which is not limited in this embodiment.
  • the port information represents the IP address and port address of the shadow device.
  • the device information of the shadow device may also include: device type, interface information, hardware and software version information, supported languages, etc., when the RCD sends the device information of the shadow device to the third-party device, it may be one of the above enumerations, or it may be There are many, this embodiment does not limit this.
  • the RCD can obtain the shadow device ID, port information (IP address+port) through the shadow device configuration resource, and may also carry the device type, interface information, software and hardware version information, supported language, and other information of the shadow device .
  • the above-mentioned first response message further includes operable resource information of the shadow device.
  • the operational resource information includes at least one of a uniform resource identifier URI of the operational resource, interface information of the operational resource, and a resource type of the operational resource.
  • the first response message includes the operable resource information of the shadow device, for example: the URI of the operable resource, the interface information of the operable resource and the resource type of the operable resource, etc., where URI represents the character of the resource name, It can be a number, a letter, or a combination of numbers and letters, which is not limited in this embodiment.
  • another implementable manner of the foregoing S103 includes: discarding the device query request.
  • the RCD after detecting the presence of a shadow device, discards the device query request, which means that it does not respond to the device query request of the third-party device.
  • another possible implementation manner of the foregoing S103 includes: sending a second response message to a third-party device; the second response message is used to indicate that the resource-restricted device has a shadow device.
  • the RCD sends a second response message to the third-party device, where the second response message is used to indicate that there is a shadow device in the RCD, and the way in which the RCD sends the second response message to the third-party device may be through wireless communication Sending by way of, such as Wi-Fi, infrared communication or 3G, 4G, 5G, etc., this embodiment does not limit this.
  • the second response message here is just a message indicating that there is a shadow device, and does not contain any information of the shadow device.
  • FIG. 5 it is a complete schematic diagram of the three RCD devices responding to the third-party device provided in this embodiment.
  • this schematic diagram it is set that the RCD has created a shadow device, and both the RCD and the shadow device are in In the same local area network, in this way, the request sent by the third-party device in the multicast group will be received by both the RCD and the shadow device.
  • the third-party device sends a multicast device query request in the local area network. For example, if the RCD is "light”, the request sent by the third-party device is a device discovery request to obtain a "light” type device.
  • the inspection method is, for example, to detect whether there is a shadow device configuration resource itself, and if so, to detect the parameters of the shadow device configuration resource: the shadow device generates an indication bit. If the indication bit is true, it indicates that the device has a shadow device, and vice versa There is no shadow device. If there is a shadow device, the shadow device ID and port information can be obtained through the shadow device configuration resource. It may also carry the device type of the shadow device, device interface information, software and hardware version information, and language support information.
  • the port information includes the device's transmission protocol (such as coaps+TCP, coaps, etc.), IP address, and port number. It is also possible to obtain operational resource information corresponding to the shadow device.
  • the operable resource information may include: URI of operable resource, interface information of operable resource, resource type of operable resource, etc.
  • the RCD After the RCD determines that it has a shadow device, it can choose any of the following S3, S4, and S5 to answer the third-party device.
  • the RCD sends a first response message to the third-party device in a unicast manner, where the first response message carries the port information, ID, device type, interface information, software and hardware version information, supported language, etc. of the shadow device .
  • the RCD sends a second response message to the third-party device in a unicast manner, where the second response message is used to indicate that there is a shadow device, but the response message does not include any information of the shadow device.
  • the three RCD devices provided in the above embodiments respond to the third-party device. No matter which answering method, the third-party device receives the device information of the shadow device. In this way, when the third-party device performs the subsequent control process, Only the shadow device can be controlled, which avoids the trouble of the third-party device choosing RCD, makes the human-computer interaction more intelligent, and greatly improves the quality of service.
  • this embodiment provides a method for processing a query request. This embodiment involves It is the specific process of RCD detecting whether the shadow device is built in the cloud and responding to the third-party device according to the detection result. As shown in FIG. 6, the method further includes:
  • the RCD detects whether the shadow device is established in the cloud.
  • the RCD method for detecting the shadow device is established in the cloud may be that the RCD queries the registered address of the shadow device to belong to the address of the local area network. If it is not, it indicates that the shadow device is established In the cloud; if it is, it means that the shadow device is built in the local area network.
  • the RCD can also be determined by directly querying whether the registered address of the shadow device belongs to the cloud address. For example, it can also be established by adding a shadow device to the configuration resource.
  • the indication bit of the location determines whether the shadow device is established in the cloud according to the indication bit, which is not limited in this embodiment.
  • the RCD detects that the shadow device is established in the cloud, and the resource-constrained device configures resources through the shadow device to obtain device information of the shadow device, so as to send the first response message including the shadow device information to the third-party device.
  • This embodiment provides a method for processing a query request.
  • the RCD configures resources through the shadow device to obtain the device information of the shadow device, so as to send the device information of the shadow device to a third-party device.
  • the third-party device In order to enable the third-party device to carry out the subsequent control process according to the device information of the shadow device, it avoids the trouble of the third-party device choosing RCD, makes the human-computer interaction more intelligent, and greatly improves the service quality.
  • the RCD can either use the "send the first response message containing the shadow device information" to answer the third-party device, or it can use the "discard the request without responding.” "Or “send a second response message to a third-party device that already has a shadow device” to answer the third-party device.
  • the RCD in step S102 may be determined according to the way of configuring resource parameters when detecting whether there is a shadow device.
  • the embodiments of the present application provide a method for processing a query request, which involves the RCD according to the shadow device.
  • the specific process of generating an indication bit in the configuration resource parameter to determine whether there is a shadow device itself, as shown in FIG. 7, the above S102 includes:
  • the shadow device configuration resource is used to register a shadow device for a resource-constrained device, where the shadow device generates a parameter whose indication bit is the shadow device configuration resource, which indicates whether the shadow device exists in the RCD. It should be understood that before detecting the indication bit generated by the shadow device, the RCD first detects whether there is a shadow device configuration resource itself, and if so, detects the parameter of the shadow device configuration resource: the shadow device generates the indication bit.
  • S302 Detect whether a shadow device exists in the resource-restricted device corresponding to the device type according to the indication bit generated by the shadow device.
  • the shadow device acquired by the RCD generates an indication bit, and detects whether there is a shadow device according to the indication bit, where the detection method may be that the RCD determines whether there is a shadow device according to the display content of the indication bit, for example, RCD
  • the shadow device configuration resource is /oic/Shadow/conf as an example.
  • RCD can check the attribute of sgi (indicating bit) in the /oic/Shadow/conf resource. If sgi is true, it means there is a shadow device on the device, otherwise There is no shadow device.
  • This embodiment provides a method for processing a query request.
  • the RCD obtains the indication bit generated by the shadow device, and determines whether there is a shadow device through the indication bit, which makes the detection result of the shadow device more accurate and effectively ensures that subsequent third-party devices pass the shadow The process by which the device controls the RCD state.
  • FIG. 8 provides a method for processing a query request. This embodiment relates to a specific process in which a shadow device sends a response message after receiving a device query request sent by a third-party device. As shown in FIG. 8, the method includes:
  • S401 Receive a device query request; the device query request includes a device type.
  • the shadow device receives a device query request, and the device query request includes the device type. It should be noted here that in a method for processing a query request provided by an embodiment of the present application, due to a device sent by a third-party device When the query request is sent in the local local area in a multicast form, the premise that the shadow device can receive the device query request is that the shadow device is established in the local area network sent by the third-party device. If the shadow device is established in the cloud, the shadow device receives Unable to find the device query request.
  • the response message includes device information of the shadow device of the resource-restricted device corresponding to the device type.
  • the shadow device Based on the device query request received by the shadow device in step S401 above, the shadow device sends a reply message to the third-party device, where the reply message includes device information of the shadow device, so that subsequent third-party devices send the shadow device a shadow device based on the device information Send RCD control request.
  • the shadow device, device information, and response message have been described in the foregoing embodiment, and this embodiment will not repeat them here.
  • This embodiment provides a method for processing a query request.
  • the shadow device feeds back a response message including device information according to the received device query request sent by the third-party device.
  • the state of the RCD device can only be controlled by sending a control request to the shadow device, which avoids the trouble that the third-party device chooses RCD, makes the human-computer interaction more intelligent, and greatly improves the quality of service.
  • the device information of the shadow device includes identification ID and/or port information of the shadow device.
  • the device information of the shadow device further includes at least one of device type, interface information, software and hardware version information, and supported languages.
  • the identification ID of the shadow device represents the identity credential information of the shadow device, where the identification ID may be a number, a letter, or a combination of numbers and letters, which is not limited in this embodiment.
  • the port information represents the IP address and port address of the shadow device.
  • the device information of the shadow device may also include: device type, interface information, hardware and software version information, supported languages, etc., when the RCD sends the device information of the shadow device to the third-party device, it may be one of the above enumerations, or it may be There are many, this embodiment does not limit this.
  • the above response message also includes operable resource information of the shadow device.
  • the operational resource information includes at least one of a uniform resource identifier URI of operational resources, interface information of operational resources, and a resource type of operational resources.
  • the response message includes the operable resource information of the shadow device, for example: the URI of the operable resource, the interface information of the operable resource, and the resource type of the operable resource.
  • the URI represents the character of the resource name, which can It is a number, a letter, or a combination of numbers and letters, which is not limited in this embodiment.
  • this embodiment provides a method for processing a query request, which involves a third-party device sending a device query request, and receiving or responding to a response from the shadow device according to the device query request.
  • the method includes:
  • S501 Send a device query request; the device query request includes a device type.
  • the third-party device sends a device query request, and the device query request includes the device type.
  • the third-party device sends the device query request in the form of multicast.
  • the device query request and the third-party device have been described in the above embodiment, and this embodiment will not repeat them here.
  • S502 Receive a response message sent by a resource-restricted device corresponding to the device type and/or a shadow device of the resource-restricted device; the response message includes device information of the shadow device of the resource-restricted device corresponding to the device type .
  • the RCD and/or its shadow device corresponding to the device type carried in the request will feed back a response message to the third-party device, and the third-party device receives the response message.
  • the response message fed back by the RCD and/or its shadow device includes device information of the shadow device, and then the third-party device receives the RCD and/or its shadow device to send the response message.
  • This embodiment provides a method for processing a query request.
  • the response message sent by the corresponding RCD and/or its shadow device includes the device information of the shadow device.
  • the third-party device After receiving the device information of the shadow device, when the third-party device performs the subsequent control process, it can only control the shadow device, avoiding the trouble of the third-party device selecting the RCD, making the human-computer interaction more intelligent, and greatly improving the quality of service.
  • the device information of the shadow device includes identification ID and/or port information of the shadow device.
  • the device information of the shadow device further includes at least one of device type, interface information, software and hardware version information, and supported languages.
  • the identification ID of the shadow device represents the identity credential information of the shadow device, where the identification ID may be a number, a letter, or a combination of numbers and letters, which is not limited in this embodiment.
  • the port information represents the IP address and port address of the shadow device.
  • the device information of the shadow device may also include: device type, interface information, hardware and software version information, supported languages, etc., when the RCD sends the device information of the shadow device to the third-party device, it may be one of the above enumerations, or it may be There are many, this embodiment does not limit this.
  • the above response message also includes operable resource information of the shadow device.
  • the operational resource information includes at least one of a uniform resource identifier URI of the operational resource, interface information of the operational resource, and a resource type of the operational resource.
  • the response message includes the operable resource information of the shadow device, for example: the URI of the operable resource, the interface information of the operable resource, and the resource type of the operable resource.
  • the URI represents the character of the resource name, which can It is a number, a letter, or a combination of numbers and letters, which is not limited in this embodiment.
  • steps in the flowcharts of FIGS. 2-9 are displayed in order according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless clearly stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least some of the steps in FIGS. 2-9 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. These sub-steps or stages The execution order of is not necessarily sequential, but may be executed in turn or alternately with at least a part of other steps or sub-steps or stages of other steps.
  • an embodiment of the present application provides a query request processing apparatus, including: a first receiving module 10, a first detecting module 11, and a response module 12, wherein,
  • the first receiving module 10 is configured to receive a device query request; the device query request includes a device type;
  • the first detection module 11 is configured to detect whether there is a shadow device in the resource-restricted device corresponding to the device type;
  • the response module 12 is configured to process the device query request according to device information of the shadow device if there is a shadow device in the resource-restricted device.
  • the device for processing query requests provided by the above embodiments is similar in implementation principle and technical effect to the above method embodiments, and will not be repeated here.
  • the above-mentioned response module 12 is specifically configured to configure resources of the shadow device to obtain device information of the shadow device; send a first response message to a third-party device according to the device information of the shadow device; The first response message includes device information of the shadow device.
  • the device information of the shadow device includes an identification ID and/or port information of the shadow device.
  • the device information of the shadow device further includes at least one of device type, interface information, software and hardware version information, and supported languages.
  • the first response message further includes operable resource information of the shadow device.
  • the operational resource information includes at least one of a uniform resource identifier URI of the operational resource, interface information of the operational resource, and a resource type of the operational resource.
  • an embodiment of the present application provides an apparatus for processing a query request, the apparatus further includes: a second detection module 13, wherein,
  • the second detection module 13 is used to detect whether the shadow device is established in the cloud
  • the response module 12 is used for the step of configuring resources through the shadow device and acquiring device information of the shadow device if the shadow device is established in the cloud.
  • the device for processing query requests provided by the above embodiments is similar in implementation principle and technical effect to the above method embodiments, and will not be repeated here.
  • the above-mentioned response module 12 is also used to discard the device query request.
  • the above-mentioned response module 12 is further configured to send a second response message to a third-party device; the second response message is used to indicate that the resource-restricted device has a shadow device.
  • the first detection module 11 includes: an acquisition unit 111 and a detection unit 112, wherein,
  • the obtaining unit 111 is configured to obtain a shadow device generation indicator bit in the shadow device configuration resource parameter
  • the detecting unit 112 is configured to detect whether a shadow device exists in the resource-restricted device corresponding to the device type according to the indication bit generated by the shadow device.
  • the device for processing query requests provided by the above embodiments is similar in implementation principle and technical effect to the above method embodiments, and will not be repeated here.
  • an embodiment of the present application provides an apparatus for processing a query request, the apparatus includes: a second receiving module 14 and a first sending module 15, wherein,
  • the second receiving module 14 is configured to receive a device query request; the device query request includes a device type;
  • the first sending module 15 is configured to send a reply message according to the device query request; the reply message includes device information of the shadow device of the resource-restricted device corresponding to the device type.
  • the device for processing query requests provided by the above embodiments is similar in implementation principle and technical effect to the above method embodiments, and will not be repeated here.
  • an embodiment of the present application provides an apparatus for processing a query request, the apparatus includes: a second sending module 16 and a third receiving module 17, wherein,
  • the second sending module 16 is used to send a device query request; the device query request includes a device type;
  • the third receiving module 17 is configured to receive a response message sent by the resource limited device corresponding to the device type and/or the shadow device of the resource limited device; the response message includes the resource limited device corresponding to the device type Device information for your shadow device.
  • the device for processing query requests provided by the above embodiments is similar in implementation principle and technical effect to the above method embodiments, and will not be repeated here.
  • Each module in the above query request processing device may be implemented in whole or in part by software, hardware, or a combination thereof.
  • the above modules may be embedded in the hardware form or independent of the processor in the computer device, or may be stored in the memory in the computer device in the form of software so that the processor can call and execute the operations corresponding to the above modules.
  • a computer device is provided.
  • the computer device may be a server, and an internal structure diagram thereof may be as shown in FIG. 2 above.
  • the computer device includes a processor, memory, network interface, and database connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, a computer program, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
  • the database of the computer device is used to store the processing data of the query request.
  • the network interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, a query request processing method is realized.
  • FIG. 2 above is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied.
  • the specific computer equipment It may include more or less components than shown in the figures, or combine certain components, or have a different arrangement of components.
  • a computer device which includes a memory and a processor, and a computer program is stored in the memory, and the processor implements the following steps when the processor executes the computer program:
  • the device query request includes a device type
  • the device query request is processed according to the device information of the shadow device.
  • the processor implements the following steps when executing the computer program:
  • the query request includes the device type
  • the response message includes device information of the shadow device of the resource-restricted device corresponding to the device type.
  • the processor implements the following steps when executing the computer program:
  • the query request includes the device type
  • the response message includes device information of the shadow device of the resource limited device corresponding to the device type.
  • a computer device provided by the foregoing embodiment has similar implementation principles and technical effects as the foregoing method embodiment, and details are not described herein again.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
  • the device query request includes a device type
  • the device query request is processed according to the device information of the shadow device.
  • the query request includes the device type
  • the response message includes device information of the shadow device of the resource-restricted device corresponding to the device type.
  • the query request includes the device type
  • the response message includes device information of the shadow device of the resource limited device corresponding to the device type.
  • the computer-readable storage medium provided by the foregoing embodiment has similar implementation principles and technical effects as the foregoing method embodiment, and will not be repeated here.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous chain (Synchlink) DRAM
  • SLDRAM synchronous chain (Synchlink) DRAM
  • Rambus direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present application relates to a method and apparatus for processing a query request, a computer device and a storage medium. The method comprises: after receiving a device query request sent by a third-party device, an RCD firstly detecting whether a shadow device exists in itself, and if so, choosing to directly send device information of the shadow device to the third-party device, or not to respond, and the shadow device responding to the third-party device instead. After the RCD detects a shadow device of which resource synchronization with it has been established, when processing the request of the third-party device, no matter which processing means is used, the RCD always provides the device information of the shadow device to the third-party device, thus when performing a subsequent control process, the third-party device always acquires the device information of the shadow device no matter whether from the RCD or the shadow device, such that the third-party device can only control the shadow device, and the problem of the third-party device selecting the RCD is avoided, enabling human-computer interaction to be more intelligent, and greatly improving service quality.

Description

查询请求的处理方法、装置、计算机设备和存储介质Query request processing method, device, computer equipment and storage medium 技术领域Technical field
本申请涉及物联网技术领域,特别是涉及一种查询请求的处理方法、装置、计算机设备和存储介质。The present application relates to the field of Internet of Things technology, and in particular, to a query request processing method, device, computer equipment, and storage medium.
背景技术Background technique
随着物联网以及智能家居技术和产业的发展,智能化家用电器开始进入到普通居民的生活当中,而智能化家用电器设备可以分为普通设备(Normal Device,ND)和资源受限设备(Resource Constrained Device,RCD)。普通设备指在处理速度、持续工作、联网等方面的能力较强的设备,资源受限设备是相对于普通设备而言,其硬件资源相对匮乏,导致其业务处理能力和续航能力都较差,资源受限设备在网络中可能会周期性进入睡眠状态(节省电力)、或无法实时处理大批量的业务请求等。With the development of the Internet of Things and smart home technology and industry, intelligent household appliances begin to enter the lives of ordinary residents, and intelligent household appliances can be divided into ordinary devices (Normal Devices, ND) and resource-constrained devices (Resource Constrained Device, RCD). Ordinary equipment refers to equipment with strong capabilities in processing speed, continuous work, networking, etc. Resource-restricted equipment is relatively lacking in hardware resources compared to ordinary equipment, resulting in poor business processing capabilities and endurance. Resource-constrained devices may periodically go to sleep (saving power) in the network, or fail to process large numbers of business requests in real time.
为了保证RCD能够及时处理第三方设备的控制请求,可以根据RCD的资源备份在路由器或者云端等其它设备上生成一个与该RCD完全相同的设备,即影子设备(shadow device),shadow device可以完全代表RCD接收第三方设备的控制请求或者应答消息,并且,shadow device与RCD保持资源的同步。In order to ensure that the RCD can process the control request of the third-party device in time, a device identical to the RCD can be generated on the router or cloud and other devices according to the RCD resource backup, that is, the shadow device (shadow device), which can fully represent the shadow device The RCD receives the control request or response message of the third-party device, and the shadow device and the RCD keep the resources synchronized.
例如,配置端(Mediator)将RCD(灯(light))配置为可设置影子设备,则Light可以在云平台上完成shadow device的注册过程,在注册过程中完成light与light shadow device的资源同步。当第三方设备通过修改light shadow device的状态,间接完成对light的操作。在处理过程中,light shadow device收到第三方设备的控制请求后,有可能会先把该请求发送到RCD,RCD完成对该控制请求的操作后,向light shadow device返回应答消息后,light shadow device完成对资源的修改。For example, if the configuration terminal (Mediator) configures the RCD (light) as a shadow device, Light can complete the registration process of the shadow device on the cloud platform, and complete the resource synchronization between light and light shadow device during the registration process. When the third-party device modifies the state of light shadow device, it indirectly completes the operation of light. In the process, after receiving the control request of the third-party device, light may send the request to RCD first. After completing the operation of the control request, RCD returns a response message to light shadow device, light shadow device completes the modification of resources.
但是,在RCD建立了shadow device之后,第三方设备可以同时发现RCD和Shadow device设备,但第三方设备不可以操作RCD,仅能操作shadow device,如果用户选择了RCD,RCD就会返回错误信息,给用户带来不必要的困扰,导致人机交互不智能,降低了服务质量。However, after the RCD establishes the shadow device, the third-party device can discover both the RCD and the shadow device, but the third-party device cannot operate the RCD and can only operate the shadow device. If the user selects the RCD, the RCD will return an error message. Unnecessary troubles for users, resulting in unintelligent human-computer interaction and reduced service quality.
发明内容Summary of the invention
基于此,有必要针对上述在RCD建立了shadow device之后,第三方设备可以同时发现RCD和Shadow device设备,但第三方设备不可以操作RCD,仅能操作shadow device,如果用户选择了RCD,RCD就会返回错误信息,给用户带来不必要的困扰,导致人机交互不智能,降低了服务质量的技术问题,提供一种查询请求的处理方法、装置、计算机设备和存储介质。Based on this, it is necessary for third parties to discover RCD and Shadow devices at the same time after establishing the shadow device in the RCD, but the third party devices cannot operate RCD, only the shadow device. If the user selects RCD, RCD will An error message will be returned, causing unnecessary troubles to the user, resulting in unsmart human-computer interaction, a technical problem that reduces the quality of service, and provides a processing method, device, computer equipment, and storage medium for query requests.
第一方面,本发明的实施例提供一种查询请求的处理方法,所述方法包括:In a first aspect, an embodiment of the present invention provides a method for processing a query request. The method includes:
接收设备查询请求;所述设备查询请求包括设备类型;Receiving a device query request; the device query request includes a device type;
检测所述设备类型对应的资源受限设备是否存在影子设备;Detecting whether there is a shadow device in the resource-restricted device corresponding to the device type;
若是,则根据所述影子设备的设备信息对所述设备查询请求进行处理。If yes, the device query request is processed according to the device information of the shadow device.
在其中一个实施例中,所述根据所述影子设备的设备信息对所述设备查询请求进行处理,包括:In one of the embodiments, the processing of the device query request according to the device information of the shadow device includes:
通过影子设备配置资源,获取所述影子设备的设备信息;Configuring resources through the shadow device to obtain device information of the shadow device;
根据所述影子设备的设备信息向第三方设备发送第一应答消息;所述第一应答消息包括所述影子设备的设备信息。Send a first response message to a third-party device according to the device information of the shadow device; the first response message includes device information of the shadow device.
在其中一个实施例中,所述影子设备的设备信息包括所述影子设备的标识ID和/或端口信息。In one of the embodiments, the device information of the shadow device includes an identification ID and/or port information of the shadow device.
在其中一个实施例中,所述影子设备的设备信息还包括设备类型、接口信息、软硬件版本信息、支持语言中的至少一个。In one embodiment, the device information of the shadow device further includes at least one of device type, interface information, software and hardware version information, and supported languages.
在其中一个实施例中,所述第一应答消息还包括所述影子设备的可操作资源信息。In one of the embodiments, the first response message further includes operable resource information of the shadow device.
在其中一个实施例中,所述可操作资源信息包括可操作资源的统一资源标识符URI、可操作资源的接口信息、可操作资源的资源类型中的至少一个。In one of the embodiments, the operational resource information includes at least one of a uniform resource identifier URI of the operational resource, interface information of the operational resource, and a resource type of the operational resource.
在其中一个实施例中,所述通过影子设备配置资源,获取所述影子设备的设备信息之前,所述方法还包括:In one of the embodiments, before configuring resources through the shadow device and obtaining device information of the shadow device, the method further includes:
检测所述影子设备是否建立在云端;Detect whether the shadow device is established in the cloud;
若所述影子设备建立在云端,则执行通过影子设备配置资源,获取所述影子设备的设备信息的步骤。If the shadow device is established in the cloud, a step of configuring resources through the shadow device and acquiring device information of the shadow device is performed.
在其中一个实施例中,所述根据所述影子设备的设备信息对所述设备查询请求进行处理,包括:丢弃所述设备查询请求。In one of the embodiments, the processing the device query request according to the device information of the shadow device includes: discarding the device query request.
在其中一个实施例中,所述根据所述影子设备的设备信息对所述设备查询请求进行处理,包括:向第三方设备发送第二应答消息;所述第二应答消息用于指示所述资源受限设备存在影子设备。In one of the embodiments, the processing of the device query request according to the device information of the shadow device includes: sending a second response message to a third-party device; the second response message is used to indicate the resource There are shadow devices for restricted devices.
在其中一个实施例中,所述检测所述设备类型对应的资源受限设备是否存在影子设备,包括:In one of the embodiments, the detecting whether the resource-restricted device corresponding to the device type has a shadow device includes:
获取所述影子设备配置资源参数中的影子设备生成指示位;Obtaining a shadow device generation indicator bit in the shadow device configuration resource parameter;
根据所述影子设备生成指示位检测所述设备类型对应的资源受限设备是否存在影子设备。Detecting whether a shadow device exists in the resource-restricted device corresponding to the device type according to the indication bit generated by the shadow device.
第二方面,本发明实施例提供一种查询请求的处理方法,所述方法包括:In a second aspect, an embodiment of the present invention provides a method for processing a query request. The method includes:
接收设备查询请求;所述设备查询请求包括设备类型;Receiving a device query request; the device query request includes a device type;
根据所述设备查询请求发送应答消息;所述应答消息包括所述设备类型对应资源受限设备的影子设备的设备信息。Sending a response message according to the device query request; the response message includes device information of the shadow device of the resource-restricted device corresponding to the device type.
在其中一个实施例中,所述影子设备的设备信息包括所述影子设备的标识ID和/或端口信息。In one of the embodiments, the device information of the shadow device includes an identification ID and/or port information of the shadow device.
在其中一个实施例中,所述影子设备的设备信息还包括设备类型、接口信息、软硬件版本信息、支持语言中的至少一个。In one embodiment, the device information of the shadow device further includes at least one of device type, interface information, software and hardware version information, and supported languages.
在其中一个实施例中,所述应答消息还包括所述影子设备的可操作资源信息。In one of the embodiments, the reply message further includes operable resource information of the shadow device.
在其中一个实施例中,所述可操作资源信息包括可操作资源的统一资源标识符URI、可操作资源的接口信息、可操作资源的资源类型中的至少一个。In one of the embodiments, the operational resource information includes at least one of a uniform resource identifier URI of the operational resource, interface information of the operational resource, and a resource type of the operational resource.
第三方面,本发明实施例提供一种查询请求的处理方法,所述方法包括:In a third aspect, an embodiment of the present invention provides a method for processing a query request. The method includes:
发送设备查询请求;所述设备查询请求包括设备类型;Send a device query request; the device query request includes the device type;
接收所述设备类型对应的资源受限设备和/或所述资源受限设备的影子设备发送的应答消息;所述应答消息包括所述设备类型对应资源受限设备的影子设备的设备信息。Receiving a response message sent by the resource limited device corresponding to the device type and/or the shadow device of the resource limited device; the response message includes device information of the shadow device of the resource limited device corresponding to the device type.
在其中一个实施例中,所述影子设备的设备信息包括所述影子设备的标识ID和/或端口信息。In one of the embodiments, the device information of the shadow device includes an identification ID and/or port information of the shadow device.
在其中一个实施例中,所述影子设备的设备信息还包括设备类型、接口信息、软硬件版本信息、支持语言中的至少一个。In one embodiment, the device information of the shadow device further includes at least one of device type, interface information, software and hardware version information, and supported languages.
在其中一个实施例中,所述应答消息还包括所述影子设备的可操作资源信息。In one of the embodiments, the reply message further includes operable resource information of the shadow device.
在其中一个实施例中,所述可操作资源信息包括可操作资源的统一资源标识符URI、可操作资源的接口信息、可操作资源的资源类型中的至少一个。In one of the embodiments, the operational resource information includes at least one of a uniform resource identifier URI of the operational resource, interface information of the operational resource, and a resource type of the operational resource.
第四方面,本发明实施例提供一种查询请求的处理装置,所述装置包括:According to a fourth aspect, an embodiment of the present invention provides an apparatus for processing a query request. The apparatus includes:
第一接收模块,用于接收设备查询请求;所述设备查询请求包括设备类型;The first receiving module is used to receive a device query request; the device query request includes a device type;
检测模块,用于检测所述设备类型对应的资源受限设备是否存在影子设备;A detection module, configured to detect whether a shadow device exists in the resource-restricted device corresponding to the device type;
应答模块,用于若所述资源受限设备存在影子设备,则根据所述影子设备的设备信息对所述设备查询请求进行处理。The response module is configured to process the device query request according to the device information of the shadow device if there is a shadow device in the resource-restricted device.
第五方面,本发明实施例提供一种查询请求的处理装置,所述装置包括:According to a fifth aspect, an embodiment of the present invention provides an apparatus for processing a query request. The apparatus includes:
第二接收模块,用于将接收设备查询请求;所述设备查询请求包括设备类型;A second receiving module, configured to receive a device query request; the device query request includes a device type;
第一发送模块,用于根据所述设备查询请求发送应答消息;所述应答消息包括所述设备类型对应资源受限设备的影子设备的设备信息。The first sending module is configured to send a response message according to the device query request; the response message includes device information of the shadow device of the resource-restricted device corresponding to the device type.
第六方面,本发明实施例提供一种查询请求的处理装置,所述装置包括:According to a sixth aspect, an embodiment of the present invention provides an apparatus for processing a query request. The apparatus includes:
第二发送模块,用于发送设备查询请求;所述设备查询请求包括设备类型;The second sending module is used to send a device query request; the device query request includes a device type;
第三接收模块,用于接收所述设备类型对应的资源受限设备和/或所述资源受限设备的影子设备发送的应答消息;所述应答消息包括所述设备类型对应资源受限设备的影子设备的设备信息。A third receiving module, configured to receive a response message sent by the resource-restricted device corresponding to the device type and/or the shadow device of the resource-restricted device; the response message includes the resource-restricted device corresponding to the device type Device information for shadow devices.
第七方面,本发明实施例提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以上第一方面至第三方面中任一项所述方法的步骤。According to a seventh aspect, an embodiment of the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, any of the above first to third aspects is implemented Item of the method.
第八方面,本发明实施例提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以上第一方面至第三方面中任一项所述的方法的步骤。In an eighth aspect, an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the method according to any one of the first to third aspects above is implemented A step of.
本申请实施例提供的一种查询请求的处理方法、装置、计算机设备和存储介质,RCD接收到第三方设备发送的设备查询请求后,检测自身是否存在影子设备,若存在,则选择直接向第三方设备发送影子设备的设备信息,或者不做应答,由影子设备向第三方设备进行应答。该方法中,RCD检测到已建立了与其资源同步的影子设备后,对第三方设备的设备查询请求进行处理时,无论哪种处理方式,其给第三方设备都是依据影子设备的设备信息,这样,在第三方设备进行后续控制过程时,不论从RCD还是从影子设备上获取到的应答都是关于影子设备的设备信息,则第三方设备控制的只能是影子设备,避免了第三方设备选择了RCD的困扰,使得人机交互更加智能,大大提高了服务质量。An embodiment of the present application provides a query request processing method, apparatus, computer equipment, and storage medium. After receiving a device query request sent by a third-party device, the RCD detects whether there is a shadow device. The three-party device sends the device information of the shadow device, or does not respond, and the shadow device responds to the third-party device. In this method, when the RCD detects that a shadow device synchronized with its resources has been established, when processing the device query request of the third-party device, regardless of the processing method, it is based on the device information of the shadow device to the third-party device. In this way, when the third-party device performs the subsequent control process, whether the response obtained from the RCD or the shadow device is about the device information of the shadow device, the third-party device can only control the shadow device, avoiding the third-party device The trouble of choosing RCD makes the human-computer interaction more intelligent and greatly improves the service quality.
附图说明BRIEF DESCRIPTION
图1为一个实施例提供的一种查询请求的处理方法的应用环境图;FIG. 1 is an application environment diagram of a query request processing method provided by an embodiment;
图2为一个实施例提供的第三方设备的内部结构图;2 is an internal structure diagram of a third-party device provided by an embodiment;
图3为一个实施例提供的一种查询请求的处理方法的使用示意图;FIG. 3 is a schematic diagram of a method for processing a query request provided by an embodiment;
图4为一个实施例提供的一种查询请求的处理方法的流程示意图;4 is a schematic flowchart of a method for processing a query request according to an embodiment;
图5为一个实施例提供的一种查询请求的处理方法的过程示意图;FIG. 5 is a schematic process diagram of a method for processing a query request according to an embodiment;
图6为一个实施例提供的一种查询请求的处理方法的流程示意图;6 is a schematic flowchart of a method for processing a query request according to an embodiment;
图7为一个实施例提供的一种查询请求的处理方法的流程示意图;7 is a schematic flowchart of a method for processing a query request according to an embodiment;
图8为一个实施例提供的一种查询请求的处理方法的流程示意图;8 is a schematic flowchart of a method for processing a query request according to an embodiment;
图9为一个实施例提供的一种查询请求的处理方法的流程示意图;9 is a schematic flowchart of a query request processing method provided by an embodiment;
图10为一个实施例提供的一种查询请求的处理装置的结构框图;10 is a structural block diagram of a query request processing device provided by an embodiment;
图11为一个实施例提供的一种查询请求的处理装置的结构框图;11 is a structural block diagram of a query request processing device provided by an embodiment;
图12为一个实施例提供的一种查询请求的处理装置的结构框图;12 is a structural block diagram of a query request processing device provided by an embodiment;
图13为一个实施例提供的一种查询请求的处理装置的结构框图;13 is a structural block diagram of a query request processing device provided by an embodiment;
图14为一个实施例提供的一种查询请求的处理装置的结构框图。FIG. 14 is a structural block diagram of an apparatus for processing a query request according to an embodiment.
具体实施方式detailed description
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clear, the following describes the present application in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
本申请提供的一种查询请求的处理方法,可以应用于如图1所示的应用环境中,包括 资源受限设备(Resource Constrained Device,RCD)、影子设备(Shadow device)和第三方设备,其中,RCD、Shadow device和第三方设备两两之间可以进行通信,其通信方式可以是无线通信,例如:WIFi、红外通信或者3G、4G、5G等,本实施例对此不做限定。其中,RCD可以是资源受限的智能化家用电器,例如:灯具、空调等,还可以是智能终端,例如:手机或者PAD等。其中Shadow device的资源和RCD的资源完全同步,Shadow device可以设置在云端,也可以设置在与RCD相同的本地局域网中的其它设备上,本申请实施例对Shadow device的具体类型不做限定。其中,第三方设备可以是服务器,也可以是其他处理设备,本实施例对此也不做限定。如图2所示,上述服务器可以包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该服务器的处理器用于提供计算和控制能力。该服务器的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该服务器的数据库用于查询请求的处理方法的数据。该服务器的网络接口用于与外部的其他设备通过网络连接通信。该计算机程序被处理器执行时以实现一种查询请求的处理方法。This application provides a method for processing query requests, which can be applied to the application environment shown in FIG. 1, including resource-constrained devices (Resource, Constrained Device, RCD), shadow devices (Shadow device), and third-party devices, where , RCD, Shadow device and third-party devices can communicate with each other, and the communication method can be wireless communication, such as: WIFi, infrared communication or 3G, 4G, 5G, etc., this embodiment does not limit this. Among them, the RCD may be an intelligent household appliance with limited resources, such as lamps and air conditioners, or an intelligent terminal, such as a mobile phone or a PAD. The resources of the Shadow device and the resources of the RCD are completely synchronized. The Shadow device can be set in the cloud or on other devices in the same local area network as the RCD. The embodiment of the present application does not limit the specific type of Shadow device. The third-party device may be a server or other processing devices, which is not limited in this embodiment. As shown in FIG. 2, the above server may include a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the server is used to provide computing and control capabilities. The memory of the server includes non-volatile storage media and internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the server is used to query the data of the processing method of the request. The server's network interface is used to communicate with other external devices through a network connection. When the computer program is executed by the processor, a query request processing method is realized.
在实际应用中,以资源受限设备为light(灯)、影子设备为light shadow device(灯影子设备)、影子设备建立在云端为例,如图3所示,配置设备(Mediator)向lig ht发送建立light shadow device地址信息,以及访问该地址信息的必要信息,例如:该必要信息可以包括云平台的地址、云平台的访问令牌(access token)、light shadow d evice的统一资源标识符(Uniform Resource Identifier,简称URI)等。即Mediator在云端为light注册一个light shadow device,建立完成后,light与light shadow devic e的所有资源同步,然后,第三方设备发送一个需要变更light工作状态的请求给light shadow device,light shadow device接收到该请求后将该请求发送给light,light将工作状态进行转变,并反馈完成消息给light shadow device,则表示light shadow dev ice完成了对light的修改。但是,当RCD设备建立起shadow device之后,在网络中同时存在了两个资源相同的设备,但这两个资源相同的设备有不同的设备ID,对其中之一的资源进行操作后产生相同的操作结果。RCD建立了shadow device之后,一般仅需要shad ow device与第三方进行交互,也就是说第三方不应该直接操作RCD。除RCD上的设备发现资源之外,第三方设备不可以访问RCD的任何资源,然而第三方设备同时可以发现RCD设备和Shadow device设备,却仅能操作shadow device,不可以操作RCD设备。如果用户选择了RCD并进行操作,RCD就会返回错误信息,基于此,本申请实施例提供一种查询请求的处理方法、装置、计算机设备和存储介质,旨在解决在上述在RCD建立了shadow device之后,第三方设备可以同时发现RCD和Shadow device设备,但第三方设备不可以操作RCD,仅能操作shadow device,如果用户选择了RCD,RCD就会返回错误信息,给用户带来不必要的困扰,导致人机交互不智能,降低了服务质量的技术问题。In practical applications, taking the resource-restricted device as light, the shadow device as light, shadow device, and the shadow device built in the cloud as an example, as shown in Figure 3, the configuration device (Mediator) Send the address information to establish the lightshadowdevice and the necessary information to access the address information, for example: the necessary information can include the address of the cloud platform, the access token of the cloud platform (access token), the uniform resource identifier of the lightshadowdvice ( Uniform Resource Identifier (URI) and so on. That is, Mediator registers a light shadow device for light in the cloud. After the establishment is complete, all resources of light and light shadow are synchronized. Then, the third-party device sends a request to change the working state of light to light shadow device, light shadow device receives After the request is received, the request is sent to light, and light changes the working state, and feeds back a completion message to light shadow device, which means that light shadow has completed the modification of light. However, after the RCD device establishes shadow device, there are two devices with the same resource in the network, but these two devices with the same resource have different device IDs, and the operation of one of the resources produces the same Operation result. After the RCD establishes the shadow device, generally only the shadow device needs to interact with the third party, which means that the third party should not directly operate the RCD. In addition to the device discovery resources on the RCD, third-party devices cannot access any resources of the RCD. However, the third-party devices can discover both the RCD device and the shadow device, but they can only operate the shadow device and cannot operate the RCD device. If the user selects the RCD and performs the operation, the RCD will return an error message. Based on this, the embodiments of the present application provide a query request processing method, device, computer device, and storage medium, which are designed to solve the above-mentioned shadow established in the RCD. After device, the third-party device can discover both RCD and Shadow device, but the third-party device cannot operate RCD, only the shadow device. If the user selects RCD, the RCD will return an error message, bringing unnecessary Trouble, resulting in unintelligent human-computer interaction, which reduces the technical problems of service quality.
下面将通过实施例并结合附图具体地对本申请的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。需要说明的是,本申请实施例提供的一种查询请求的处理方法,以不同的执行主体对各实施例进行说明,其中图4和图7的执行主体为资源受限设备,图8的执行主体为影子设备,图9的执行主体为第三方设备。其中,各实施例的执行主体均还可以是查询请求的处理装置,其中该装置可以通过软件、硬件或者软硬件结合的方式实现资源更新的部分或者全部。The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below through the embodiments and the accompanying drawings. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. It should be noted that the method for processing query requests provided by the embodiments of the present application will describe each embodiment with different execution bodies. The execution bodies in FIG. 4 and FIG. 7 are resource-constrained devices, and the execution in FIG. 8 The main body is a shadow device, and the executive body of FIG. 9 is a third-party device. The execution subject of each embodiment may also be a query request processing device, where the device may implement part or all of the resource update through software, hardware, or a combination of software and hardware.
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be described clearly and completely in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of the embodiments of the present invention, but not all the embodiments.
下面对执行主体为RCD的各实施例进行说明。The following describes each embodiment in which the execution subject is RCD.
在一个实施例中,图4提供了一种查询请求的处理方法,本实施例涉及的是在RCD在接收到设备查询请求后,检测是否存在影子设备,并根据检测结果对第三方设备的查询请求进行应答的具体过程。如图4所示,该方法包括:In one embodiment, FIG. 4 provides a method for processing a query request. This embodiment involves detecting whether a shadow device exists after receiving the device query request from the RCD, and querying a third-party device based on the detection result. The specific process of requesting a response. As shown in Figure 4, the method includes:
S101,接收设备查询请求;所述设备查询请求包括设备类型。S101. Receive a device query request; the device query request includes a device type.
本实施例中,设备查询请求表示第三方设备发送的获取或修改RCD资源的请求,其中,该设备查询请求中包括了设备类型,即,包括了RCD的设备类型。其中该第三方设备可以是终端设备,例如:手机、PAD、个人电脑等,还可以是计算机设备或者服务器等,本实施例对此不做限定。其中,第三方设备发送设备查询请求的方式可以是在该RCD所在的局域网中发送组播消息,也可以是其他方式,本实施例对此不做限定。示例地,以RCD设备为light为例,在实际应用中,RCD接收设备查询请求可以为,light接收第三方设备发送在局域网中的设备查询请求。In this embodiment, the device query request represents a request for acquiring or modifying RCD resources sent by a third-party device, where the device query request includes the device type, that is, the device type including the RCD. The third-party device may be a terminal device, such as a mobile phone, a PAD, a personal computer, etc., or a computer device or a server, etc., which is not limited in this embodiment. The way in which the third-party device sends the device query request may be to send the multicast message in the local area network where the RCD is located, or it may be another way, which is not limited in this embodiment. Illustratively, taking the RCD device as light as an example, in an actual application, the RCD receiving device query request may be that light receives a device query request sent by a third-party device in the local area network.
S102,检测所述设备类型对应的资源受限设备是否存在影子设备。S102: Detect whether a shadow device exists in the resource-restricted device corresponding to the device type.
本步骤中,影子设备(shadow device)表示根据RCD的资源备份在其他设备上生成一个与该RCD完全相同的设备,新生成的设备,即,影子设备可以完全代表该RCD发送请求和接收应答,其中,影子设备与RCD保持资源的同步。其中,该影子设备可以是设置在云端,也可以是设置于RCD相同的局域网中,本实施例对此不做限定。在实际应用中,基于上述S101步骤中,RCD接收的设备查询请求,检测设备查询请求中携带的设备类型对应的RCD是否存在影子设备,其中,RCD检测是否存在影子设备的方式可以是通过检测是否有存储该影子设备的信息,如果存储了该影子设备的信息则表示该RCD存在影子设备。In this step, the shadow device (shadow device) indicates that a device identical to the RCD is generated on other devices according to the resource backup of the RCD. The newly generated device, that is, the shadow device can completely send requests and receive responses on behalf of the RCD. Among them, the shadow device and RCD keep resources in sync. The shadow device may be installed in the cloud or in the same local area network as the RCD, which is not limited in this embodiment. In practical applications, based on the device query request received by the RCD in step S101 above, it is detected whether the RCD corresponding to the device type carried in the device query request has a shadow device. The RCD can detect whether there is a shadow device by detecting whether There is information storing the shadow device. If the information of the shadow device is stored, it indicates that there is a shadow device in the RCD.
这里需要说明的是,第三方设备发送的设备查询请求只有请求中携带的设备类型对应的RCD才可以接收,当然,若影子设备与该RCD在同一局域网中,第三方设备发送的又是组播请求,因此除了RCD,影子设备也可以接收到该请求。例如,设备查询请求中包括rt=oic.d.light,则表示该设备类型为light。It should be noted here that the device query request sent by the third-party device can only be received by the RCD corresponding to the device type carried in the request. Of course, if the shadow device and the RCD are in the same local area network, the third-party device sends multicast. The request, so in addition to the RCD, the shadow device can also receive the request. For example, if the device query request includes rt=oic.d.light, it indicates that the device type is light.
S103,若存在影子设备,则根据所述影子设备的设备信息对所述设备查询请求进行处理。S103: If there is a shadow device, process the device query request according to the device information of the shadow device.
基于上述S102步骤中,RCD检测到存在影子设备,则根据影子设备的设备信息对设备查询请求进行应答。示例地,RCD应答的方式可以是不做应答,也可以是将影子设备的设备信息返回至第三方设备,还可以是对第三方设备反馈存在影子设备的消息等,本实施例对此不做限定。其中,RCD向第三方设备进行应答可以是以单播的形式进行。需要说明的是,RCD不做应答的情况是建立在RCD和相应的影子设备均位于同一个本地局域网中,由于影子设备也接收到了第三方设备发送的设备查询请求,这种情况下,影子设备会返回自身的设备信息至第三方设备,以使第三方设备可以根据影子设备的设备信息进行后续的控制请求。Based on the above step S102, the RCD detects that there is a shadow device, and responds to the device query request according to the device information of the shadow device. Illustratively, the RCD response method may be not to respond, or to return the device information of the shadow device to the third-party device, or to feed back the message that the shadow device exists to the third-party device, etc. This embodiment does not do this. limited. Among them, the RCD response to the third-party device may be in the form of unicast. It should be noted that the case where the RCD does not respond is based on the fact that the RCD and the corresponding shadow device are located in the same local area network. Because the shadow device also receives the device query request sent by the third-party device, in this case, the shadow device It will return its own device information to the third-party device, so that the third-party device can make subsequent control requests based on the device information of the shadow device.
本实施例提供的一种查询请求的处理方法,RCD接收到第三方设备发送的设备查询请求后,检测自身是否存在影子设备,若存在,则选择直接向第三方设备发送影子设备的设备信息或者不做应答,由影子设备向第三方设备进行应答。该方法中,RCD检测到已建立了与其资源同步的影子设备后,对第三方设备的设备查询请求进行处理时,无论哪种处理方式,其给第三方设备的都是依据影子设备的设备信息,这样,在第三方设备进行后续控制过程时,不论从RCD还是从影子设备上获取到的应答都是关于影子设备的设备信息,则第三方设备控制的只能是影子设备,避免了第三方设备选择了RCD的困扰,使得人机交互更加智能,大大提高了服务质量。This embodiment provides a method for processing a query request. After receiving a device query request sent by a third-party device, the RCD detects whether a shadow device exists, and if so, chooses to directly send the device information of the shadow device to the third-party device or Without answering, the shadow device answers to the third-party device. In this method, after detecting that a shadow device synchronized with its resources has been established, the RCD processes the device query request of the third-party device, no matter which processing method, it gives the third-party device the device information based on the shadow device In this way, when the third-party device performs the subsequent control process, whether the response obtained from the RCD or the shadow device is about the device information of the shadow device, the third-party device can only control the shadow device, avoiding the third party The device chooses the trouble of RCD, which makes the human-computer interaction more intelligent and greatly improves the service quality.
在上述实施例中的S103步骤中,RCD根据影子设备的设备信息对第三方设备发送的设备查询请求进行应答的方式有三种,下面对这三种应答方式做以详细说明。In step S103 in the above embodiment, there are three ways for the RCD to respond to the device query request sent by the third-party device according to the device information of the shadow device. The three response methods are described in detail below.
第一种方式,上述S103的一种可实现方式包括:通过影子设备配置资源,获取所述 影子设备的设备信息;根据所述影子设备的设备信息向第三方设备发送第一应答消息;所述第一应答消息包括所述影子设备的设备信息。In the first way, a possible implementation manner of the above S103 includes: configuring resources through a shadow device to obtain device information of the shadow device; sending a first response message to a third-party device according to the device information of the shadow device; The first response message includes device information of the shadow device.
本实施例中,影子设备配置资源用于资源受限设备注册影子设备,保存在RCD中。RCD检测到存在影子设备后,先从影子设备配置资源中获取影子设备的设备信息,然后向第三方设备发送第一应答消息,其中该第一应答消息包括了影子设备的设备信息,其中,RCD向第三方设备发送第一应答消息的方式可以是通过无线通信的方式发送,例如Wi-Fi、红外通信或者3G、4G、5G等,本实施例对此不做限定。In this embodiment, the shadow device configuration resources are used for resource-limited devices to register shadow devices and save them in the RCD. After detecting the existence of a shadow device, RCD first obtains the device information of the shadow device from the shadow device configuration resource, and then sends a first response message to the third-party device, where the first response message includes the device information of the shadow device, where RCD The method of sending the first response message to the third-party device may be by wireless communication, such as Wi-Fi, infrared communication, or 3G, 4G, 5G, etc., which is not limited in this embodiment.
可选地,上述影子设备的设备信息包括所述影子设备的标识ID和/或端口信息。可选地,所述影子设备的设备信息还包括设备类型、接口信息、软硬件版本信息、支持语言中的至少一个。其中,影子设备的标识ID表示影子设备的身份凭证信息,其中该标识ID可以是数字、字母或者数字与字母的组合,本实施例对此不做限定。其中,端口信息表示影子设备的IP地址和端口地址。其中影子设备的设备信息还可以包括:设备类型、接口信息、软硬件版本信息、支持语言中等等,在RCD向第三方设备发送影子设备的设备信息时可以是上述列举中的一个,也可以是多个,本实施例对此不做限定。Optionally, the device information of the shadow device includes identification ID and/or port information of the shadow device. Optionally, the device information of the shadow device further includes at least one of device type, interface information, software and hardware version information, and supported languages. The identification ID of the shadow device represents the identity credential information of the shadow device, where the identification ID may be a number, a letter, or a combination of numbers and letters, which is not limited in this embodiment. Among them, the port information represents the IP address and port address of the shadow device. The device information of the shadow device may also include: device type, interface information, hardware and software version information, supported languages, etc., when the RCD sends the device information of the shadow device to the third-party device, it may be one of the above enumerations, or it may be There are many, this embodiment does not limit this.
本实施例中,RCD可以通过影子设备配置资源获取影子设备的ID、端口信息(IP address+port),还有可能携带了shadow device的设备类型、接口信息、软硬件版本信息、支持语言等信息。In this embodiment, the RCD can obtain the shadow device ID, port information (IP address+port) through the shadow device configuration resource, and may also carry the device type, interface information, software and hardware version information, supported language, and other information of the shadow device .
可选地,上述第一应答消息还包括所述影子设备的可操作资源信息。可选地,所述可操作资源信息包括可操作资源的统一资源标识符URI、可操作资源的接口信息、可操作资源的资源类型中的至少一个。Optionally, the above-mentioned first response message further includes operable resource information of the shadow device. Optionally, the operational resource information includes at least one of a uniform resource identifier URI of the operational resource, interface information of the operational resource, and a resource type of the operational resource.
其中,第一应答消息中包括了影子设备的可操作资源信息,例如:可操作资源的URI、可操作资源的接口信息以及可操作资源的资源类型等,其中,URI的表示资源名称的字符,其可以是数字、字母或者数字与字母的组合,本实施例对此不做限定。Among them, the first response message includes the operable resource information of the shadow device, for example: the URI of the operable resource, the interface information of the operable resource and the resource type of the operable resource, etc., where URI represents the character of the resource name, It can be a number, a letter, or a combination of numbers and letters, which is not limited in this embodiment.
第二种方式,上述S103的另一种可实现方式包括:丢弃所述设备查询请求。In the second manner, another implementable manner of the foregoing S103 includes: discarding the device query request.
本实施例中,RCD检测到存在影子设备后,丢弃该设备查询请求,即表示对该第三方设备的设备查询请求不做应答。In this embodiment, after detecting the presence of a shadow device, the RCD discards the device query request, which means that it does not respond to the device query request of the third-party device.
第三种方式,上述S103的再一种可实现方式包括:向第三方设备发送第二应答消息;所述第二应答消息用于指示所述资源受限设备存在影子设备。In a third manner, another possible implementation manner of the foregoing S103 includes: sending a second response message to a third-party device; the second response message is used to indicate that the resource-restricted device has a shadow device.
本实施例中,RCD向第三方设备发送第二应答消息,其中该第二应答消息用于指示RCD存在影子设备,其中,RCD向第三方设备发送第二应答消息的方式可以是通过无线通信的方式发送,例如Wi-Fi、红外通信或者3G、4G、5G等,本实施例对此不做限定。需要理解的是,这里的第二应答消息只是一个表示存在影子设备的消息,其中不包含影子设备的任何信息。In this embodiment, the RCD sends a second response message to the third-party device, where the second response message is used to indicate that there is a shadow device in the RCD, and the way in which the RCD sends the second response message to the third-party device may be through wireless communication Sending by way of, such as Wi-Fi, infrared communication or 3G, 4G, 5G, etc., this embodiment does not limit this. It should be understood that the second response message here is just a message indicating that there is a shadow device, and does not contain any information of the shadow device.
示例地,如图5所示,为本实施例提供的三种RCD设备对第三方设备进行应答的方式的完整示意图,该示意图中设定RCD已经创建了影子设备,且RCD和影子设备都在同一局域网中,这样,第三方设备发送在该组播组内的请求,RCD和影子设备都会收到。具体地:Exemplarily, as shown in FIG. 5, it is a complete schematic diagram of the three RCD devices responding to the third-party device provided in this embodiment. In this schematic diagram, it is set that the RCD has created a shadow device, and both the RCD and the shadow device are in In the same local area network, in this way, the request sent by the third-party device in the multicast group will be received by both the RCD and the shadow device. specifically:
S1:第三方设备在本地局域网中发送组播设备查询请求,例如:RCD为“light”,则第三方设备发送的请求为获取”light”类型的设备的设备发现请求。S1: The third-party device sends a multicast device query request in the local area network. For example, if the RCD is "light", the request sent by the third-party device is a device discovery request to obtain a "light" type device.
S2:当资源受限设备收到设备发现请求消息之后,首先检查自身是否存在影子设备。S2: After the resource-restricted device receives the device discovery request message, it first checks whether there is a shadow device.
检查的方法例如为:检测其自身是否存在影子设备配置资源,如果有则检测上述影子设备配置资源的参数:影子设备生成指示位,该指示位如果为true则表示该设备存在影子设备,反之则不存在影子设备。如果存在影子设备,则通过影子设备配置资源获取影子设备的ID、端口信息,还有可能携带了影子设备的设备类型、设备的接口信息、软硬件版本信息,支持语言等信息。其中端口信息包括设备的传输协议(例如coaps+TCP,coaps等)、 IP地址、端口号。还有可能获取shadow device对应的可操作资源信息。可操作资源信息可以包括:可操作资源的URI、可操作资源的接口信息、可操作资源的资源类型等。The inspection method is, for example, to detect whether there is a shadow device configuration resource itself, and if so, to detect the parameters of the shadow device configuration resource: the shadow device generates an indication bit. If the indication bit is true, it indicates that the device has a shadow device, and vice versa There is no shadow device. If there is a shadow device, the shadow device ID and port information can be obtained through the shadow device configuration resource. It may also carry the device type of the shadow device, device interface information, software and hardware version information, and language support information. The port information includes the device's transmission protocol (such as coaps+TCP, coaps, etc.), IP address, and port number. It is also possible to obtain operational resource information corresponding to the shadow device. The operable resource information may include: URI of operable resource, interface information of operable resource, resource type of operable resource, etc.
当RCD确定自身存在影子设备之后,可选择以下S3、S4、S5中的任意一种方式来应答第三方设备。After the RCD determines that it has a shadow device, it can choose any of the following S3, S4, and S5 to answer the third-party device.
S3:RCD以单播的方式向第三方设备发送第一应答消息,其中,该第一应答消息中携带了影子设备的端口信息、ID、设备类型、接口信息、软硬件版本信息、支持语言等。S3: The RCD sends a first response message to the third-party device in a unicast manner, where the first response message carries the port information, ID, device type, interface information, software and hardware version information, supported language, etc. of the shadow device .
S4:RCD丢弃该请求,不做应答。S4: The RCD discards the request without responding.
S5:RCD以单播的方式向第三方设备发送第二应答消息,其中,该第二应答消息用于指示其存在影子设备,但该应答消息中不包含影子设备的任何信息。S5: The RCD sends a second response message to the third-party device in a unicast manner, where the second response message is used to indicate that there is a shadow device, but the response message does not include any information of the shadow device.
S6:在上述S3、或者S4、或者S5进行的同时,影子设备均会返回的包含其设备信息的应答消息给第三方设备。S6: While the above S3, S4, or S5 is performed, the shadow device will return a response message containing its device information to the third-party device.
以上实施例提供的三种RCD设备对第三方设备进行应答的方式,无论哪种应答方式,第三方设备接收到的都是影子设备的设备信息,这样,在第三方设备进行后续控制过程时,控制的也只能是影子设备,避免了第三方设备选择了RCD的困扰,使得人机交互更加智能,大大提高了服务质量。The three RCD devices provided in the above embodiments respond to the third-party device. No matter which answering method, the third-party device receives the device information of the shadow device. In this way, when the third-party device performs the subsequent control process, Only the shadow device can be controlled, which avoids the trouble of the third-party device choosing RCD, makes the human-computer interaction more intelligent, and greatly improves the quality of service.
考虑到影子设备建立在云端时,第三方设备在RCD所在的局域网中发送的组播请求,影子设备是接收不到的,这种情况下,需要RCD采用“发送包含影子设备信息的第一应答消息”这一方式应答第三方设备,则在此之前,需要RCD先确定影子设备是否建立在云端,在其中一个实施例中,本实施例提供一种查询请求的处理方法,该实施例涉及的是RCD检测影子设备是否建立在云端,并根据检测结果对第三方设备进行应答的具体过程,如图6所示,所述方法还包括:Considering that when the shadow device is established in the cloud, the multicast request sent by the third-party device in the local area network where the RCD is located, the shadow device cannot receive it. In this case, the RCD needs to use "send the first response containing the shadow device information." "Message" in this way to respond to third-party devices, before that, the RCD needs to determine whether the shadow device is built in the cloud. In one of the embodiments, this embodiment provides a method for processing a query request. This embodiment involves It is the specific process of RCD detecting whether the shadow device is built in the cloud and responding to the third-party device according to the detection result. As shown in FIG. 6, the method further includes:
S201,检测所述影子设备是否建立在云端。S201: Detect whether the shadow device is established in the cloud.
本实施例中,RCD检测影子设备是否建立在云端,示例地,RCD检测影子设备建立在云端的方式可以是,RCD查询影子设备的注册地址属于本地局域网的地址,若不是,则表示影子设备建立在云端;若是,则表示该影子设备建立在本地局域网中,当然,RCD也可以通过直接查询影子设备的注册地址是否属于云端地址来确定,例如,也可以通过在配置资源中增加一个影子设备建立位置的指示位,根据该指示位判定影子设备是否建立在云端,本实施例对此不做限定。In this embodiment, the RCD detects whether the shadow device is established in the cloud. For example, the RCD method for detecting the shadow device is established in the cloud may be that the RCD queries the registered address of the shadow device to belong to the address of the local area network. If it is not, it indicates that the shadow device is established In the cloud; if it is, it means that the shadow device is built in the local area network. Of course, the RCD can also be determined by directly querying whether the registered address of the shadow device belongs to the cloud address. For example, it can also be established by adding a shadow device to the configuration resource. The indication bit of the location determines whether the shadow device is established in the cloud according to the indication bit, which is not limited in this embodiment.
S202,若所述影子设备建立在云端,则执行通过影子设备配置资源,获取所述影子设备的设备信息的步骤。S202: If the shadow device is established in the cloud, perform a step of configuring resources through the shadow device to obtain device information of the shadow device.
基于上述S201中,RCD检测到影子设备建立在云端,资源受限设备通过影子设备配置资源,获取所述影子设备的设备信息,以便将包括影子设备信息的第一应答消息发送至第三方设备。Based on the above S201, the RCD detects that the shadow device is established in the cloud, and the resource-constrained device configures resources through the shadow device to obtain device information of the shadow device, so as to send the first response message including the shadow device information to the third-party device.
本实施例提供的一种查询请求的处理方法,RCD在检测到影子设备建立在云端后,通过影子设备配置资源,获取所述影子设备的设备信息,以便发送影子设备的设备信息给第三方设备,以使第三方设备根据影子设备的设备信息,进行后续控制过程,避免了第三方设备选择了RCD的困扰,使得人机交互更加智能,大大提高了服务质量。This embodiment provides a method for processing a query request. After detecting that the shadow device is established in the cloud, the RCD configures resources through the shadow device to obtain the device information of the shadow device, so as to send the device information of the shadow device to a third-party device In order to enable the third-party device to carry out the subsequent control process according to the device information of the shadow device, it avoids the trouble of the third-party device choosing RCD, makes the human-computer interaction more intelligent, and greatly improves the service quality.
另外,当影子设备建立在本地局域网的其它设备上时,RCD既可以采用“发送包含影子设备信息的第一应答消息”这一方式应答第三方设备,也可以采用“丢弃该请求,不做应答”或“向第三方设备发送已存在影子设备的第二应答消息”这两种方式来应答第三方设备。In addition, when the shadow device is built on other devices in the local area network, the RCD can either use the "send the first response message containing the shadow device information" to answer the third-party device, or it can use the "discard the request without responding." "Or "send a second response message to a third-party device that already has a shadow device" to answer the third-party device.
在一些场景中,上述S102步骤中RCD在检测是否存在影子设备时可以是根据配置资源参数的方式来确定,则本申请实施例提供一种查询请求的处理方法,其涉及的是RCD根据影子设备配置资源参数中的影子设备生成指示位,确定自身是否存在影子设备的具体过程,如图7所示,上述S102包括:In some scenarios, the RCD in step S102 may be determined according to the way of configuring resource parameters when detecting whether there is a shadow device. The embodiments of the present application provide a method for processing a query request, which involves the RCD according to the shadow device. The specific process of generating an indication bit in the configuration resource parameter to determine whether there is a shadow device itself, as shown in FIG. 7, the above S102 includes:
S301,获取影子设备配置资源参数中的影子设备生成指示位。S301. Obtain a shadow device generation indicator bit in a shadow device configuration resource parameter.
本实施例中,影子设备配置资源用于资源受限设备注册影子设备,其中,影子设备生成指示位为影子设备配置资源的参数,其表示RCD中是否存在影子设备。需要理解的是,RCD在检测影子设备生成指示位之前,先检测其自身是否存在影子设备配置资源,如果有,则检测上述影子设备配置资源的参数:影子设备生成指示位。In this embodiment, the shadow device configuration resource is used to register a shadow device for a resource-constrained device, where the shadow device generates a parameter whose indication bit is the shadow device configuration resource, which indicates whether the shadow device exists in the RCD. It should be understood that before detecting the indication bit generated by the shadow device, the RCD first detects whether there is a shadow device configuration resource itself, and if so, detects the parameter of the shadow device configuration resource: the shadow device generates the indication bit.
S302,根据所述影子设备生成指示位检测所述设备类型对应的资源受限设备是否存在影子设备。S302: Detect whether a shadow device exists in the resource-restricted device corresponding to the device type according to the indication bit generated by the shadow device.
基于上述S301步骤中,RCD获取的影子设备生成指示位,并根据该指示位检测是否存在影子设备,其中,检测方式可以是RCD根据指示位的显示内容确定是否存在影子设备,示例地,以RCD的影子设备配置资源是/oic/Shadow/conf为例,RCD可以检查/oic/Shadow/conf资源中的sgi(指示位)的属性,若sgi为为true则表示该设备存在影子设备,反之则不存在影子设备。Based on the above-mentioned step S301, the shadow device acquired by the RCD generates an indication bit, and detects whether there is a shadow device according to the indication bit, where the detection method may be that the RCD determines whether there is a shadow device according to the display content of the indication bit, for example, RCD The shadow device configuration resource is /oic/Shadow/conf as an example. RCD can check the attribute of sgi (indicating bit) in the /oic/Shadow/conf resource. If sgi is true, it means there is a shadow device on the device, otherwise There is no shadow device.
本实施例提供的一种查询请求的处理方法,RCD获取影子设备生成指示位,并通过该指示位确定是否存在影子设备,使得影子设备的检测结果更加精确,有效保证了后续第三方设备通过影子设备控制RCD状态的过程。This embodiment provides a method for processing a query request. The RCD obtains the indication bit generated by the shadow device, and determines whether there is a shadow device through the indication bit, which makes the detection result of the shadow device more accurate and effectively ensures that subsequent third-party devices pass the shadow The process by which the device controls the RCD state.
下面对执行主体为影子设备的各实施例进行说明。需要说明的是,以下各实施例中涉及部分内容在上述执行主体为RCD的各实施例中已经进行了描述,重复的内容将不再赘述。The following describes each embodiment in which the execution subject is a shadow device. It should be noted that part of the content involved in the following embodiments has been described in the above embodiments where the execution subject is the RCD, and the repeated content will not be repeated.
在一个实施例中,图8提供了一种查询请求的处理方法,本实施例涉及的是影子设备接收到第三方设备发送的设备查询请求后,发送应答消息的具体过程。如图8所示,所述方法包括:In one embodiment, FIG. 8 provides a method for processing a query request. This embodiment relates to a specific process in which a shadow device sends a response message after receiving a device query request sent by a third-party device. As shown in FIG. 8, the method includes:
S401,接收设备查询请求;所述设备查询请求包括设备类型。S401. Receive a device query request; the device query request includes a device type.
本实施例中,影子设备接收设备查询请求,该设备查询请求包括了设备类型,这里需要说明的是,在本申请实施例提供的一种查询请求的处理方法中,由于第三方设备发送的设备查询请求时以组播形式发送在本地局域中,则影子设备可以接收到设备查询请求的前提是影子设备建立在第三方设备发送的局域网中,若影子设备建立在云端,则影子设备接收到不到该设备查询请求。In this embodiment, the shadow device receives a device query request, and the device query request includes the device type. It should be noted here that in a method for processing a query request provided by an embodiment of the present application, due to a device sent by a third-party device When the query request is sent in the local local area in a multicast form, the premise that the shadow device can receive the device query request is that the shadow device is established in the local area network sent by the third-party device. If the shadow device is established in the cloud, the shadow device receives Unable to find the device query request.
S402,根据所述设备查询请求发送应答消息;所述应答消息包括所述设备类型对应资源受限设备的影子设备的设备信息。S402. Send a response message according to the device query request; the response message includes device information of the shadow device of the resource-restricted device corresponding to the device type.
基于上述S401步骤中,影子设备接收的设备查询请求,影子设备向第三方设备发送应答消息,其中,该应答消息包括该影子设备的设备信息,以使后续第三方设备根据该设备信息给影子设备发送RCD的控制请求。其中,对于该影子设备、设备信息以及应答消息在上述实施例中已进行了描述,本实施例在此不再赘述。Based on the device query request received by the shadow device in step S401 above, the shadow device sends a reply message to the third-party device, where the reply message includes device information of the shadow device, so that subsequent third-party devices send the shadow device a shadow device based on the device information Send RCD control request. The shadow device, device information, and response message have been described in the foregoing embodiment, and this embodiment will not repeat them here.
本实施例提供一种查询请求的处理方法,影子设备根据接收的第三方设备发送的设备查询请求,反馈包含了其设备信息的应答消息,这样,第三方设备在接收到影子设备的设备信息后只能通过给影子设备发送控制请求来控制RCD设备的状态,避免了第三方设备选择了RCD的困扰,使得人机交互更加智能,大大提高了服务质量。This embodiment provides a method for processing a query request. The shadow device feeds back a response message including device information according to the received device query request sent by the third-party device. In this way, after the third-party device receives the device information of the shadow device The state of the RCD device can only be controlled by sending a control request to the shadow device, which avoids the trouble that the third-party device chooses RCD, makes the human-computer interaction more intelligent, and greatly improves the quality of service.
可选地,上述影子设备的设备信息包括所述影子设备的标识ID和/或端口信息。可选地,所述影子设备的设备信息还包括设备类型、接口信息、软硬件版本信息、支持语言中的至少一个。其中,影子设备的标识ID表示影子设备的身份凭证信息,其中该标识ID可以是数字、字母或者数字与字母的组合,本实施例对此不做限定。其中,端口信息表示影子设备的IP地址和端口地址。其中影子设备的设备信息还可以包括:设备类型、接口信息、软硬件版本信息、支持语言中等等,在RCD向第三方设备发送影子设备的设备信息时可以是上述列举中的一个,也可以是多个,本实施例对此不做限定。Optionally, the device information of the shadow device includes identification ID and/or port information of the shadow device. Optionally, the device information of the shadow device further includes at least one of device type, interface information, software and hardware version information, and supported languages. The identification ID of the shadow device represents the identity credential information of the shadow device, where the identification ID may be a number, a letter, or a combination of numbers and letters, which is not limited in this embodiment. Among them, the port information represents the IP address and port address of the shadow device. The device information of the shadow device may also include: device type, interface information, hardware and software version information, supported languages, etc., when the RCD sends the device information of the shadow device to the third-party device, it may be one of the above enumerations, or it may be There are many, this embodiment does not limit this.
可选地,上述应答消息还包括所述影子设备的可操作资源信息。可选地,所述可操作 资源信息包括可操作资源的统一资源标识符URI、可操作资源的接口信息、可操作资源的资源类型中的至少一个。其中,应答消息中包括了影子设备的可操作资源信息,例如:可操作资源的URI、可操作资源的接口信息以及可操作资源的资源类型等,其中,URI的表示资源名称的字符,其可以是数字、字母或者数字与字母的组合,本实施例对此不做限定。Optionally, the above response message also includes operable resource information of the shadow device. Optionally, the operational resource information includes at least one of a uniform resource identifier URI of operational resources, interface information of operational resources, and a resource type of operational resources. Among them, the response message includes the operable resource information of the shadow device, for example: the URI of the operable resource, the interface information of the operable resource, and the resource type of the operable resource. Among them, the URI represents the character of the resource name, which can It is a number, a letter, or a combination of numbers and letters, which is not limited in this embodiment.
下面对执行主体为第三方设备的各实施例进行说明。需要说明的是,以下各实施例中涉及部分内容在上述执行主体为和执行主体为影子设备的各实施例中已经进行了描述,重复的内容将不再赘述。The following describes embodiments in which the execution subject is a third-party device. It should be noted that part of the content involved in the following embodiments has been described in the above embodiments where the execution subject is and the execution subject is a shadow device, and duplicate content will not be repeated.
在其中一个实施例中,如图9所示,本实施例提供一种查询请求的处理方法,其涉及的是第三方设备发送设备查询请求,并接收或者影子设备根据该设备查询请求反馈的应答消息的具体过程,所述方法包括:In one of the embodiments, as shown in FIG. 9, this embodiment provides a method for processing a query request, which involves a third-party device sending a device query request, and receiving or responding to a response from the shadow device according to the device query request. For the specific process of the message, the method includes:
S501,发送设备查询请求;所述设备查询请求包括设备类型。S501: Send a device query request; the device query request includes a device type.
本实施例中,第三方设备发送设备查询请求,该设备查询请求包括设备类型,其中,参考上述图5,第三方设备发送该设备查询请求的方式是以组播的形式发送。其中,对于该设备查询请求以及第三方设备在上述实施例中已进行了描述,本实施例在此不再赘述。In this embodiment, the third-party device sends a device query request, and the device query request includes the device type. Referring to FIG. 5 above, the third-party device sends the device query request in the form of multicast. Among them, the device query request and the third-party device have been described in the above embodiment, and this embodiment will not repeat them here.
S502,接收所述设备类型对应的资源受限设备和/或所述资源受限设备的影子设备发送的应答消息;所述应答消息包括所述设备类型对应资源受限设备的影子设备的设备信息。S502: Receive a response message sent by a resource-restricted device corresponding to the device type and/or a shadow device of the resource-restricted device; the response message includes device information of the shadow device of the resource-restricted device corresponding to the device type .
本步骤中,基于上述第三方设备发送的设备查询请求,该请求中携带的设备类型对应的RCD和/或其影子设备会反馈一个应答消息给第三方设备,第三方设备接收该应答消息。其中,RCD和/或其影子设备反馈的应答消息中包括影子设备的设备信息,则第三方设备接收RCD和/或其影子设备发送应答消息。In this step, based on the device query request sent by the third-party device, the RCD and/or its shadow device corresponding to the device type carried in the request will feed back a response message to the third-party device, and the third-party device receives the response message. Wherein, the response message fed back by the RCD and/or its shadow device includes device information of the shadow device, and then the third-party device receives the RCD and/or its shadow device to send the response message.
本实施例提供的一种查询请求的处理方法,第三方设备发送设备查询请求后,接收对应的RCD和/或其影子设备发送的应答消息中包括了影子设备的设备信息,这样,第三方设备接收到影子设备的设备信息后,在第三方设备进行后续控制过程时,只能控制影子设备,避免了第三方设备选择了RCD的困扰,使得人机交互更加智能,大大提高了服务质量。This embodiment provides a method for processing a query request. After the third-party device sends the device query request, the response message sent by the corresponding RCD and/or its shadow device includes the device information of the shadow device. In this way, the third-party device After receiving the device information of the shadow device, when the third-party device performs the subsequent control process, it can only control the shadow device, avoiding the trouble of the third-party device selecting the RCD, making the human-computer interaction more intelligent, and greatly improving the quality of service.
可选地,上述影子设备的设备信息包括所述影子设备的标识ID和/或端口信息。可选地,所述影子设备的设备信息还包括设备类型、接口信息、软硬件版本信息、支持语言中的至少一个。其中,影子设备的标识ID表示影子设备的身份凭证信息,其中该标识ID可以是数字、字母或者数字与字母的组合,本实施例对此不做限定。其中,端口信息表示影子设备的IP地址和端口地址。其中影子设备的设备信息还可以包括:设备类型、接口信息、软硬件版本信息、支持语言中等等,在RCD向第三方设备发送影子设备的设备信息时可以是上述列举中的一个,也可以是多个,本实施例对此不做限定。Optionally, the device information of the shadow device includes identification ID and/or port information of the shadow device. Optionally, the device information of the shadow device further includes at least one of device type, interface information, software and hardware version information, and supported languages. The identification ID of the shadow device represents the identity credential information of the shadow device, where the identification ID may be a number, a letter, or a combination of numbers and letters, which is not limited in this embodiment. Among them, the port information represents the IP address and port address of the shadow device. The device information of the shadow device may also include: device type, interface information, hardware and software version information, supported languages, etc., when the RCD sends the device information of the shadow device to the third-party device, it may be one of the above enumerations, or it may be There are many, this embodiment does not limit this.
可选地,上述应答消息还包括所述影子设备的可操作资源信息。可选地,所述可操作资源信息包括可操作资源的统一资源标识符URI、可操作资源的接口信息、可操作资源的资源类型中的至少一个。其中,应答消息中包括了影子设备的可操作资源信息,例如:可操作资源的URI、可操作资源的接口信息以及可操作资源的资源类型等,其中,URI的表示资源名称的字符,其可以是数字、字母或者数字与字母的组合,本实施例对此不做限定。Optionally, the above response message also includes operable resource information of the shadow device. Optionally, the operational resource information includes at least one of a uniform resource identifier URI of the operational resource, interface information of the operational resource, and a resource type of the operational resource. Among them, the response message includes the operable resource information of the shadow device, for example: the URI of the operable resource, the interface information of the operable resource, and the resource type of the operable resource. Among them, the URI represents the character of the resource name, which can It is a number, a letter, or a combination of numbers and letters, which is not limited in this embodiment.
应该理解的是,虽然图2-9的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-9中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flowcharts of FIGS. 2-9 are displayed in order according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless clearly stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least some of the steps in FIGS. 2-9 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. These sub-steps or stages The execution order of is not necessarily sequential, but may be executed in turn or alternately with at least a part of other steps or sub-steps or stages of other steps.
在一个实施例中,如图10所示,本申请实施例提供了一种查询请求的处理装置,包 括:第一接收模块10、第一检测模块11和应答模块12,其中,In one embodiment, as shown in FIG. 10, an embodiment of the present application provides a query request processing apparatus, including: a first receiving module 10, a first detecting module 11, and a response module 12, wherein,
第一接收模块10,用于接收设备查询请求;所述设备查询请求包括设备类型;The first receiving module 10 is configured to receive a device query request; the device query request includes a device type;
第一检测模块11,用于检测所述设备类型对应的资源受限设备是否存在影子设备;The first detection module 11 is configured to detect whether there is a shadow device in the resource-restricted device corresponding to the device type;
应答模块12,用于若所述资源受限设备存在影子设备,则根据所述影子设备的设备信息对所述设备查询请求进行处理。The response module 12 is configured to process the device query request according to device information of the shadow device if there is a shadow device in the resource-restricted device.
上述实施例提供的一种查询请求的处理装置,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。The device for processing query requests provided by the above embodiments is similar in implementation principle and technical effect to the above method embodiments, and will not be repeated here.
在其中一个实施例中,上述应答模块12具体用于通过所述影子设备配置资源,获取所述影子设备的设备信息;根据所述影子设备的设备信息向第三方设备发送第一应答消息;所述第一应答消息包括所述影子设备的设备信息。In one embodiment, the above-mentioned response module 12 is specifically configured to configure resources of the shadow device to obtain device information of the shadow device; send a first response message to a third-party device according to the device information of the shadow device; The first response message includes device information of the shadow device.
在其中一个实施例中,所述影子设备的设备信息包括所述影子设备的标识ID和/或端口信息。In one of the embodiments, the device information of the shadow device includes an identification ID and/or port information of the shadow device.
在其中一个实施例中,所述影子设备的设备信息还包括设备类型、接口信息、软硬件版本信息、支持语言中的至少一个。In one embodiment, the device information of the shadow device further includes at least one of device type, interface information, software and hardware version information, and supported languages.
在其中一个实施例中,所述第一应答消息还包括所述影子设备的可操作资源信息。In one of the embodiments, the first response message further includes operable resource information of the shadow device.
在其中一个实施例中,所述可操作资源信息包括可操作资源的统一资源标识符URI、可操作资源的接口信息、可操作资源的资源类型中的至少一个。In one of the embodiments, the operational resource information includes at least one of a uniform resource identifier URI of the operational resource, interface information of the operational resource, and a resource type of the operational resource.
在其中一个实施例中,如图11所示,本申请实施例提供了一种查询请求的处理装置,所述装置还包括:第二检测模块13,其中,In one of the embodiments, as shown in FIG. 11, an embodiment of the present application provides an apparatus for processing a query request, the apparatus further includes: a second detection module 13, wherein,
第二检测模块13,用于检测所述影子设备是否建立在云端;The second detection module 13 is used to detect whether the shadow device is established in the cloud;
应答模块12,用于若所述影子设备建立在云端,则通过影子设备配置资源,获取所述影子设备的设备信息的步骤。The response module 12 is used for the step of configuring resources through the shadow device and acquiring device information of the shadow device if the shadow device is established in the cloud.
上述实施例提供的一种查询请求的处理装置,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。The device for processing query requests provided by the above embodiments is similar in implementation principle and technical effect to the above method embodiments, and will not be repeated here.
在其中一个实施例中,上述应答模块12还用于丢弃所述设备查询请求。In one of the embodiments, the above-mentioned response module 12 is also used to discard the device query request.
在其中一个实施例中,上述应答模块12还用于向第三方设备发送第二应答消息;所述第二应答消息用于指示所述资源受限设备存在影子设备。In one of the embodiments, the above-mentioned response module 12 is further configured to send a second response message to a third-party device; the second response message is used to indicate that the resource-restricted device has a shadow device.
在其中一个实施例中,如图12所示,本申请实施例提供了一种查询请求的处理装置,上述第一检测模块11包括:获取单元111和检测单元112,其中,In one of the embodiments, as shown in FIG. 12, an embodiment of the present application provides a query request processing apparatus. The first detection module 11 includes: an acquisition unit 111 and a detection unit 112, wherein,
获取单元111,用于获取所述影子设备配置资源参数中的影子设备生成指示位;The obtaining unit 111 is configured to obtain a shadow device generation indicator bit in the shadow device configuration resource parameter;
检测单元112,用于根据所述影子设备生成指示位检测所述设备类型对应的资源受限设备是否存在影子设备。The detecting unit 112 is configured to detect whether a shadow device exists in the resource-restricted device corresponding to the device type according to the indication bit generated by the shadow device.
上述实施例提供的一种查询请求的处理装置,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。The device for processing query requests provided by the above embodiments is similar in implementation principle and technical effect to the above method embodiments, and will not be repeated here.
在其中一个实施例中,如图13所示,本申请实施例提供了一种查询请求的处理装置,所述装置包括:第二接收模块14和第一发送模块15,其中,In one of the embodiments, as shown in FIG. 13, an embodiment of the present application provides an apparatus for processing a query request, the apparatus includes: a second receiving module 14 and a first sending module 15, wherein,
第二接收模块14,用于将接收设备查询请求;所述设备查询请求包括设备类型;The second receiving module 14 is configured to receive a device query request; the device query request includes a device type;
第一发送模块15,用于根据所述设备查询请求发送应答消息;所述应答消息包括所述设备类型对应资源受限设备的影子设备的设备信息。The first sending module 15 is configured to send a reply message according to the device query request; the reply message includes device information of the shadow device of the resource-restricted device corresponding to the device type.
上述实施例提供的一种查询请求的处理装置,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。The device for processing query requests provided by the above embodiments is similar in implementation principle and technical effect to the above method embodiments, and will not be repeated here.
在其中一个实施例中,如图14所示,本申请实施例提供了一种查询请求的处理装置,所述装置包括:第二发送模块16和第三接收模块17,其中,In one of the embodiments, as shown in FIG. 14, an embodiment of the present application provides an apparatus for processing a query request, the apparatus includes: a second sending module 16 and a third receiving module 17, wherein,
第二发送模块16,用于发送设备查询请求;所述设备查询请求包括设备类型;The second sending module 16 is used to send a device query request; the device query request includes a device type;
第三接收模块17,用于接收所述设备类型对应的资源受限设备和/或所述资源受限设 备的影子设备发送的应答消息;所述应答消息包括所述设备类型对应资源受限设备的影子设备的设备信息。The third receiving module 17 is configured to receive a response message sent by the resource limited device corresponding to the device type and/or the shadow device of the resource limited device; the response message includes the resource limited device corresponding to the device type Device information for your shadow device.
上述实施例提供的一种查询请求的处理装置,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。The device for processing query requests provided by the above embodiments is similar in implementation principle and technical effect to the above method embodiments, and will not be repeated here.
关于查询请求的处理装置的具体限定可以参见上文中对于查询请求的处理方法的限定,在此不再赘述。上述查询请求的处理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation of the query request processing device, please refer to the above limitation on the query request processing method, which will not be repeated here. Each module in the above query request processing device may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in the hardware form or independent of the processor in the computer device, or may be stored in the memory in the computer device in the form of software so that the processor can call and execute the operations corresponding to the above modules.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如上图2所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储查询请求的处理数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种查询请求的处理方法。In one embodiment, a computer device is provided. The computer device may be a server, and an internal structure diagram thereof may be as shown in FIG. 2 above. The computer device includes a processor, memory, network interface, and database connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store the processing data of the query request. The network interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, a query request processing method is realized.
本领域技术人员可以理解,上图2中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art may understand that the structure shown in FIG. 2 above is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. The specific computer equipment It may include more or less components than shown in the figures, or combine certain components, or have a different arrangement of components.
在一个实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现以下步骤:In one embodiment, a computer device is provided, which includes a memory and a processor, and a computer program is stored in the memory, and the processor implements the following steps when the processor executes the computer program:
接收设备查询请求;所述设备查询请求包括设备类型;Receiving a device query request; the device query request includes a device type;
检测所述设备类型对应的资源受限设备是否存在影子设备;Detecting whether there is a shadow device in the resource-restricted device corresponding to the device type;
若是,则根据所述影子设备的设备信息对所述设备查询请求进行处理。If yes, the device query request is processed according to the device information of the shadow device.
或者,该处理器执行计算机程序时实现以下步骤:Or, the processor implements the following steps when executing the computer program:
接收设备查询请求;所述查询请求包括设备类型;Receive a device query request; the query request includes the device type;
根据所述查询请求发送应答消息;所述应答消息包括所述设备类型对应资源受限设备的影子设备的设备信息。Sending a response message according to the query request; the response message includes device information of the shadow device of the resource-restricted device corresponding to the device type.
或者,该处理器执行计算机程序时实现以下步骤:Or, the processor implements the following steps when executing the computer program:
发送设备查询请求;所述查询请求包括设备类型;Send a device query request; the query request includes the device type;
接收所述设备类型对应的资源受限设备和/或所述资源受限设备的影子设备发送的应答消息;所述应答消息包括所述设备类型对应资源受限设备的影子设备的设备信息。Receiving a response message sent by the resource limited device corresponding to the device type and/or the shadow device of the resource limited device; the response message includes device information of the shadow device of the resource limited device corresponding to the device type.
上述实施例提供的一种计算机设备,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。A computer device provided by the foregoing embodiment has similar implementation principles and technical effects as the foregoing method embodiment, and details are not described herein again.
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:In one embodiment, a computer-readable storage medium is provided on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
接收设备查询请求;所述设备查询请求包括设备类型;Receiving a device query request; the device query request includes a device type;
检测所述设备类型对应的资源受限设备是否存在影子设备;Detecting whether there is a shadow device in the resource-restricted device corresponding to the device type;
若是,则根据所述影子设备的设备信息对所述设备查询请求进行处理。If yes, the device query request is processed according to the device information of the shadow device.
或者,计算机程序被处理器执行时实现以下步骤:Alternatively, when the computer program is executed by the processor, the following steps are realized:
接收设备查询请求;所述查询请求包括设备类型;Receive a device query request; the query request includes the device type;
根据所述查询请求发送应答消息;所述应答消息包括所述设备类型对应资源受限设备的影子设备的设备信息。Sending a response message according to the query request; the response message includes device information of the shadow device of the resource-restricted device corresponding to the device type.
或者,计算机程序被处理器执行时实现以下步骤:Alternatively, when the computer program is executed by the processor, the following steps are realized:
发送设备查询请求;所述查询请求包括设备类型;Send a device query request; the query request includes the device type;
接收所述设备类型对应的资源受限设备和/或所述资源受限设备的影子设备发送的应答消息;所述应答消息包括所述设备类型对应资源受限设备的影子设备的设备信息。Receiving a response message sent by the resource limited device corresponding to the device type and/or the shadow device of the resource limited device; the response message includes device information of the shadow device of the resource limited device corresponding to the device type.
上述实施例提供的一种计算机可读存储介质,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。The computer-readable storage medium provided by the foregoing embodiment has similar implementation principles and technical effects as the foregoing method embodiment, and will not be repeated here.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。A person of ordinary skill in the art may understand that all or part of the processes in the method of the above embodiments may be completed by instructing relevant hardware through a computer program, and the computer program may be stored in a non-volatile computer readable storage In the medium, when the computer program is executed, the process of the foregoing method embodiments may be included. Wherein, any reference to the memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The technical features of the above embodiments can be arbitrarily combined. In order to simplify the description, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be It is considered as the scope described in this specification. The above-mentioned embodiments only express several implementation manners of the present application, and their descriptions are more specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that, for those of ordinary skill in the art, without departing from the concept of the present application, a number of modifications and improvements can also be made, which all fall within the protection scope of the present application. Therefore, the protection scope of the patent of this application shall be subject to the appended claims.

Claims (25)

  1. 一种查询请求的处理方法,其特征在于,所述方法包括:A query request processing method, characterized in that the method includes:
    接收设备查询请求;所述设备查询请求包括设备类型;Receiving a device query request; the device query request includes a device type;
    检测所述设备类型对应的资源受限设备是否存在影子设备;Detecting whether there is a shadow device in the resource-restricted device corresponding to the device type;
    若是,则根据所述影子设备的设备信息对所述设备查询请求进行处理。If yes, the device query request is processed according to the device information of the shadow device.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述影子设备的设备信息对所述设备查询请求进行处理,包括:The method according to claim 1, wherein the processing of the device query request according to the device information of the shadow device includes:
    通过影子设备配置资源,获取所述影子设备的设备信息;Configuring resources through the shadow device to obtain device information of the shadow device;
    根据所述影子设备的设备信息向第三方设备发送第一应答消息;所述第一应答消息包括所述影子设备的设备信息。Send a first response message to a third-party device according to the device information of the shadow device; the first response message includes device information of the shadow device.
  3. 根据权利要求2所述的方法,其特征在于,所述影子设备的设备信息包括所述影子设备的标识ID和/或端口信息。The method according to claim 2, wherein the device information of the shadow device includes an identification ID and/or port information of the shadow device.
  4. 根据权利要求3所述的方法,其特征在于,所述影子设备的设备信息还包括设备类型、接口信息、软硬件版本信息、支持语言中的至少一个。The method according to claim 3, wherein the device information of the shadow device further includes at least one of device type, interface information, software and hardware version information, and supported languages.
  5. 根据权利要求2-4任一项所述的方法,其特征在于,所述第一应答消息还包括所述影子设备的可操作资源信息。The method according to any one of claims 2-4, wherein the first response message further includes operable resource information of the shadow device.
  6. 根据权利要求5所述的方法,其特征在于,所述可操作资源信息包括可操作资源的统一资源标识符URI、可操作资源的接口信息、可操作资源的资源类型中的至少一个。The method according to claim 5, wherein the operable resource information includes at least one of a uniform resource identifier URI of the operable resource, interface information of the operable resource, and a resource type of the operable resource.
  7. 根据权利要求2-4任一项所述的方法,其特征在于,所述通过影子设备配置资源,获取所述影子设备的设备信息之前,所述方法还包括:The method according to any one of claims 2-4, wherein, before configuring the resource through the shadow device and acquiring device information of the shadow device, the method further comprises:
    检测所述影子设备是否建立在云端;Detect whether the shadow device is established in the cloud;
    若所述影子设备建立在云端,则执行通过影子设备配置资源,获取所述影子设备的设备信息的步骤。If the shadow device is established in the cloud, a step of configuring resources through the shadow device and acquiring device information of the shadow device is performed.
  8. 根据权利要求1所述的方法,其特征在于,所述根据所述影子设备的设备信息对所述设备查询请求进行处理,包括:The method according to claim 1, wherein the processing of the device query request according to the device information of the shadow device includes:
    丢弃所述设备查询请求。Discard the device query request.
  9. 根据权利要求1所述的方法,其特征在于,所述根据所述影子设备的设备信息对所述设备查询请求进行处理,包括:The method according to claim 1, wherein the processing of the device query request according to the device information of the shadow device includes:
    向第三方设备发送第二应答消息;所述第二应答消息用于指示所述资源受限设备存在影子设备。Sending a second response message to a third-party device; the second response message is used to indicate that a shadow device exists in the resource-restricted device.
  10. 根据权利要求1-4任一项所述的方法,其特征在于,所述检测所述设备类型对应的资源受限设备是否存在影子设备,包括:The method according to any one of claims 1 to 4, wherein the detecting whether a shadow device exists in the resource-restricted device corresponding to the device type includes:
    获取影子设备配置资源参数中的影子设备生成指示位;Obtain the shadow device generation indicator bit in the shadow device configuration resource parameter;
    根据所述影子设备生成指示位检测所述设备类型对应的资源受限设备是否存在影子设备。Detecting whether a shadow device exists in the resource-restricted device corresponding to the device type according to the indication bit generated by the shadow device.
  11. 一种查询请求的处理方法,其特征在于,所述方法包括:A query request processing method, characterized in that the method includes:
    接收设备查询请求;所述设备查询请求包括设备类型;Receiving a device query request; the device query request includes a device type;
    根据所述设备查询请求发送应答消息;所述应答消息包括所述设备类型对应资源受限设备的影子设备的设备信息。Sending a response message according to the device query request; the response message includes device information of the shadow device of the resource-restricted device corresponding to the device type.
  12. 根据权利要求11所述的方法,其特征在于,所述影子设备的设备信息包括所述影子设备的标识ID和/或端口信息。The method according to claim 11, wherein the device information of the shadow device includes an identification ID and/or port information of the shadow device.
  13. 根据权利要求12所述的方法,其特征在于,所述影子设备的设备信息还包括设备类型、接口信息、软硬件版本信息、支持语言中的至少一个。The method according to claim 12, wherein the device information of the shadow device further includes at least one of device type, interface information, software and hardware version information, and supported languages.
  14. 根据权利要求11-13任一项所述的方法,其特征在于,所述应答消息还包括所述影子设备的可操作资源信息。The method according to any one of claims 11-13, wherein the response message further includes information on operable resources of the shadow device.
  15. 根据权利要求14所述的方法,其特征在于,所述可操作资源信息包括可操作资源的统一资源标识符URI、可操作资源的接口信息、可操作资源的资源类型中的至少一个。The method according to claim 14, wherein the operable resource information includes at least one of a uniform resource identifier URI of the operable resource, interface information of the operable resource, and a resource type of the operable resource.
  16. 一种查询请求的处理方法,其特征在于,所述方法包括:A query request processing method, characterized in that the method includes:
    发送设备查询请求;所述设备查询请求包括设备类型;Send a device query request; the device query request includes the device type;
    接收所述设备类型对应的资源受限设备和/或所述资源受限设备的影子设备发送的应答消息;所述应答消息包括所述设备类型对应资源受限设备的影子设备的设备信息。Receiving a response message sent by the resource limited device corresponding to the device type and/or the shadow device of the resource limited device; the response message includes device information of the shadow device of the resource limited device corresponding to the device type.
  17. 根据权利要求16所述的方法,其特征在于,所述影子设备的设备信息包括所述影子设备的标识ID和/或端口信息。The method according to claim 16, wherein the device information of the shadow device includes an identification ID and/or port information of the shadow device.
  18. 根据权利要求17所述的方法,其特征在于,所述影子设备的设备信息还包括设备类型、接口信息、软硬件版本信息、支持语言中的至少一个。The method according to claim 17, wherein the device information of the shadow device further includes at least one of device type, interface information, software and hardware version information, and supported languages.
  19. 根据权利要求16-18任一项所述的方法,其特征在于,所述应答消息还包括所述影子设备的可操作资源信息。The method according to any one of claims 16 to 18, wherein the response message further includes operable resource information of the shadow device.
  20. 根据权利要求19所述的方法,其特征在于,所述可操作资源信息包括可操作资源的统一资源标识符URI、可操作资源的接口信息、可操作资源的资源类型中的至少一个。The method according to claim 19, wherein the operable resource information includes at least one of a uniform resource identifier URI of the operable resource, interface information of the operable resource, and a resource type of the operable resource.
  21. 一种查询请求的处理装置,其特征在于,所述装置包括:An inquiry request processing device, characterized in that the device comprises:
    第一接收模块,用于接收设备查询请求;所述设备查询请求包括设备类型;The first receiving module is used to receive a device query request; the device query request includes a device type;
    第一检测模块,用于检测所述设备类型对应的资源受限设备是否存在影子设备;A first detection module, configured to detect whether a shadow device exists in the resource-restricted device corresponding to the device type;
    应答模块,用于若所述资源受限设备存在影子设备,则根据所述影子设备的设备信息对所述设备查询请求进行处理。The response module is configured to process the device query request according to the device information of the shadow device if there is a shadow device in the resource-restricted device.
  22. 一种查询请求的处理装置,其特征在于,所述装置包括:An inquiry request processing device, characterized in that the device comprises:
    第二接收模块,用于将接收设备查询请求;所述设备查询请求包括设备类型;A second receiving module, configured to receive a device query request; the device query request includes a device type;
    第一发送模块,用于根据所述设备查询请求发送应答消息;所述应答消息包括所述设备类型对应资源受限设备的影子设备的设备信息。The first sending module is configured to send a response message according to the device query request; the response message includes device information of the shadow device of the resource-restricted device corresponding to the device type.
  23. 一种查询请求的处理装置,其特征在于,所述装置包括:An inquiry request processing device, characterized in that the device includes:
    第二发送模块,用于发送设备查询请求;所述设备查询请求包括设备类型;The second sending module is used to send a device query request; the device query request includes a device type;
    第三接收模块,用于接收所述设备类型对应的资源受限设备和/或所述资源受限设备的影子设备发送的应答消息;所述应答消息包括所述设备类型对应资源受限设备的影子设备的设备信息。A third receiving module, configured to receive a response message sent by the resource-restricted device corresponding to the device type and/or the shadow device of the resource-restricted device; the response message includes the resource-restricted device corresponding to the device type Device information for shadow devices.
  24. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至20中任一项所述方法的步骤。A computer device includes a memory and a processor, and the memory stores a computer program, wherein the processor executes the computer program to implement the steps of the method according to any one of claims 1 to 20.
  25. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至20中任一项所述的方法的步骤。A computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 20 are implemented.
PCT/CN2019/071277 2019-01-11 2019-01-11 Method and apparatus for processing query request, computer device and storage medium WO2020143013A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980002760.7A CN110753921B (en) 2019-01-11 2019-01-11 Query request processing method, device, computer equipment and storage medium
PCT/CN2019/071277 WO2020143013A1 (en) 2019-01-11 2019-01-11 Method and apparatus for processing query request, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/071277 WO2020143013A1 (en) 2019-01-11 2019-01-11 Method and apparatus for processing query request, computer device and storage medium

Publications (1)

Publication Number Publication Date
WO2020143013A1 true WO2020143013A1 (en) 2020-07-16

Family

ID=69286010

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/071277 WO2020143013A1 (en) 2019-01-11 2019-01-11 Method and apparatus for processing query request, computer device and storage medium

Country Status (2)

Country Link
CN (1) CN110753921B (en)
WO (1) WO2020143013A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112492037A (en) * 2020-12-01 2021-03-12 珠海格力电器股份有限公司 Data processing system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007110754A2 (en) * 2006-03-27 2007-10-04 Nokia Corporation Remote access
CN107846336A (en) * 2017-10-30 2018-03-27 北京聚鼎和科技有限公司 The method and device of internet of things equipment control
CN109150914A (en) * 2018-10-23 2019-01-04 上海上实龙创智慧能源科技股份有限公司 Internet of Things security architecture and its gateway reorientation method, data packet handshake method
CN109618202A (en) * 2018-12-24 2019-04-12 深圳创维-Rgb电子有限公司 Control method, TV and the readable storage medium storing program for executing of peripheral hardware

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102013208111B4 (en) * 2012-05-04 2017-11-02 General Motors Llc Calling a remote communication device using a data channel communication path
CN103516601B (en) * 2012-06-29 2016-08-03 华为技术有限公司 Route transmission method and apparatus and system
US9973593B2 (en) * 2015-06-30 2018-05-15 Amazon Technologies, Inc. Device gateway
CN107528830B (en) * 2017-08-03 2020-04-10 携程旅游信息技术(上海)有限公司 Account login method, system and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007110754A2 (en) * 2006-03-27 2007-10-04 Nokia Corporation Remote access
CN107846336A (en) * 2017-10-30 2018-03-27 北京聚鼎和科技有限公司 The method and device of internet of things equipment control
CN109150914A (en) * 2018-10-23 2019-01-04 上海上实龙创智慧能源科技股份有限公司 Internet of Things security architecture and its gateway reorientation method, data packet handshake method
CN109618202A (en) * 2018-12-24 2019-04-12 深圳创维-Rgb电子有限公司 Control method, TV and the readable storage medium storing program for executing of peripheral hardware

Also Published As

Publication number Publication date
CN110753921A (en) 2020-02-04
CN110753921B (en) 2023-08-29

Similar Documents

Publication Publication Date Title
CN106685776B (en) Intelligent device discovery method and system in local area network
US20180109929A1 (en) Enabling Multicast For Service Layer Group Operation
CN103312528B (en) A kind of heartbeat message sending method and user terminal
WO2019134595A1 (en) Configuration system, client device, embedded device configuration method, and storage medium
CN107592367A (en) Resource share method, device and the computer-readable recording medium of home appliance
WO2020118633A1 (en) Subscription message processing method and apparatus, and computer device and storage medium
US10805781B2 (en) Method and apparatus for establishing a connection between devices
US20190089648A1 (en) Resource subscription method, resource subscription apparatus, and resource subscription system
CN111107176A (en) Data transmission method and device, computer equipment and storage medium
WO2020143013A1 (en) Method and apparatus for processing query request, computer device and storage medium
WO2020147081A1 (en) Data transmission method, related device, and computer storage medium
WO2020177020A1 (en) Internet of things device discovery method, apparatus, and terminal device
WO2015101297A1 (en) Service query method, device and system and station
CN110278558B (en) Message interaction method and WLAN system
CN103731510B (en) Data interaction method for application layer of wireless sensor network based on IPv6 (internal protocol version 6)
CN112583875A (en) Asset scanning method and device
WO2020009797A1 (en) Efficient resource representation exchange between service layers
WO2017219777A1 (en) Packet processing method and device
CN110661895A (en) Network address mapping method and network address mapping equipment of server
JP2008301159A (en) Inter-network mediating device
WO2021134766A1 (en) Method, apparatus and device for determining device state, and storage medium
US20230208938A1 (en) Orchestrating execution of a complex computational operation
KR102137118B1 (en) Method and apparatus for data distribution service, data distribution service system
WO2021134252A1 (en) Inter-device communication method and apparatus, and storage medium
CN104486252B (en) A kind of method and device of thin-client access standard client

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19909112

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19909112

Country of ref document: EP

Kind code of ref document: A1