Device management method, device, computer equipment and storage medium in the Internet of Things
By using service instance identification instead of traditional service types and service names in IoT device management, the problem of high network resource consumption caused by large amount of requested data is solved, and more efficient device management operations are achieved.
Patent Information
- Application Number
- CN202080102965.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-31
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2040-08-31
AI Technical Summary
In the Internet of Things, a large number of string parameters (such as service type and service name) are required to transmit during the management of server devices, resulting in large amounts of requested data and high network resource consumption, especially for devices with limited resources.
By using a Service Instance ID (SIID), the identity is processed based on a Service-Universally Unique Identifier (Service-UUID), replacing the traditional service type and service name, thereby reducing the amount of data in the request.
It significantly reduces the amount of data in the request, reduces the consumption of network resources, and improves the efficiency of device management operations.
Smart Images

Figure CN115836511B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of Internet of Things, and in particular to a device management method, apparatus, computer equipment and storage medium in the Internet of Things. Background Art
[0002] In the Internet of Things (IOT), to manage server devices through clients, it is necessary to instantiate the model of the server devices.
[0003] In the related art, during the management process of the server device, it is necessary to carry the identifier of the target service to be managed in the server device in the request so that the cloud platform or the server device can verify the legitimacy of the request; wherein, the identifier is usually composed of two character strings: the service type and the service name. Summary of the invention
[0004] The present application provides a method, apparatus, computer equipment and storage medium for managing devices in the Internet of Things. The technical solution is as follows:
[0005] On the one hand, an embodiment of the present application provides a device management method in an Internet of Things, the method being executed by a cloud platform in the Internet of Things, the method comprising:
[0006] Receive a first request sent by an IoT device, where the first request includes a service instance identifier and a service element identifier of a target service in a server device;
[0007] Processing the service instance identifier to obtain a service universal unique identifier of the target service;
[0008] Querying a model description file of the target service based on a service universal unique identifier of the target service;
[0009] Verifying the legitimacy of the first request based on the model description file of the target service and the service element identifier;
[0010] When the first request passes the verification, a management operation on the server device is performed based on the first request.
[0011] On the other hand, an embodiment of the present application provides a device management method in an Internet of Things, the method being executed by an Internet of Things device in the Internet of Things, the method comprising:
[0012] Sending a first request to the cloud platform, wherein the first request includes a service instance identifier and a service element identifier of a target service in a server-side device; the first request is used to instruct the cloud platform to process the service instance identifier, obtain a service universal unique identifier of the target service, query a model description file of the target service based on the service universal unique identifier of the target service, verify the legitimacy of the first request based on the model description file of the target service and the service element identifier, and in response to the first request passing the verification, perform a management operation on the server-side device based on the first request;
[0013] Receive a management operation response to the first request sent by the cloud platform.
[0014] On the other hand, an embodiment of the present application provides a device management method in an Internet of Things, the method being executed by a server device in the Internet of Things, the method comprising:
[0015] Receive a first request sent by a management device, where the first request includes a service instance identifier and a service element identifier of a target service in a server device;
[0016] Verifying the legitimacy of the first request according to the service instance identifier and the service element identifier;
[0017] When the first request passes the verification, a management operation on the server device is performed based on the first request.
[0018] On the other hand, an embodiment of the present application provides a device management apparatus in an Internet of Things, the device being used in a cloud platform in the Internet of Things, the device comprising:
[0019] A first request receiving module, configured to receive a first request sent by an IoT device, wherein the first request includes a service instance identifier and a service element identifier of a target service in a server device;
[0020] An identification processing module, used to process the service instance identification to obtain a service universal unique identification code of the target service;
[0021] A file query module, used for querying a model description file of the target service based on a service universal unique identifier of the target service;
[0022] A verification module, used to verify the legitimacy of the first request based on the model description file of the target service and the service element identifier;
[0023] A management execution module is used to execute a management operation on the server device based on the first request when the first request passes the verification.
[0024] On the other hand, an embodiment of the present application provides a device management apparatus in an Internet of Things, the device being used in an Internet of Things device, the device comprising:
[0025] A first request sending module is used to send a first request to the cloud platform, wherein the first request includes a service instance identifier and a service element identifier of a target service in a server-side device; the first request is used to instruct the cloud platform to process the service instance identifier, obtain a service universal unique identifier of the target service, query a model description file of the target service based on the service universal unique identifier of the target service, verify the legitimacy of the first request based on the model description file and the service element identifier of the target service, and execute a management operation on the server-side device based on the first request in response to the first request passing the verification;
[0026] A response receiving module is used to receive a management operation response to the first request sent by the cloud platform.
[0027] On the other hand, an embodiment of the present application provides a device management apparatus in an Internet of Things, the device being used in a server device in the Internet of Things, the device comprising:
[0028] A first request receiving module, configured to receive a first request sent by a management device, wherein the first request includes a service instance identifier and a service element identifier of a target service in a server device;
[0029] A verification module, used to verify the legitimacy of the first request according to the service instance identifier and the service element identifier;
[0030] A management execution module is used to execute a management operation on the server device based on the first request when the first request passes the verification.
[0031] On the other hand, an embodiment of the present application provides a computer device, which includes a processor, a memory and a transceiver, wherein the memory stores a computer program, and the computer program is used to be executed by the processor to implement the above-mentioned device management method in the Internet of Things.
[0032] On the other hand, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the above-mentioned device management method in the Internet of Things.
[0033] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the device management method in the Internet of Things.
[0034] The technical solution provided in the embodiments of the present application can bring the following beneficial effects:
[0035] In the first request sent by the IoT device to the cloud platform, the target service is indicated by the service instance identifier obtained by processing the service universal unique identifier of the target service, so that the cloud platform can determine the target service and the model description file corresponding to the target service through the service instance identifier, thereby realizing subsequent legitimacy verification and management operations. Since the data volume of the service instance identifier is lower than the data volume of the character string of the model type and model name, the above scheme can significantly reduce the amount of data in the request. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0037] Figure 1 is a schematic diagram of a network architecture of the Internet of Things provided by an embodiment of the present application;
[0038] Figure 2 yes Figure 1 A framework diagram of a device model involved in the illustrated embodiment;
[0039] Figure 3 is a flow chart of a device management method in the Internet of Things provided by an embodiment of the present application;
[0040] Figure 4 is a flow chart of a device management method in the Internet of Things provided by an embodiment of the present application;
[0041] Figure 5 yes Figure 4 A schematic diagram of event reporting involved in the illustrated embodiment;
[0042] Figure 6 yes Figure 4 A schematic diagram of device control related to the illustrated embodiment;
[0043] Figure 7is a flow chart of a device management method in the Internet of Things provided by an embodiment of the present application;
[0044] Figure 8 yes Figure 7 A flowchart of a first request processing involved in the illustrated embodiment;
[0045] Fig. 9 It is a block diagram of a device management apparatus in the Internet of Things provided by an embodiment of the present application;
[0046] Fig.10 It is a block diagram of a device management apparatus in the Internet of Things provided by an embodiment of the present application;
[0047] Fig.11 It is a block diagram of a device management apparatus in the Internet of Things provided by an embodiment of the present application;
[0048] Fig.12 It is a schematic diagram of the structure of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0049] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0050] The network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0051] Please refer to Figure 1 , which shows a schematic diagram of a network architecture of the Internet of Things provided by an embodiment of the present application. The network architecture of the Internet of Things may include: a server device 110, a cloud platform 120, and a client device 130;
[0052] The server device 110 may be a device for providing IoT functional services.
[0053] For example, the server device 110 may be a smart home device, such as a smart TV, a smart air conditioner, a smart refrigerator, a smart microwave oven, a smart rice cooker, a sweeping robot, and the like.
[0054] Alternatively, the server device 110 may be an industrial production equipment, such as a lathe, an industrial robot, a solar panel, a wind turbine, and the like.
[0055] Alternatively, the service-end device 110 may be a commercial service device, such as an unmanned vending machine, etc.
[0056] Alternatively, the server device 110 may be an intelligent monitoring device, such as a monitoring camera, an infrared sensor, a sound sensor, a temperature sensor, and the like.
[0057] The cloud platform 120 is a cloud service platform deployed on the network side. For example, the cloud platform 120 can be a cloud service platform implemented based on a single server or multiple servers.
[0058] The client device 130 is a user device for managing the server device 110. For example, the client device 130 is a computer device with built-in management software, such as a smart phone, a tablet computer, a smart watch, a personal computer, such as a desktop computer, a portable computer, a personal workstation, etc.
[0059] The cloud platform 120 is connected to the server device 110 and the client device 130 via a wired or wireless network. In a possible implementation, the server device 110 and the client device 130 are connected via a wired or wireless network.
[0060] Optionally, the wired or wireless network uses standard communication technology and / or protocols. For example, the wired or wireless network may be a communication network based on an IoT protocol.
[0061] In the embodiment of the present application, the above-mentioned server device 110, cloud platform 120 and client device 130 can be IoT devices that meet industry standards, for example, can be IoT devices that meet the Open Connectivity Foundation (OCF) standards.
[0062] OCF is an emerging IoT application layer technology standard organization. OCF has developed a RESTful (a design style and development method for network applications) service framework to achieve interconnection between IoT devices. In the OCF service framework, the IoT devices, as well as the device's functional services and device status information are described through the device resource model. The IoT terminal device that provides resources is the OCF server (i.e. the above-mentioned server device), and the control terminal that accesses resources is the OCF client (i.e. the above-mentioned client device).
[0063] For example, the control terminal that obtains indoor environmental status data is the client device, and the sensor device that monitors indoor environmental status data is the server device. The business interaction between the client device and the server device is achieved by creating, reading, updating, deleting or notifying resources.
[0064] The standard schema is used to describe the interoperability abstraction of devices. Each device schema can contain multiple services. Each service contains properties, actions, and events. The standard description information of the device can be obtained through the standard schema file, thereby achieving the purpose of device self-description and interoperability. Among them:
[0065] 1a A physical device corresponds to a device abstraction device, such as a lamp corresponds to the abstraction light;
[0066] 2. A physical device has multiple services, each of which is an independent and meaningful functional group;
[0067] 3. A service contains multiple properties, actions and events;
[0068] 4. Each property needs to clearly define the attribute meaning, data format, access method, value range and precision, unit, etc.;
[0069] 5. Each action needs to clearly define the action meaning, input parameter list, and output parameter list;
[0070] 6. Each event needs to clearly state the meaning of the event and the output parameter list.
[0071] In the Internet of Things system, before a device product manufacturer puts a device product on the market, it is necessary to instantiate the device model of the device product.
[0072] The definition of a device model is to abstract the device's attributes, operations, events and other elements based on the device's capabilities; by operating the above elements, the device status can be acquired, or the device function can be started or ended.
[0073] Please refer to Figure 2 , which shows a framework diagram of the device model involved in the embodiment of the present application. Figure 2 As shown, a device 21 includes one or more services 22, and the service 22 corresponds to a number of operations 22a, attributes 22b and / or events 22c.
[0074] exist Figure 2 In this context, a device refers to the server-side device in the aforementioned IoT, also known as an application terminal, whose functional set can be described by different service sets;
[0075] A service is an independent and meaningful group of functions that can be reused among different types of application terminals.
[0076] Attributes are the smallest units that describe the status and functions of application terminals;
[0077] Operations are used to implement specific functions of a service, which generally cannot be accomplished by operating on a single attribute;
[0078] An event is specific information actively reported by an application terminal.
[0079] When a device model is instantiated, the services, attributes, operations, and events in the device model need to be identified. Usually, for the services in the device model, during the device management process, it is necessary to know the type of service in order to verify the legitimacy of the request. At the same time, since there may be multiple services of the same type in a device model, it is also necessary to know the service name in order to accurately locate the service to be managed. Therefore, in a request, both the service type and the service name are required to identify the service to be managed, while the attributes, operations, and events in the service are identified by the corresponding names. When managing the server-side device through the instantiated device model, it is necessary to transmit strings such as the service type, service name, and the name of the attribute / operation / event as parameters of the communication protocol so that the cloud platform or the server-side device can perform legitimacy verification and perform corresponding management actions.
[0080] However, the above-mentioned service type, service name, attribute / operation / event name and other character strings usually require a large number of bytes, resulting in excessive redundancy in the transmitted content and consumption of excessive network resources, which has a particularly negative effect on resource-constrained devices.
[0081] The solution shown in the subsequent embodiments of the present application provides a solution for device management through requests with low data volume, which can simplify the parameter content in the request and save network resources.
[0082] In the scheme shown in the subsequent embodiments of the present application, the service type and service name of the target service can be replaced by the service instance identifier of the target service in the server-side device, wherein the service instance identifier is a digital identifier, which can significantly reduce the amount of data in the request.
[0083] In a possible implementation, the scheme shown in the subsequent embodiments of the present application also uses an instance identifier in the form of a digital identifier to replace the name of the attribute / operation / event in the request, so as to further reduce the amount of data in the request.
[0084] Please refer to Figure 3 , which shows a flow chart of a device management method in the Internet of Things provided by an embodiment of the present application, the method can be executed by a cloud platform and an Internet of Things device in the Internet of Things, wherein the above-mentioned cloud platform can be Figure 1In the network architecture shown in FIG. 1 , the above-mentioned IoT devices may be Figure 1 The server device 110 or the client device 130 in the network architecture shown. The method may include the following steps:
[0085] Step 301: The IoT device sends a first request to the cloud platform, and the cloud platform receives the first request; the first request includes a service instance identifier and a service element identifier of a target service in the server device.
[0086] In a possible implementation, the service instance identifier is a digital identifier obtained by performing digital transformation processing on a service universal unique identifier of the target service.
[0087] In a possible implementation, the IoT device is a client device, and the first request is a control request or an attribute value query request sent by the client device.
[0088] In a possible implementation, the IoT device is a server device, and the first request is an event reporting request sent by the server device.
[0089] The above-mentioned service instance identifier (Service Instance ID, SIID) is an instantiation identifier generated for the corresponding service during the process of instantiating the device, and is used to identify the corresponding service in the device model after instantiation.
[0090] The Service-Universally Unique Identifier (Service-UUID) is an identifier pre-set for a certain type of service, that is, the Service-UUID identifies the same service in the Internet of Things.
[0091] In the embodiment of the present application, the service universal unique identifier is a digital identifier, and the service instance identifier of the target service is obtained by digitally changing the service universal unique identifier of the service. Therefore, the service instance identifier of the target service can replace both the service type and the service name.
[0092] In a possible implementation, the first request further includes a device identifier of the server device; in an exemplary solution, the first request further includes a device type of the server device.
[0093] Step 302: The cloud platform processes the service instance identifier to obtain a service universal unique identifier of the target service.
[0094] In an embodiment of the present application, if the above-mentioned service instance identifier is a digital identifier obtained by digitally changing the service universal unique identifier of the target service; then the cloud platform performs reverse digital change processing on the service instance identifier to obtain the service universal unique identifier of the target service.
[0095] In the embodiment of the present application, since the service instance identifier of the target service is obtained by digitally changing the service universal unique identifier of the service, as long as the rules for reverse digitally changing the service universal unique identifier are determined, the service universal unique identifier of the target service can be reversed from the service instance identifier by reverse digitally changing it.
[0096] Step 303: The cloud platform queries the model description file of the target service based on the service universal unique identifier of the target service.
[0097] Step 304: The cloud platform verifies the legitimacy of the first request based on the model description file and service element identifier of the target service.
[0098] Step 305: When the first request passes the verification, the cloud platform performs a management operation on the server device based on the first request.
[0099] In an embodiment of the present application, when the first request is a control request for a server-side device, the cloud platform may send a corresponding device control request to the server-side device to instruct the server-side device to perform a corresponding control operation.
[0100] When the first request is an attribute value query request or a control request, the cloud platform may query the attribute values of service elements of one or more attribute types of the target service in the server-side device.
[0101] When the first request is an event reporting request, the cloud platform may record the corresponding event.
[0102] Step 306: The cloud platform sends a management operation response to the first request to the IoT device, and correspondingly, the IoT device receives the management operation response.
[0103] In an embodiment of the present application, when the first request is a control request for the server device, the cloud platform returns a response to the client device as to whether the server device successfully executes the corresponding control operation.
[0104] When the first request is an attribute value query request, the cloud platform may return the attribute values of one or more attribute types of the service elements that have been queried to the client device.
[0105] When the first request is an event reporting request, the cloud platform may return a response to the server device indicating whether the event was recorded successfully.
[0106] To summarize, in the scheme shown in the embodiment of the present application, in the first request sent by the IoT device to the cloud platform, the target service is indicated by the service instance identifier obtained by processing the service universal unique identifier of the target service, so that the cloud platform can determine the target service and the model description file corresponding to the target service through the service instance identifier, thereby realizing subsequent legitimacy verification and management operations. Since the data volume of the service instance identifier is lower than the data volume of the character string of the model type and model name, the above scheme can significantly reduce the amount of data in the request.
[0107] In the embodiment of the present application, the request includes not only the service instance identifier of the target service, but also the relevant information of the service element in the target service. When performing the legality check, the cloud platform performs the legality check in combination with the service instance identifier and the relevant information of the service element.
[0108] Please refer to Figure 4 , which shows a flow chart of a device management method in the Internet of Things provided by an embodiment of the present application, the method can be executed by a cloud platform and an Internet of Things device in the Internet of Things, wherein the above-mentioned cloud platform can be Figure 1 In the network architecture shown in FIG. 1 , the above-mentioned IoT devices may be Figure 1 The server device 110 or the client device 130 in the network architecture shown. The method may include the following steps:
[0109] Step 401: The IoT device sends a first request to the cloud platform, and the cloud platform receives the first request; the first request includes a service instance identifier and a service element identifier of a target service in the server device.
[0110] The service instance identifier is an identifier obtained by processing the service universal unique identifier of the target service. For example, the service instance identifier is a digital identifier obtained by digitally changing the service universal unique identifier of the target service.
[0111] In an embodiment of the present application, the service element identifier includes the element name of at least one service element in the target service; or, the service element identifier includes the instance identifier of at least one service element in the target service; wherein the service element includes at least one of an operation, an attribute, and an event.
[0112] Among them, when the Internet of Things device is a client device and the above-mentioned first request is a control request for the server device, the element name of the at least one service element can be implemented as an attribute name list or a method name list.
[0113] When the IoT device is a client device and the first request is an attribute value query request, the element name of the at least one service element may be implemented as an attribute name list.
[0114] When the IoT device is a server device and the first request is an event reporting request, the element name of the at least one service element may be implemented as an event name list.
[0115] In the embodiment of the present application, the first request also includes a management parameter (payload) of at least one service element.
[0116] For example, when the first request is a control request for the server device, the management parameter may be an updated attribute value (changes) or an action parameter (action).
[0117] When the first request is an event reporting request, the element name of the at least one service element may be implemented as event information.
[0118] In the embodiment of the present application, the service universal unique identifier service-UUID, service instance identifier siid, and instance identifier iid of the service element of the target service can be set by the management device of the cloud platform. The setting process of the above siid and iid is as follows:
[0119] S1, the management device displays the service setting interface, which is used to set the services supported by the cloud platform.
[0120] S2, the management device obtains the service universal unique identification code of the candidate service and the instance identification of each service element in the candidate service according to the setting operation in the service setting interface.
[0121] The scheme shown in the above steps S1 and S2 is only introduced by taking the example of setting the service universal unique identifiers of various services supported by the cloud platform and the instance identifiers of each candidate service element through the service setting interface. In another possible implementation, the service universal unique identifiers of various services supported by the above cloud platform and the instance identifiers of each candidate service element can also be updated directly to the management device by the developer through code. The embodiment of the present application does not limit the setting method of the service universal unique identifier of the service and the instance identifier of each candidate service element.
[0122] Through the methods of step S1 and step S2 above, various common device models can be pre-set in the management device.
[0123] For example, taking the device model of a lamp as an example, the general lamp device model is shown in Table 1 below:
[0124] Table 1
[0125]
[0126] As shown in the above Table 1, the device type column indicates the device type of the lamp device.
[0127] Each row in the device description column represents various services available in the light device. Take "service.light.100002" as an example, where "service.light" is the service type and the last 5 digits of "100002" are the service universal unique identifier of the service.
[0128] Taking the above service "service.light.100002" as an example, the service elements of the "light" service can be shown in Table 2 below:
[0129] Attribute Identifier IID V1.property.power.2xxxxx 1 V1.property.brightness.2xxxxx 2 V1.property.cct.2xxxxx 3 V1.property.lightMode.2xxxxx 4 V1.property.autoColorTemperature.2xxxxx 5 V1.property.colorRGB.2xxxxx 6 V1.property.colorSaturation.2xxxxx 7 V1.property.action.lightLanguage.300039 8 V1.property.autoBrightness.2xxxxx 9 reserved 10 V1.property.freeControlNightLight.2xxxxx 11
[0130] It can be seen from Table 1 and Table 2 above that a service-UUID is assigned to each service, and an iid is assigned to each attribute, method, and event in a specific service; in the product application scenario, the above model needs to be instantiated in order to generate an instantiation file of the device model that can match the real product.
[0131] Taking the above lamp device model as an example, if a lamp product has two lamps: a main light and a night light, then the light Service needs to be instantiated twice.
[0132] S3, the request terminal sends an instantiation request for the target device product to the management device; correspondingly, the management device receives the instantiation request.
[0133] The instantiation request indicates that the target device product corresponds to a target service.
[0134] In an embodiment of the present application, after the administrator of the requesting terminal selects the target service in the above service selection interface and selects the service element of the target service in the service element selection interface, the requesting terminal can send an instantiation request to the management device.
[0135] In a possible implementation manner, the instantiation request includes the service type of the target service and the element type of each service element of the target service.
[0136] S4, the management device obtains instantiation order information of the target service, where the instantiation order information is used to indicate that the target service is the i-th service of the same type in the target device product; i≥1, and i is an integer.
[0137] S5, the management device generates a service instance identifier of the target service according to the instantiation order information and an identifier generation rule; the identifier generation rule is a rule for identifying a service in digital form.
[0138] In a possible implementation of the present application, when the service instance identifier of the target service is generated according to the identifier generation rule, the generation may be performed based on the Service-UUID of the target service.
[0139] For example, the step of the management device generating the service instance identifier of the target service according to the instantiation order information and the identifier generation rule may include the following:
[0140] S5a, obtaining the service type corresponding to the target service.
[0141] In a possible implementation manner, the management device obtains the service type of the target service from the instantiation request.
[0142] S5b, obtaining a service universal unique identifier corresponding to the service type.
[0143] Among them, the service universal unique identification code is a digital identifier.
[0144] In the embodiment of the present application, after the management device creates a candidate service, the service type of the candidate service and the service universal unique identifier are stored in correspondence.
[0145] In the instantiation phase, the management device locally queries the service universal unique identifier corresponding to the service type according to the service type, that is, the digital identifier set for the service by the operator of the management device when creating the service.
[0146] S5c, according to the identification generation rule, the service universal unique identification code is digitally changed to obtain a processed digital identification.
[0147] In the embodiment of the present application, when the service universal unique identifier is digitally changed according to the identifier generation rule, the management device performs a left shift of a specified number of bits on the service universal unique identifier in binary to obtain the processed digital identifier.
[0148] In the embodiment of the present application, since the service universal unique identifier of the target service is a digital identifier, the service universal unique identifier of the target service can be left-shifted by a specified number of bits by processing binary numbers to obtain a processed digital identifier.
[0149] For a number, shifting it left by n bits in binary is equivalent to multiplying it by 2 to the power of n in decimal. For example, taking the number of designated bits as 8 and the target service's service universal identifier as 2, shifting the target service's service universal unique identifier left by 8 bits in binary is equivalent to 2 times 2 to the power of 8 (i.e., 2 times 256).
[0150] S5d, obtaining a service instance identifier of the target service according to the processed digital identifier and the instantiation order information.
[0151] In an embodiment of the present application, after the service universal unique identifier is digitally changed to obtain the processed digital identifier, the management device then combines the instantiation order of each service of the same type to obtain the corresponding service instance identifier, thereby distinguishing different services of the same type through the service instance identifier.
[0152] In one possible implementation, when obtaining the service instance identifier of the target service based on the processed digital identifier and the instantiation order information, the management device may add the processed digital identifier to i and then subtract 1 to obtain the digital identifier as the service instance identifier of the target service.
[0153] For example, taking the target service's service universal identifier as 2 and the specified number of bits as 8, for a device product with multiple services of the same type, when the first service of the multiple services of the same type is instantiated, the service instance identifier of the first service is 2*256; when the second service of the multiple services of the same type is instantiated, the service instance identifier of the second service is 2*256+1; when the third service of the multiple services of the same type is instantiated, the service instance identifier of the third service is 2*256+2, and so on.
[0154] In the scheme shown in the embodiment of the present application, the service universal unique identifier is processed as described above to obtain a processed digital identifier, and the service instance identifier is obtained by combining the digital identifier and the instantiation order information. The obtained service instance identifier can not only represent the identifier of the corresponding service, but also implicitly identify the type of service.
[0155] In another possible implementation of the present application, when generating the service instance identifier of the target service according to the instantiation order information and the identifier generation rule, the management device may use the digital identifier obtained by adding i to the specified digital identifier and then subtracting 1 as the service instance identifier of the target service; the specified digital identifier is an integer greater than or equal to 1.
[0156] For example, taking the specified digital identifier as 1, for a device product that has multiple services of the same type, when the first service of the multiple services of the same type is instantiated, the service instance identifier of the first service is 1; when the second service of the multiple services of the same type is instantiated, the service instance identifier of the second service is 2; when the third service of the multiple services of the same type is instantiated, the service instance identifier of the third service is 3, and so on.
[0157] S6, the management device obtains the element type of each service element in the target service; and obtains the instance identifier of each service element according to the element type of each service element.
[0158] The management device may also generate a device model instantiation file including a service instance identifier of the target service and instance identifiers of the above-mentioned various service elements.
[0159] In step 402, the cloud platform right-shifts the service instance identifier by the specified number of bits in binary to obtain the service universal unique identifier of the target service.
[0160] The service instance identifier is obtained by shifting the service universal unique identification code of the target service to the left by a specified number of bits.
[0161] In the embodiment of the present application, after receiving the first request, the cloud platform shifts the service instance identifier right by a specified number of digits in binary. For a digital identifier, shifting right by a specified number of digits in binary means dividing the digital identifier by 2 raised to the power of a specified number of digits.
[0162] For example, taking the specified number of bits as 8, the siid of the target service is shifted right by the specified number of bits in binary, which is siid / 256.
[0163] Step 403: The cloud platform queries the model description file of the target service based on the service universal unique identifier of the target service.
[0164] The model description file may be a protobuf file of the service type to which the target service belongs, which contains definitions of service elements such as attributes, operations, and events of the service of this type.
[0165] In a possible implementation, the definition includes the name, identifier, value range, etc. of the corresponding service element.
[0166] In a possible implementation manner, the identifier of the service element may be an instance identifier (Instance ID, IID).
[0167] Step 404: The cloud platform verifies the legitimacy of the first request based on the model description file and service element identifier of the target service.
[0168] In an embodiment of the present application, the cloud platform verifies the content of the first request based on the model description file of the target service to verify the legitimacy of the first request.
[0169] In an embodiment of the present application, the cloud platform may compare the service element in the first request with the service element in the model description file, for example, compare the name of the service element in the first request with the name of the service element in the model description file, or compare the iid of the service element in the first request with the iid of the service element in the model description file, so as to determine whether the service element in the first request exists in the model description file. If the first request also includes parameters of the service element, it is further determined whether the parameters of the service element in the first request satisfy the value range defined in the model description file. If the service element in the first request exists in the model description file and the parameters of the service element in the first request also satisfy the value range defined in the model description file, it is determined that the first request is legal. In a possible implementation method, if the service element in the first request does not exist in the model description file, or the parameters of the service element in the first request also satisfy the value range defined in the model description file, it is determined that the first request is illegal.
[0170] Step 405: When the first request passes the verification, a management operation on the server device is performed based on the first request.
[0171] In one possible implementation, when the IoT device is a client device, the first request is a control request for the server device, and the service element identifier includes the element name of the at least one service element, the cloud platform replaces the element name of the at least one service element in the first request with the instance identifier of the at least one service element to obtain a device control request; and sends the device control request to the server device, where the device control request is used to instruct the server device to perform a control operation on the server device based on the instance identifier of the at least one service element.
[0172] The above control request may be implemented by modifying one or more attribute values of the target service in the server device, or may be implemented by controlling one or more operations of the target service in the server device.
[0173] In a possible implementation, when the IoT device is a client device and the first request is a query request or a control request for the server device, the cloud platform queries the attribute value of the at least one service element.
[0174] In one possible implementation, when the IoT device is a client device, before sending the first request to the cloud platform, the IoT device sends a device information acquisition request to the cloud platform, and the device information acquisition request includes a user identifier. Accordingly, the cloud platform receives the device information acquisition request sent by the IoT device, and sends the device information of the server device corresponding to the user identifier to the IoT device, and the device information includes a service instance identifier and a service element identifier of the target service; accordingly, the client device receives the device information sent by the cloud platform.
[0175] In an embodiment of the present application, before the IoT device sends a device control request or a query request, it first needs to obtain the siid of the target service in the server device from the cloud platform, so that the siid can be used to replace the service type and service name of the target service.
[0176] In a possible implementation, when the IoT device is the server device, the first request is an event reporting request, and when the event reporting request passes verification, the cloud platform records the event corresponding to the event reporting request.
[0177] Among them, recording the event corresponding to the above event reporting request may include storing the reported event into an event list, and updating the attribute value of the corresponding attribute according to the reported event, etc.
[0178] Step 406: The cloud platform sends a management operation response to the first request to the IoT device, and correspondingly, the IoT device receives the management operation response.
[0179] Take the above solution for event reporting of server devices as an example, please refer to Figure 5 , which shows a schematic diagram of an event reporting involved in an embodiment of the present application. Figure 5 As shown in the figure, the process of the server device reporting events to the cloud platform is as follows:
[0180] S51, when an event occurs in the server device, an event notification message is sent to the cloud platform; the parameters carried are the siid of the target service, the iid list (optional), and the parameter payload (optional).
[0181] The time notification message may be the event reporting request.
[0182] Wherein, payload is the attribute value corresponding to the iid list; iid and payload can also be carried in the event notification message in the form of "iid-attribute value" in sequence. Wherein, the above iid and payload are optional, that is, there may be no iid list and payload in the above message.
[0183] S52, after receiving the above information, the cloud platform calculates the service-UUID according to the siid.
[0184] Taking siid as an example, which is a digital identifier obtained by shifting service-UUID left by 8 bits in binary, a method for calculating service-UUID based on siid may be: siid / 256.
[0185] S53, the cloud platform obtains the model description file of the target service according to the service-UUID.
[0186] The model description file contains the description language of the service model, which includes the description of the target service: that is, the definition of attributes, events, and operations.
[0187] S54, the cloud platform parses the attributes corresponding to the iid and the legitimacy of the attribute values according to the obtained model description file.
[0188] Among them, the so-called legitimacy includes: whether the iid exists, whether the attribute value is correct, etc.
[0189] S55, after the legality verification is passed, the cloud platform records the above event (device event list), obtains the user and client device associated with the event, and pushes the message to the corresponding client device.
[0190] In a possible implementation, after recording the above event, the cloud platform may return an event reporting response message (ie, the above response to the first request) to the server device.
[0191] Take the above solution for device control of client devices as an example, please refer to Figure 6 , which shows a schematic diagram of device control involved in an embodiment of the present application. Taking the client device including a voice input device and a voice platform as an example, Figure 6 As shown in the figure, the process of the client device controlling the server device through the cloud platform is as follows:
[0192] S61, the voice input device sends voice to the voice platform.
[0193] S62, the voice platform analyzes the voice to confirm whether it is a voice in the field of the Internet of Things; if so, it determines whether device information of the corresponding server device is cached.
[0194] S63: If not, then request the cloud platform to obtain the service description information of the device, the request includes a parameter Uid (ie user identifier), and optionally, may also include device type information of the server device.
[0195] The service description information here may be the device information of the above-mentioned server device.
[0196] S64, the voice platform obtains the service description information of the server device from the cloud platform, including: DID (device ID), siid, attribute list and / or operation list.
[0197] In a possible implementation manner, the above service description information also includes an event list.
[0198] S65, the voice platform generates a device control request message according to the service description information and the analyzed voice keywords, including Did, Siid, a property name list or an operation name list, and a parameter payload.
[0199] The above device identification is optional.
[0200] S66, after receiving the device control request message, the cloud platform calculates the service-UUID according to the siid.
[0201] S67, cloud platform service-UUID, obtain the model description file of the service.
[0202] S68, the cloud platform parses the legality of the attribute name and attribute value according to the obtained model description file.
[0203] S69, the cloud platform generates a new device control request according to the received request message: the new device control request uses iid instead of the attribute name / operation name, that is, it includes siid, iids, and payload. The cloud platform pushes the new device control request to the corresponding server device according to Did.
[0204] In a possible implementation, after the cloud platform pushes the new control device request to the corresponding server device, it can return a device control response message to the voice platform.
[0205] In another solution, in the device control request message sent by the voice platform to the cloud platform, the iid can be used instead of the attribute name or operation name, so that the cloud platform does not need to convert the attribute name / operation name to iid, that is, after the legitimacy verification is passed, the device control request message can be directly forwarded to the corresponding server device.
[0206] To summarize, in the scheme shown in the embodiment of the present application, in the first request sent by the IoT device to the cloud platform, the target service is indicated by a digital identifier obtained by processing the service universal unique identifier of the target service, so that the cloud platform can determine the target service and the model description file corresponding to the target service through the digital identifier, thereby realizing subsequent legitimacy verification and management operations. Since the data volume of the digital identifier is lower than the data volume of the character string of the model type and model name, the above scheme can significantly reduce the amount of data in the request.
[0207] In addition, the solution shown in the embodiment of the present application also uses iid to replace attribute names, operation names and event names, thereby further reducing the data volume of management messages.
[0208] That is to say, through the above-mentioned scheme of the present application, the load of content transmission during device control can be simplified, and only siid and iid can be used to point to specific service instances and attributes, operations, and event instances, thereby reducing the network load.
[0209] In an embodiment of the present application, when the server-side device receives the first request sent by the management device, it can also perform a legitimacy check in combination with the service instance identifier and relevant information of the service element.
[0210] Please refer to Figure 7 , which shows a flow chart of a device management method in the Internet of Things provided by an embodiment of the present application, the method can be executed by a management device and a server device in the Internet of Things, wherein the management device can be Figure 1 In the network architecture shown in FIG. 1 , the cloud platform 120 or the client device 130 may be a server device. Figure 1 The server device 110 in the network architecture shown. The method may include the following steps:
[0211] Step 701: The management device sends a first request to the server device, and the server device receives the first request; the first request includes a service instance identifier and a service element identifier of a target service in the server device.
[0212] The service instance identifier is a digital identifier obtained by processing the service universal unique identifier of the target service.
[0213] In a possible implementation manner, the service element identifier includes an instance identifier of at least one service element in the target service; wherein the service element includes at least one of an operation, an attribute, and an event.
[0214] Among them, the above-mentioned management device can be a cloud platform. For example, the client device sends a first request to the cloud platform (such as a control request for the server device), and the cloud platform replaces the attribute name or operation name in the first request with the corresponding iid and sends it to the server device.
[0215] Alternatively, the management device may also be a client device. For example, when the client device is directly connected to the server device instead of through the cloud platform, the client device directly sends the first request (such as a control request or query request for the server device) to the server device.
[0216] Step 702: The server device verifies the validity of the first request according to the service instance identifier and the service element identifier.
[0217] In the embodiment of the present application, the server device can compare the siid of the target service in the first request with the siid of the service supported by itself. If the siid of the target service exists in the siid supported by the server device, the siid of the target service in the first request is legal.
[0218] When the first request includes an iid, the server device also compares the iid included in the first request with the iid supported by the target service. If the iid included in the first request exists in the siid of the service element of the target service supported by the server device, the iid in the first request is legal.
[0219] When the first request also includes parameters corresponding to iid, the server device further determines whether the parameters of iid in the first request meet the value range of the corresponding iid. If the parameters of iid in the first request meet the value range of the corresponding iid, it is determined that the parameters of iid in the first request are legal.
[0220] In a possible implementation, when the above siid, iid and parameters are all legal, it is determined that the first request is legal.
[0221] Step 703: When the first request passes the verification, the server device performs a management operation on the server device based on the first request.
[0222] When the first request is a control request for the server device, the server device performs a corresponding control operation according to the control request.
[0223] When the first request is a query request, the server device queries the attribute value corresponding to the iid in the first request.
[0224] Step 704: The server device sends a management response to the management device.
[0225] When the first request is a control request to the server device, the server device returns the execution result of the control operation to the management device.
[0226] When the first request is a query request, the server device returns the queried attribute value to the management device.
[0227] For example, if the management device is a client device, please refer to Figure 8 , which shows a flowchart of a first request processing involved in an embodiment of the present application. Figure 8 As shown, the first request processing process is as follows:
[0228] S81, the client device obtains the device model instance of the server device through the service discovery mechanism.
[0229] The device model instance includes the siid of the target service provided by the server device, and the iids of the operations, attributes, and events included in the target service.
[0230] S82, the client device sends an attribute read request to the server device according to the information in the service model instance of the server device, and the request carries siid and iid.
[0231] S83, after receiving the above request, the server device checks the legitimacy of siid and iid.
[0232] The server device checks whether its service instance supports the above siid (ie, whether the siid is correct), whether the iid in the request exists in the siid, and whether the attribute corresponding to the iid in the request is readable.
[0233] S84, after checking the legality, obtain the attribute value corresponding to the iid in the request, generate an attribute acquisition response message, and send it to the client device.
[0234] S85, the client device sends a property modification request to the server device according to the information in the service model instance, and the request carries siid and iid and the changed content changes (which can be bytes or separated by delimiters).
[0235] In a possible implementation, the client device controls the server device by modifying the attribute value of the attribute.
[0236] S86, after receiving the above request, the server device checks the legitimacy of siid and iid.
[0237] The server device checks whether its service instance supports the above siid (i.e. whether the siid is correct), whether the iid in the request exists in the siid, whether the attribute corresponding to the iid in the request is writable, and whether the changes content conforms to the attribute definition.
[0238] S87, the server device updates the corresponding attribute value, generates an attribute modification response message, and sends it to the client device.
[0239] S88, the client device sends an operation (or method) call request to the server device according to the information in the service model instance, and the request carries siid, iid and / or input parameters.
[0240] In a possible implementation, the client device controls the server device by calling an operation / method.
[0241] S89, after receiving the above request, the server device checks the legitimacy of siid and iid.
[0242] The server device checks whether its service instance supports the above siid (i.e. whether the siid is correct), whether the siid contains the iid in the request, whether the method / operation corresponding to the iid has input parameters, and whether the input parameters meet the requirements of the method definition.
[0243] S810, the server device calls the operation / method; checks whether there are output parameters, and if so, completes the configuration of the output parameters and generates a call response message, which is sent to the client device.
[0244] To summarize, in the scheme shown in the embodiment of the present application, in the first request sent by the management device to the server device, the target service is indicated by a digital identifier obtained by processing on the basis of the service universal unique identifier of the target service, so that the server device can complete the legitimacy check through the digital identifier. Since the data volume of the digital identifier is lower than the data volume of the character string of the model type and model name, the above scheme can significantly reduce the amount of data in the request.
[0245] In addition, the solution shown in the embodiment of the present application also uses iid to replace attribute names, operation names and event names, thereby further reducing the data volume of management messages.
[0246] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0247] Please refer to Fig. 9, which shows a block diagram of a device management apparatus in the Internet of Things provided by an embodiment of the present application. The apparatus has the function of implementing the steps performed by the cloud platform in the above-mentioned device management method in the Internet of Things. Fig. 9 As shown, the device may include:
[0248] A first request receiving module 901 is configured to receive a first request sent by an IoT device, wherein the first request includes a service instance identifier and a service element identifier of a target service in a server device;
[0249] The identification processing module 902 is used to process the service instance identification to obtain the service universal unique identification code of the target service;
[0250] A file query module 903, configured to query a model description file of the target service based on a service universal unique identifier of the target service;
[0251] A verification module 904, configured to verify the legitimacy of the first request based on the model description file of the target service and the service element identifier;
[0252] The management execution module 905 is used to execute a management operation on the server device based on the first request when the first request passes the verification.
[0253] In a possible implementation, the service instance identifier is a digital identifier obtained by performing digital transformation processing on a service universal unique identifier of the target service;
[0254] The identification processing module is used to perform a reverse digital change process on the service instance identification to obtain a service universal unique identification code of the target service.
[0255] In a possible implementation, the service instance identifier is obtained by shifting the service universal unique identifier of the target service to the left by a specified number of bits;
[0256] The identification processing module is used to right-shift the service instance identification by the specified number of bits in binary to obtain the service universal unique identification code of the target service.
[0257] In a possible implementation manner, the service element identifier includes an element name of at least one service element in the target service; or, the service element identifier includes an instance identifier of at least one service element in the target service;
[0258] The service element includes at least one of an operation, an attribute and an event.
[0259] In a possible implementation, the management execution module 905 is configured to, when the first request is a control request for the server device and the service element identifier includes the element name of the at least one service element, replace the element name of the at least one service element in the first request with the instance identifier of the at least one service element to obtain a device control request;
[0260] The device control request is sent to the server device, where the device control request is used to instruct the server device to perform a control operation on the server device based on the instance identifier of the at least one service element.
[0261] In a possible implementation, the management execution module 905 is configured to query the attribute value of the at least one service element when the first request is a query request or a control request for the server device.
[0262] In a possible implementation manner, the device further includes:
[0263] An information acquisition request receiving module, configured to receive a device information acquisition request sent by the IoT device before the first request receiving module receives the first request sent by the IoT device, wherein the device information acquisition request includes a user identifier;
[0264] The information sending module is used to send the device information of the server device corresponding to the user identifier to the Internet of Things device, wherein the device information includes the service instance identifier of the target service and the service element identifier.
[0265] In a possible implementation, the management execution module 905 is used to record the event corresponding to the event reporting request when the IoT device is the server device, the first request is an event reporting request, and the event reporting request passes the verification.
[0266] To summarize, in the scheme shown in the embodiment of the present application, in the first request sent by the IoT device to the cloud platform, the target service is indicated by a digital identifier obtained by processing the service universal unique identifier of the target service, so that the cloud platform can determine the target service and the model description file corresponding to the target service through the digital identifier, thereby realizing subsequent legitimacy verification and management operations. Since the data volume of the digital identifier is lower than the data volume of the character string of the model type and model name, the above scheme can significantly reduce the amount of data in the request.
[0267] In addition, the solution shown in the embodiment of the present application also uses iid to replace attribute names, operation names and event names, thereby further reducing the data volume of management messages.
[0268] Please refer to Fig.10 , which shows a block diagram of a device management apparatus in the Internet of Things provided by an embodiment of the present application. The apparatus has the function of implementing the steps performed by the Internet of Things device (i.e., client device or server device) in the above-mentioned device management method in the Internet of Things. Fig.10 As shown, the device may include:
[0269] The first request sending module 1001 is used to send a first request to the cloud platform, wherein the first request includes a service instance identifier and a service element identifier of a target service in a server-side device; the first request is used to instruct the cloud platform to process the service instance identifier, obtain a service universal unique identifier of the target service, query a model description file of the target service based on the service universal unique identifier of the target service, verify the legitimacy of the first request based on the model description file of the target service and the service element identifier, and execute a management operation on the server-side device based on the first request in response to the first request passing the verification;
[0270] The response receiving module 1002 is used to receive a management operation response to the first request sent by the cloud platform.
[0271] In a possible implementation manner, the service instance identifier is a digital identifier obtained by performing digital transformation processing on a service universal unique identifier of the target service.
[0272] In a possible implementation manner, the service instance identifier is obtained by shifting the service universal unique identifier of the target service left by a specified number of bits.
[0273] In a possible implementation manner, the service element identifier includes an element name of at least one service element in the target service; or, the service element identifier includes an instance identifier of at least one service element in the target service;
[0274] The service element includes at least one of an operation, an attribute and an event.
[0275] In a possible implementation, the first request is a control request or a query request for the server device;
[0276] or,
[0277] The first request is an event reporting request.
[0278] In a possible implementation manner, the device further includes:
[0279] an information acquisition request sending module, configured to send a device information acquisition request to the cloud platform before the first request sending module sends the first request to the cloud platform, wherein the device information acquisition request includes a user identifier;
[0280] The information receiving module is used to receive the device information of the server device corresponding to the user identifier and sent by the cloud platform, wherein the device information includes the service instance identifier of the target service and the service element identifier.
[0281] To summarize, in the scheme shown in the embodiment of the present application, in the first request sent by the IoT device to the cloud platform, the target service is indicated by a digital identifier obtained by processing the service universal unique identifier of the target service, so that the cloud platform can determine the target service and the model description file corresponding to the target service through the digital identifier, thereby realizing subsequent legitimacy verification and management operations. Since the data volume of the digital identifier is lower than the data volume of the character string of the model type and model name, the above scheme can significantly reduce the amount of data in the request.
[0282] In addition, the solution shown in the embodiment of the present application also uses iid to replace attribute names, operation names and event names, thereby further reducing the data volume of management messages.
[0283] Please refer to Fig.11 , which shows a block diagram of a device management apparatus in the Internet of Things provided by an embodiment of the present application. The apparatus has the function of implementing the steps performed by the server device in the device management method in the Internet of Things described above. Fig.11 As shown, the device may include:
[0284] The first request receiving module 1101 is configured to receive a first request sent by a management device, wherein the first request includes a service instance identifier and a service element identifier of a target service in a server device;
[0285] A verification module 1102, configured to verify the legitimacy of the first request according to the service instance identifier and the service element identifier;
[0286] The management execution module 1103 is used to execute a management operation on the server device based on the first request when the first request passes the verification.
[0287] In a possible implementation manner, the service element identifier includes an instance identifier of at least one service element in the target service;
[0288] The service element includes at least one of an operation, an attribute and an event.
[0289] To summarize, in the scheme shown in the embodiment of the present application, in the first request sent by the management device to the server device, the target service is indicated by a digital identifier obtained by processing on the basis of the service universal unique identifier of the target service, so that the server device can complete the legitimacy check through the digital identifier. Since the data volume of the digital identifier is lower than the data volume of the character string of the model type and model name, the above scheme can significantly reduce the amount of data in the request.
[0290] In addition, the solution shown in the embodiment of the present application also uses iid to replace attribute names, operation names and event names, thereby further reducing the data volume of management messages.
[0291] One point that needs to be explained is that the device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example to implement its functions. In actual applications, the above-mentioned functions can be assigned to different functional modules according to actual needs, that is, the content structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0292] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0293] Please refer to Fig.12 , which shows a schematic diagram of the structure of a computer device 1200 provided in one embodiment of the present application. The computer device 1200 may include: a processor 1201, a receiver 1202, a transmitter 1203, a memory 1204 and a bus 1205.
[0294] The processor 1201 includes one or more processing cores. The processor 1201 executes various functional applications and information processing by running software programs and modules.
[0295] The receiver 1202 and the transmitter 1203 may be implemented as a communication component, which may be a communication chip, which may also be called a transceiver.
[0296] The memory 1204 is connected to the processor 1201 via a bus 1205 .
[0297] The memory 1204 may be used to store computer programs, and the processor 1201 may be used to execute the computer programs to implement the various steps performed by the server device, configuration device, cloud platform or account server in the above method embodiments.
[0298] In addition, memory 1204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, and volatile or non-volatile storage devices include but are not limited to: magnetic disks or optical disks, electrically erasable programmable read-only memory, erasable programmable read-only memory, static random access memory, read-only memory, magnetic memory, flash memory, and programmable read-only memory.
[0299] In an exemplary embodiment, the computer device includes a processor, a memory, and a transceiver (the transceiver may include a receiver and a transmitter, the receiver is used to receive information, and the transmitter is used to send information).
[0300] In a possible implementation, when the computer device is implemented as a cloud platform,
[0301] The transceiver is used to receive a first request sent by an Internet of Things device, where the first request includes a service instance identifier and a service element identifier of a target service in a server device;
[0302] The processor is used to process the service instance identifier to obtain a service universal unique identifier of the target service;
[0303] The processor is configured to query a model description file of the target service based on a service universal unique identifier of the target service;
[0304] The processor is configured to verify the legitimacy of the first request based on the model description file of the target service and the service element identifier;
[0305] The processor is configured to execute a management operation on the server device based on the first request when the first request passes verification.
[0306] When the computer device is implemented as a cloud platform, the processor and transceiver in the computer device involved in the embodiment of the present application can execute the above Figure 3 or Figure 4 In the method shown, the steps performed by the cloud platform are not repeated here.
[0307] In a possible implementation, when the computer device is implemented as an IoT device (ie, a client device or a server device),
[0308] The transceiver is used to send a first request to the cloud platform, wherein the first request includes a service instance identifier and a service element identifier of a target service in a server-side device; the first request is used to instruct the cloud platform to process the service instance identifier, obtain a service universal unique identifier of the target service, query a model description file of the target service based on the service universal unique identifier of the target service, verify the legitimacy of the first request based on the model description file of the target service and the service element identifier, and in response to the first request passing the verification, perform a management operation on the server-side device based on the first request;
[0309] The transceiver is also used to receive a management operation response to the first request sent by the cloud platform.
[0310] When the computer device is implemented as an IoT device, the processor and the transceiver in the computer device involved in the embodiment of the present application can execute the above Figure 3 or Figure 4 In the method shown, the steps performed by the IoT device are not repeated here.
[0311] In a possible implementation, when the computer device is implemented as a server device,
[0312] The transceiver is used to receive a first request sent by a management device, wherein the first request includes a service instance identifier and a service element identifier of a target service in a server device;
[0313] The processor is used to verify the legitimacy of the first request according to the service instance identifier and the service element identifier;
[0314] The processor is configured to execute a management operation on the server device based on the first request when the first request passes verification.
[0315] When the computer device is implemented as a server device, the processor and the transceiver in the computer device involved in the embodiment of the present application can execute the above Figure 7 In the method shown, the steps performed by the server device are not repeated here.
[0316] The present application also provides a computer-readable storage medium in which a computer program is stored. The computer program is loaded and executed by a processor to implement the above Figure 3 , Figure 4 or Figure 7 The various steps in the device management method in the Internet of Things are shown.
[0317] The present application also provides a computer program product or a computer program, the computer program product or the computer program includes a computer instruction, the computer instruction is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above 3. Figure 4 or Figure 7 The various steps in the device management method in the Internet of Things are shown.
[0318] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
[0319] The above description is only an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A device management method in the Internet of Things, characterized in that: The method is performed by a cloud platform in the Internet of Things, and the method includes: Receive a first request sent by an IoT device, wherein the first request includes a service instance identifier and a service element identifier of a target service in a server device, wherein the service instance identifier is a digital identifier obtained by performing a digital transformation on a service universal unique identifier of the target service; Processing the service instance identifier to obtain a service universal unique identifier of the target service; Querying a model description file of the target service based on a service universal unique identifier of the target service; Verifying the legitimacy of the first request based on the model description file of the target service and the service element identifier; When the first request passes the verification, a management operation on the server device is performed based on the first request.
2. The method according to claim 1, characterized in that The processing of the service instance identifier to obtain the service universal unique identifier of the target service includes: The service instance identifier is subjected to a reverse digital change process to obtain a service universal unique identification code of the target service.
3. The method according to claim 2, characterized in that The service instance identifier is obtained by shifting the service universal unique identifier of the target service to the left by a specified number of digits; The performing a reverse digital change process on the service instance identifier to obtain a service universal unique identifier of the target service includes: In binary, the service instance identifier is right-shifted by the specified number of bits to obtain a service universal unique identifier of the target service.
4. The method according to claim 1, characterized in that The service element identifier includes an element name of at least one service element in the target service; or, the service element identifier includes an instance identifier of at least one service element in the target service; The service element includes at least one of an operation, an attribute and an event.
5. The method according to claim 4, characterized in that When the first request passes the verification, performing the management operation on the server device based on the service element indication information includes: When the first request is a control request for the server device, and the service element identifier includes the element name of the at least one service element, the element name of the at least one service element in the first request is replaced with the instance identifier of the at least one service element to obtain a device control request; The device control request is sent to the server device, where the device control request is used to instruct the server device to perform a control operation on the server device based on the instance identifier of the at least one service element.
6. The method according to claim 4, characterized in that When the first request passes the verification, performing the management operation on the server device based on the service element indication information includes: When the first request is a query request or a control request for the server device, the attribute value of the at least one service element is queried.
7. The method according to claim 1, characterized in that Before receiving the first request sent by the IoT device, the method further includes: Receive a device information acquisition request sent by the IoT device, where the device information acquisition request includes a user identifier of the IoT device; The device information of the server device corresponding to the user identifier is sent to the Internet of Things device, wherein the device information includes the service instance identifier of the target service and the service element identifier.
8. The method according to any one of claims 1 to 4, characterized in that: When the first request passes the verification, performing a management operation on the server device based on the first request includes: When the first request is an event reporting request and the event reporting request passes verification, an event corresponding to the event reporting request is recorded.
9. A device management method in the Internet of Things, characterized in that: The method is performed by an IoT device in the IoT, and the method includes: Send a first request to the cloud platform, wherein the first request includes a service instance identifier and a service element identifier of a target service in a server-side device, wherein the service instance identifier is a digital identifier obtained by performing digital transformation on a service universal unique identifier of the target service; The first request is used to instruct the cloud platform to process the service instance identifier, obtain the service universal unique identifier of the target service, query the model description file of the target service based on the service universal unique identifier of the target service, verify the legitimacy of the first request based on the model description file of the target service and the service element identifier, and in response to the first request passing the verification, perform a management operation on the server-side device based on the first request; Receive a management operation response to the first request sent by the cloud platform.
10. The method according to claim 9, characterized in that The service instance identifier is obtained by shifting the service universal unique identifier of the target service to the left by a specified number of bits.
11. The method according to claim 8, characterized in that The service element identifier includes an element name of at least one service element in the target service; or, the service element identifier includes an instance identifier of at least one service element in the target service; The service element includes at least one of an operation, an attribute and an event.
12. The method according to any one of claims 9 to 11, characterized in that: The first request is a control request or a query request for the server device; or, The first request is an event reporting request.
13. The method according to claim 9, characterized in that Before sending the first request to the cloud platform, the method further includes: Sending a device information acquisition request to the cloud platform, wherein the device information acquisition request includes a user identifier; The device information of the server device corresponding to the user identifier and sent by the cloud platform is received, wherein the device information includes a service instance identifier of the target service and the service element identifier.
14. A device management method in the Internet of Things, characterized in that: The method is executed by a server device in the Internet of Things, and the method includes: Receive a first request sent by a management device, wherein the first request includes a service instance identifier and a service element identifier of a target service in a server device, wherein the service instance identifier is a digital identifier obtained by performing digital transformation on a service universal unique identifier of the target service; Verifying the legitimacy of the first request according to the service instance identifier and the service element identifier; When the first request passes the verification, a management operation on the server device is performed based on the first request.
15. The method according to claim 14, characterized in that The service element identifier includes an instance identifier of at least one service element in the target service; The service element includes at least one of an operation, an attribute and an event.
16. A device management device in the Internet of Things, characterized in that: The device is used in a cloud platform in the Internet of Things, and the device includes: A first request receiving module is used to receive a first request sent by an IoT device, wherein the first request includes a service instance identifier and a service element identifier of a target service in a server device, wherein the service instance identifier is a digital identifier obtained by performing a digital transformation on a service universal unique identifier of the target service; An identification processing module, used to process the service instance identification to obtain a service universal unique identification code of the target service; A file query module, used for querying a model description file of the target service based on a service universal unique identifier of the target service; A verification module, configured to verify the legitimacy of the first request based on the model description file of the target service and the service element identifier; A management execution module is used to execute a management operation on the server device based on the first request when the first request passes the verification.
17. The device according to claim 16, characterized in that The identification processing module is used to perform a reverse digital change process on the service instance identification to obtain a service universal unique identification code of the target service.
18. The device according to claim 17, characterized in that The service instance identifier is obtained by shifting the service universal unique identifier of the target service to the left by a specified number of digits; The identification processing module is used to right-shift the service instance identification by the specified number of bits in binary to obtain the service universal unique identification code of the target service.
19. The device according to claim 16, characterized in that The service element identifier includes an element name of at least one service element in the target service; or, the service element identifier includes an instance identifier of at least one service element in the target service; The service element includes at least one of an operation, an attribute and an event.
20. The device according to claim 19, characterized in that The management execution module is used to: When the first request is a control request for the server device, and the service element identifier includes the element name of the at least one service element, the element name of the at least one service element in the first request is replaced with the instance identifier of the at least one service element to obtain a device control request; The device control request is sent to the server device, where the device control request is used to instruct the server device to perform a control operation on the server device based on the instance identifier of the at least one service element.
21. The device according to claim 19, characterized in that The management execution module is configured to query the attribute value of the at least one service element when the first request is a query request or a control request for the server device.
22. The device according to claim 16, characterized in that The device also includes: An information acquisition request receiving module, configured to receive a device information acquisition request sent by the IoT device before the first request receiving module receives the first request sent by the IoT device, wherein the device information acquisition request includes a user identifier; The information sending module is used to send the device information of the server device corresponding to the user identifier to the Internet of Things device, wherein the device information includes the service instance identifier of the target service and the service element identifier.
23. The device according to any one of claims 16 to 19, characterized in that The management execution module is configured to record an event corresponding to the event reporting request when the first request is an event reporting request and the event reporting request passes verification.
24. A device management device in the Internet of Things, characterized in that: The device is used in an Internet of Things device, and the device includes: A first request sending module is used to send a first request to the cloud platform, wherein the first request includes a service instance identifier and a service element identifier of a target service in a server-side device, wherein the service instance identifier is a digital identifier obtained by digitally changing a service universal unique identifier of the target service; the first request is used to instruct the cloud platform to process the service instance identifier to obtain a service universal unique identifier of the target service, query a model description file of the target service based on the service universal unique identifier of the target service, verify the legitimacy of the first request based on the model description file of the target service and the service element identifier, and in response to the first request passing the verification, perform a management operation on the server-side device based on the first request; A response receiving module is used to receive a management operation response to the first request sent by the cloud platform.
25. The device according to claim 24, characterized in that The service instance identifier is obtained by shifting the service universal unique identifier of the target service to the left by a specified number of bits.
26. The device according to claim 24, characterized in that The service element identifier includes an element name of at least one service element in the target service; or, the service element identifier includes an instance identifier of at least one service element in the target service; The service element includes at least one of an operation, an attribute and an event.
27. The device according to any one of claims 24 to 26, characterized in that The first request is a control request or a query request for the server device; or, The first request is an event reporting request.
28. The device according to claim 24, characterized in that The device also includes: an information acquisition request sending module, configured to send a device information acquisition request to the cloud platform before the first request sending module sends the first request to the cloud platform, wherein the device information acquisition request includes a user identifier; The information receiving module is used to receive the device information of the server device corresponding to the user identifier and sent by the cloud platform, wherein the device information includes the service instance identifier of the target service and the service element identifier.
29. A device management device in the Internet of Things, characterized in that: The device is used in a server device in the Internet of Things, and the device includes: A first request receiving module is used to receive a first request sent by a management device, wherein the first request includes a service instance identifier and a service element identifier of a target service in a server-side device, wherein the service instance identifier is a digital identifier obtained by performing a digital transformation on a service universal unique identifier of the target service; A verification module, used to verify the legitimacy of the first request according to the service instance identifier and the service element identifier; A management execution module is used to execute a management operation on the server device based on the first request when the first request passes the verification.
30. The device according to claim 29, characterized in that The service element identifier includes an instance identifier of at least one service element in the target service; The service element includes at least one of an operation, an attribute and an event.
31. A computer device, characterized in that: The computer device includes a processor, a memory and a transceiver; The transceiver is used to receive a first request sent by an Internet of Things device, wherein the first request includes a service instance identifier and a service element identifier of a target service in a server-side device, wherein the service instance identifier is a digital identifier obtained by performing a digital transformation on a service universal unique identifier of the target service; The processor is used to process the service instance identifier to obtain a service universal unique identifier of the target service; The processor is configured to query a model description file of the target service based on a service universal unique identifier of the target service; The processor is configured to verify the legitimacy of the first request based on the model description file of the target service and the service element identifier; The processor is configured to execute a management operation on the server device based on the first request when the first request passes verification.
32. A computer device, characterized in that: The computer device includes a processor, a memory and a transceiver; The transceiver is used to send a first request to the cloud platform, wherein the first request includes a service instance identifier and a service element identifier of a target service in a server-side device, wherein the service instance identifier is a digital identifier obtained by digitally changing a service universal unique identifier of the target service; the first request is used to instruct the cloud platform to process the service instance identifier to obtain a service universal unique identifier of the target service, query a model description file of the target service based on the service universal unique identifier of the target service, verify the legitimacy of the first request based on the model description file of the target service and the service element identifier, and in response to the first request passing the verification, perform a management operation on the server-side device based on the first request; The transceiver is also used to receive a management operation response to the first request sent by the cloud platform.
33. A computer device, characterized in that: The computer device includes a processor, a memory and a transceiver; The transceiver is used to receive a first request sent by a management device, wherein the first request includes a service instance identifier and a service element identifier of a target service in a server-side device, wherein the service instance identifier is a digital identifier obtained by performing a digital transformation on a service universal unique identifier of the target service; The processor is used to verify the legitimacy of the first request according to the service instance identifier and the service element identifier; The processor is configured to execute a management operation on the server device based on the first request when the first request passes verification.
34. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to be executed by a processor to implement the device management method in the Internet of Things as described in any one of claims 1 to 15.
Citation Information
Patent Citations
Point-to-point service discovering and calling system and method based on wide area network
CN103905511A