CN115803736A - File generation method and device in Internet of things, computer equipment and storage medium - Google Patents

File generation method and device in Internet of things, computer equipment and storage medium Download PDF

Info

Publication number
CN115803736A
CN115803736A CN202080102655.3A CN202080102655A CN115803736A CN 115803736 A CN115803736 A CN 115803736A CN 202080102655 A CN202080102655 A CN 202080102655A CN 115803736 A CN115803736 A CN 115803736A
Authority
CN
China
Prior art keywords
service
target
identifier
instantiation
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202080102655.3A
Other languages
Chinese (zh)
Inventor
吕小强
曾春亮
张军
茹昭
翟召轩
吴泰月
杨启昌
陈泽春
余振荣
陈钊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN115803736A publication Critical patent/CN115803736A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication

Abstract

The application discloses a file generation method and device in the Internet of things, computer equipment and a storage medium, and belongs to the technical field of the Internet of things. The method comprises the following steps: receiving an instantiation request of target equipment, which is sent by a request terminal; the instantiation request indicates that the target equipment corresponds to a target service; acquiring instantiation sequence information of the target service; generating a service instance identifier of the target service according to the instantiation sequence information and an identifier generation rule; and generating a device model instantiation file of the target device, wherein the device model instantiation file comprises the service instance identifier of the target service. The scheme simplifies the manual operation steps in the process of instantiating the equipment model and improves the instantiation efficiency of the equipment model.

Description

File generation method and device in Internet of things, computer equipment and storage medium Technical Field
The present application relates to the field of internet of things, and in particular, to a method and an apparatus for generating files in the internet of things, a computer device, and a storage medium.
Background
In the Internet of Things (IOT), to remotely manage server devices through clients, model instantiation needs to be performed on the server devices.
In the related art, instantiation of an equipment model refers to a manufacturer generating an equipment model instantiation file meeting the requirements of the manufacturer according to a defined equipment model and the functions realized by the manufacturer in combination with the product of the manufacturer. The instantiation files of the equipment model are used for realizing subsequent equipment functions and equipment operation. When an instantiation file is generated for a certain device, an identifier for instantiating each service in the device is needed, so that a client can separately manage each service.
Disclosure of Invention
The embodiment of the application provides a file generation method and device in the Internet of things, computer equipment and a storage medium. The technical scheme is as follows:
in one aspect, an embodiment of the present application provides a file generation method in an internet of things, where the method is executed by a management device of a cloud platform in the internet of things, and the method includes:
receiving an instantiation request of a target device; the instantiation request indicates that the target device corresponds to a target service;
generating a service instance identifier of the target service according to an identifier generation rule;
and generating an equipment model instantiation file of the target equipment, wherein the equipment model instantiation file comprises a service instance identifier of the target service.
In a possible implementation manner, the generating a service instance identifier of the target service according to an identifier generation rule includes:
processing the service universal unique identification code of the target service according to the identification generation rule to obtain a processed digital identification;
and obtaining the service instance identification of the target service based on the processed digital identification.
In a possible implementation manner, before the processing the service universal unique identifier of the target service according to the identifier generation rule and obtaining the processed digital identifier, the method further includes:
acquiring a service type corresponding to the target service;
and acquiring the universal unique service identification code corresponding to the service type.
In a possible implementation manner, the processing the service universal unique identifier according to the identifier generation rule to obtain a processed digital identifier includes:
and under the binary system, carrying out left shift specified digit processing on the service universal unique identification code to obtain the processed digital identifier.
In a possible implementation manner, the obtaining the service instance identifier of the target service based on the processed digital identifier includes:
and taking the processed digital identifier as a service instance identifier of the target service.
In a possible implementation manner, the obtaining the service instance identifier of the target service based on the processed digital identifier includes:
acquiring instantiation sequence information of the target service, wherein the instantiation sequence information is used for indicating that the target service is the ith service of the same type in the target equipment; i is more than or equal to 1, and i is an integer;
and acquiring the service instance identifier of the target service according to the processed digital identifier and the instantiation sequence information.
In a possible implementation manner, the obtaining, according to the processed digital identifier and the instantiation order information, a service instance identifier of the target service includes:
and adding i to the processed digital identifier and subtracting 1 to obtain the digital identifier, wherein the digital identifier is used as the service instance identifier of the target service.
In a possible implementation manner, the generating a service instance identifier of the target service according to an identifier generation rule includes:
acquiring instantiation sequence information of the target service, wherein the instantiation sequence information is used for indicating that the target service is the ith service of the same type in the target equipment; i is more than or equal to 1, and i is an integer;
adding i to the appointed number identifier and subtracting 1 to obtain a number identifier, wherein the number identifier is used as the service instance identifier of the target service; the specified numeric indication is an integer greater than or equal to 1.
In a possible implementation manner, before generating the device model instantiation file of the target device, the method further includes:
acquiring element types of all service elements in the target service; the element type comprises an attribute, an operation or an event;
acquiring instance identifiers of the service elements according to the element types of the service elements;
the generating of the device model instantiation file of the target device comprises:
and generating the equipment model instantiation file containing the service instance identification of the target service and the instance identification of each service element.
In a possible implementation manner, the instance identifier of each service element is unique in the target service;
or,
and the instance identifier of each service element is unique in the same type of elements of the target service.
In one possible implementation, before receiving the instantiation request of the target device, the method further includes:
receiving equipment information, wherein the equipment information comprises at least one of equipment type information, equipment model information and equipment manufacturer information of the target equipment;
acquiring at least one candidate service according to the equipment information;
pushing the at least one candidate service to a service selection interface so that the user can select the target service from the at least one candidate service displayed by the service selection interface.
In one possible implementation, the method further includes:
receiving other service acquisition requests;
pushing each other candidate service except the at least one candidate service to the service selection interface.
In one possible implementation, the method further includes:
when any one service in the service selection interface is selected as the target service, pushing each candidate service element corresponding to the target service to a service element selection interface so that a user can select each service element of the target service from the candidate service elements displayed on the service selection interface.
On the other hand, an embodiment of the present application provides a file generation apparatus in an internet of things, where the apparatus is used in a management device of a cloud platform in the internet of things, and the apparatus includes:
the device comprises a first request receiving module, a first control module and a second control module, wherein the first request receiving module is used for receiving an instantiation request of a target device; the instantiation request indicates that the target device corresponds to a target service;
the identification generation module is used for generating a service instance identification of the target service according to an identification generation rule;
and the file generation module is used for generating an equipment model instantiation file of the target equipment, wherein the equipment model instantiation file comprises a service instance identifier of the target service.
In one possible implementation manner, the identifier generating module includes:
the processing unit is used for carrying out digital change processing on the service universal unique identification code of the target service according to the identification generation rule to obtain a processed digital identification;
and the identification obtaining unit is used for obtaining the service instance identification of the target service based on the processed digital identification.
In a possible implementation manner, the identifier generating module further includes:
a service type obtaining unit, configured to obtain a service type corresponding to the target service before the processing unit processes the service universal unique identifier of the target service according to the identifier generation rule and obtains a processed digital identifier;
and the identification code acquisition unit is used for acquiring the universal and unique identification code of the service corresponding to the service type.
In a possible implementation manner, the processing unit is configured to perform, in a binary system, processing of left-shifting the specified digits on the service universal unique identifier to obtain the processed digital identifier.
In a possible implementation manner, the identifier obtaining unit is configured to use the processed digital identifier as a service instance identifier of the target service.
In a possible implementation manner, the identification obtaining unit is configured to,
acquiring instantiation sequence information of the target service, wherein the instantiation sequence information is used for indicating that the target service is the ith service of the same type in the target equipment; i is more than or equal to 1, and i is an integer;
and acquiring the service instance identifier of the target service by the processed digital identifier and the instantiation sequence information.
In a possible implementation manner, the identifier obtaining unit is configured to add, to the processed digital identifier, a digital identifier obtained by subtracting 1 from i, and use the added digital identifier as the service instance identifier of the target service.
In one possible implementation manner, the identification generation module is configured to,
acquiring instantiation sequence information of the target service, wherein the instantiation sequence information is used for indicating that the target service is the ith service of the same type in the target equipment; i is more than or equal to 1 and is an integer;
adding i to the appointed number identifier and subtracting 1 to obtain a number identifier, wherein the number identifier is used as the service instance identifier of the target service; the specified numeric indication is an integer greater than or equal to 1.
In one possible implementation, the apparatus further includes:
the element type acquisition module is used for acquiring the element types of all service elements in the target service before the file generation module generates the equipment model instantiation file of the target equipment; the element type comprises an attribute, an operation or an event;
an instance identifier obtaining module, configured to obtain an instance identifier of each service element according to the element type of each service element;
the file generation module is used for generating the equipment model instantiation file containing the service instance identifier of the target service and the instance identifier of each service element.
In a possible implementation manner, the instance identifier of each service element is unique in the target service;
or,
and the instance identifier of each service element is unique in the same type of elements of the target service.
In one possible implementation, the apparatus further includes:
a product information receiving module, configured to receive device information before the first request receiving module receives an instantiation request for a target device, where the device information includes at least one of device type information, device model information, and device manufacturer information of the target device;
a candidate service obtaining module, configured to obtain at least one candidate service according to the device information;
the first pushing module is used for pushing the at least one candidate service to a service selection interface so that a user can select the target service from the at least one candidate service displayed on the service selection interface.
In one possible implementation, the apparatus further includes:
the second request receiving module is used for receiving other service acquisition requests;
and the second pushing module is used for pushing other candidate services except the at least one candidate service to the service selection interface.
In one possible implementation, the apparatus further includes:
and the candidate service element pushing module is used for pushing each candidate service element corresponding to the target service to the service element selection interface when any one service in the service selection interface is selected as the target service, so that a user can select each service element of the target service from the candidate service elements displayed on the service selection interface.
In another aspect, an embodiment of the present application provides a computer device, where the computer device includes a processor, a memory, and a transceiver, where the memory stores a computer program, and the computer program is configured to be executed by the processor, so as to implement the file generation method in the internet of things.
In another aspect, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the storage medium, and the computer program is loaded and executed by a processor to implement the file generation method in the internet of things.
In another aspect, a computer program product or computer program is provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instruction from the computer readable storage medium, and executes the computer instruction, so that the computer device executes the file generation method in the internet of things.
The technical scheme provided by the embodiment of the application can bring the following beneficial effects:
when the management equipment instantiates one type of equipment, the service instance identification is automatically generated for the service in the equipment through the preset generation rule, so that the service in the equipment is automatically distinguished and identified in the instantiation process, the manual operation steps in the process of instantiating the equipment model are simplified, and the instantiation efficiency of the equipment model is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of a network architecture of an internet of things provided by an embodiment of the present application;
FIG. 2 is a block diagram of a model of the apparatus to which the embodiment shown in FIG. 1 relates;
fig. 3 is a flowchart of a file generation method in the internet of things according to an embodiment of the present application;
fig. 4 is a flowchart of a file generation method in the internet of things according to an embodiment of the present application;
fig. 5 is a block diagram of a file generation apparatus in the internet of things according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, the following detailed description of the embodiments of the present application will be made with reference to the accompanying drawings.
The network architecture and the service scenario described in the embodiment of the present application are for more clearly illustrating the technical solution of the embodiment of the present application, and do not constitute a limitation to the technical solution provided in the embodiment of the present application, and it can be known by a person of ordinary skill in the art that the technical solution provided in the embodiment of the present application is also applicable to similar technical problems with the evolution of the network architecture and the occurrence of a new service scenario.
Referring to fig. 1, a schematic diagram of a network architecture of the internet of things provided in an embodiment of the present application is shown. The network architecture of the internet of things may include: the server device 110, the cloud platform 120, the management device 130 of the cloud platform 120, and the request terminal 140;
the server device 110 may be a device for providing internet of things function services.
For example, the server device 110 may be a smart home device, such as a smart television, a smart air conditioner, a smart refrigerator, a smart microwave oven, a smart electric cooker, a sweeping robot, and the like.
Alternatively, the server device 110 may be an industrial production device, such as a lathe, an industrial robot, a solar panel, a wind turbine, and the like.
Alternatively, the server device 110 may be a commercial service device, such as a vending machine or the like.
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 so on.
The cloud platform 120 is a cloud service platform deployed on the network side. For example, the cloud platform 120 may be a cloud service platform implemented based on a single server or multiple servers.
The management device 130 is a device for performing background manual management on the cloud platform 120, for example, the management device 130 may be a mobile management terminal such as a smart phone and a tablet computer, or the management device 130 may also be a personal computer such as a desktop computer, a portable computer, a personal workstation, and the like.
The request terminal 140 is a terminal device at the manufacturer side of the device, for example, the request terminal 140 may be a mobile management terminal such as a smart phone or a tablet computer, or the management device 130 may also be a personal computer such as a desktop computer, a portable computer, a personal workstation, and the like.
The cloud platform 120 is connected to the server device 110 and the management device 130 through a wired or wireless network. The management apparatus 130 is connected to the requesting terminal 140 through a wired or wireless network.
Optionally, the wired or wireless network described above uses standard communication techniques and/or protocols. For example, the wired or wireless network may be an internet of things (IoT) protocol based communication network.
In this embodiment of the application, the server device 110 and the cloud platform 120 may be internet of things devices meeting an industry specification, for example, internet of things devices meeting an Open Connectivity Foundation (OCF) specification.
The OCF is a new technical standard organization of an Internet of things application layer, the OCF establishes a RESTful (design style and development mode of a network application program) service framework for realizing interconnection and intercommunication among Internet of things equipment, in the OCF service framework, information such as Internet of things equipment, functional services of the equipment, states of the equipment and the like is described through an equipment resource model, the Internet of things terminal equipment for providing resources is an OCF server side (namely the server side equipment), and a control terminal for accessing the resources is an OCF client side (namely the client side equipment).
For example, the control terminal for acquiring the indoor environment state data is a client device, the sensor device for monitoring the indoor environment state data is a server device, and the service interaction between the client device and the server device is realized by creating, reading, updating, deleting or notifying the resource operation methods.
The standard schema is used for describing the interoperation abstraction of the device, each device schema can contain a plurality of services (services), each service contains attributes (properties), operations (actions) and events (events), and the standard description information of the device can be obtained through a standard schema file, so that the purposes of self description and interoperation of the device are achieved. Wherein:
1. one physical device corresponds to one device abstract device, for example, one lamp corresponds to light;
2. a physical device has a plurality of services, each service being an independent meaningful set of functions;
3. one service contains a plurality of properties, actions and events;
4. each property needs to define attribute meaning, data format, access mode, value range, precision, unit and the like;
5. each action needs to define action meaning, an input parameter list and an output parameter list;
6. each event needs to have a clear event meaning, outputting a parameter list.
In the internet of things system, before a device is released to the market by a manufacturer of the device, instantiation of a device model for the device is requested from the management device 130 through the request terminal 140.
The definition of the equipment model is to abstract the elements such as the attribute, the method, the event and the like of the equipment according to the capability of the equipment; the acquisition of the device state, the starting or the ending of the device function, and the like are completed through the operation on the elements.
Refer to fig. 2, which illustrates a framework diagram of an apparatus model according to an embodiment of the present application. As shown in fig. 2, one device 21 includes one or more services 22, and the services 22 include a plurality of operations 22a, attributes 22b, and/or events 22c.
In fig. 2, the device refers to a server device in the internet of things, which is also referred to as an application terminal, and the function set of the device can be described by different service sets;
a service refers to an independent and meaningful set of functions that can be multiplexed among different types of application terminals;
the attribute is a minimum unit describing the state and function of the application terminal;
operations are specific functions used to implement a service, such functions generally cannot be accomplished by operation of a single attribute;
the event is specific information actively reported by the application terminal.
When an equipment model is instantiated, services, attributes, operations, events in the equipment model need to be identified. In a possible implementation manner, when a device includes a plurality of services of the same type, for example, when a desk lamp product includes a plurality of lamp types of services (e.g., a main lamp service + a night lamp service), in order to enable separate management of the main lamp and the night lamp, when an instantiation file of the desk lamp product is generated, a manager needs to set corresponding instantiation names for the main lamp service and the night lamp service, which results in a complicated step of instantiation and a low instantiation efficiency.
According to the scheme shown in the subsequent embodiment of the application, when the equipment model is instantiated for one type of equipment, the instantiation identification is automatically carried out on the services of the same type, so that the equipment model instantiation efficiency is improved.
Referring to fig. 3, a flowchart of a file generation method in the internet of things according to an embodiment of the present application is shown, where the method may be performed by a management device of a cloud platform in the internet of things, where the management device may be the management device 130 in the network architecture shown in fig. 1. The method may include the steps of:
step 301, receiving an instantiation request of a target device; the instantiation request indicates that the target device corresponds to the target service.
In the embodiment of the present application, the target device refers to a certain device product generated by a device manufacturer, and is not specific to a certain device.
In the embodiment of the present application, after a manager of an equipment manufacturer establishes a connection with a management device through a request terminal, when a request is made to instantiate a device model for a target device, a target service in the target device may be set, and the request terminal sends the instantiation request to the management device based on a selection operation of the manager of the equipment manufacturer.
Step 302, generating a service instance identifier of the target service according to the identifier generation rule.
In one possible implementation, the service instance identification is a digital identification.
The Service Instance Identifier (SIID) is an instantiation identifier generated by the management device for the corresponding Service, and is used for identifying the corresponding Service in the instantiated device model.
In the embodiment of the application, when the management device generates the service instance identifier for the service in the same type of device, the service instance identifier may be automatically generated for the service according to a preset identifier generation rule, where the service instance identifiers corresponding to a plurality of services in the same type of device are different. The identifier generation rule may be a rule that identifies a service in a digital form.
In the embodiment of the present application, the service instance identifier of the target service is combined with information capable of indicating the service type, that is, the target service may be uniquely identified in the device model of one device.
Step 303, generating a device model instantiation file of the target device, where the device model instantiation file includes the service instance identifier of the target service.
In the embodiment of the present application, when generating the device model instantiation file of the target device, the management device adds the generated service instance identifier of the target service to the device model instantiation file, so that the target service is represented by the service instance identifier subsequently when device management is performed through the device model of the target device.
In summary, in the solution shown in the embodiment of the present application, the service instance identifier is automatically generated for the service in the device according to the preset generation rule, so that the service in the same device is automatically distinguished and identified in the instantiation process, thereby simplifying the manual operation steps in the process of instantiating the device model, and improving the instantiation efficiency of the device model.
Referring to fig. 4, a flowchart of a file generation method in the internet of things provided by an embodiment of the present application is shown, where the method may be interactively executed by a management device of a cloud platform in the internet of things and a request terminal, where the management device may be the management device 130 in the network architecture shown in fig. 1, and the request terminal may be the request terminal 140 in the network architecture shown in fig. 1. The method may include the steps of:
step 401, the management device displays a service setting interface, where the service setting interface is used to set a service supported by the cloud platform.
In a possible implementation manner, the service setting interface includes a setting item of a service name, a setting item of a service universal unique identification code, a setting item of a service element, a setting item of an Instance identifier (Instance ID, IID) of the service element, and the like.
For example, when an operator of the management device needs to add a service supported by the cloud platform in the cloud platform, the operator may click a service addition option in the management interface, the management device jumps to the service setting interface, and the manager may set various pieces of information of the service to be added in the service setting interface.
Step 402, the management device obtains a service universal unique identification code of the candidate service and an instance identifier of each service element in the candidate service according to the setting operation in the service setting interface.
In the embodiment of the application, when an operator of the management device sets various pieces of information of the service to be added in the service setting interface, the operator may manually fill in a service name, a universal unique identification code for the service, a type of a candidate service element, an instance identifier of the candidate service element, and the like.
In the embodiment of the present application, the service universal unique identifier of the manually filled candidate service is a unique digital identifier in each service supported by the cloud platform, and the service universal unique identifier needs to be guaranteed to be always unique in the life cycle of the candidate service.
In the embodiment of the present application, the instance identifier of each candidate service element of the candidate service may be a number identifier.
In a possible implementation manner, the instance identifier of each candidate service element is a unique number in the candidate service.
For example, the types of the candidate service elements in the candidate service include an operation type, an attribute type and an event type, wherein the types include 3 operation elements, 2 attribute elements and 1 event element; then in the candidate service, the instance identifiers of the 3 operation elements may be 1, 2 and 3, respectively; the instance id of the 2 attribute elements may be 4 and the instance id of the 5,1 event element may be 6, respectively, so that the instance ids of the various candidate service elements are not the same in the above candidate services.
In another possible implementation manner, the instance identifier of each candidate service element is a unique number in the same type element of the candidate service.
For example, the candidate service includes 3 operation elements, 2 attribute elements, and 1 event element; then in the candidate service, the instance identifiers of the 3 operation elements may be 1, 2 and 3, respectively; the instance id of the 2 attribute elements may be 1 and the instance id of the 2 event elements may be 1, respectively, so that in the candidate service, the instance ids of the candidate service elements of the same type are all different, and the instance ids of the two candidate service elements of different types may be the same.
The schemes shown in steps 401 and 402 are only described by taking the service universal unique identification codes of various services supported by the cloud platform and the instance identifiers of various candidate service elements as examples. In another possible implementation manner, the service universal unique identification codes of the various services supported by the cloud platform and the instance identifiers of the various candidate service elements may also be updated to the management device directly through the codes by the developer. The embodiment of the application does not limit the setting mode of the service universal unique identification code of the service and the instance identifier of each candidate service element.
By the above-described methods of step 401 and step 402, various general device models can be set in advance in the management device.
For example, taking a lamp device model as an example, a general lamp device model is shown in table 1 below:
TABLE 1
Figure PCTCN2020112731-APPB-000001
As shown in table 1 above, the device type list indicates the device type of the lamp device.
Each row in a column of the device description indicates the various services available in the lamp device, respectively. Take the example of "service.light.100002", where "service.light" is the service type, and the last 5 bits in "100002" are the service universal unique identifier of the service.
Taking the service "service.light.100002" as an example, the service elements of the "light" service can be shown in the following table 2:
TABLE 2
Attribute identification 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
As can be seen from the above tables 1 and 2, a Service-UUID is assigned to each Service (Service), and an iid is assigned to each attribute, method, event in a specific Service; in the product application scheme, the model needs to be instantiated so as to generate an instantiation file of the equipment model which can be matched with a real product.
Taking the above lamp plant model as an example, if one lamp product has two lamps: a main light and a night light, then light Service needs to be instantiated twice.
Step 403, the request terminal sends the device information to the management device, and correspondingly, the management device receives the device information.
Wherein the device information includes at least one of device type information, device model information, and device manufacturer information of the target device.
In the embodiment of the application, when a device manufacturer requests instantiation of a device model for a device produced by the manufacturer, the manufacturer can log in a management device through a request terminal and request instantiation of a target device.
Step 404, the management device obtains at least one candidate service according to the device information.
In the embodiment of the application, because a plurality of service types are supported by the cloud platform, in order to reduce information interaction, reduce the operation difficulty of a manager of an equipment manufacturer, and improve instantiation efficiency, the management equipment may determine, according to the equipment information, at least one candidate service related to the equipment information from the services supported by the cloud platform.
When the management device determines at least one candidate service related to the device information from services supported by a cloud platform, in a possible implementation manner, the management device may query the at least one candidate service according to a preset correspondence; for example, the management device presets candidate services corresponding to various device types, and after receiving the device information, the management device queries the at least one candidate service in a preset corresponding relationship according to the device type information in the device information; or, the management device presets candidate services corresponding to each device manufacturer, and after receiving the device information, the management device queries the at least one candidate service according to the device manufacturer information.
In another possible implementation manner, the management device may also determine at least one candidate service from the services supported by the cloud platform in a semantic matching manner. For example, after receiving the device information, the management device performs semantic matching on the device information and the service name of each service to obtain a semantic matching degree between the device information of each service; and then arranging the services according to the sequence of the semantic matching degree from large to small, and acquiring the service arranged at the first N bits as the at least one candidate service, wherein N is an integer greater than or equal to 1.
The value of N may be preset in the management device by a developer or an operator of the management device.
Step 405, the management device pushes at least one candidate service to a service selection interface; accordingly, the requesting terminal receives the at least one candidate service.
The equipment selection interface is an interface displayed in the request terminal.
In the embodiment of the application, the management device pushes at least one candidate service to the request terminal, so that a user of the request terminal selects the target service from the at least one candidate service displayed on the service selection interface.
For example, in a possible implementation manner, after receiving the at least one candidate service, the requesting terminal presents the at least one candidate service in a form of a list in a service selection interface, and the administrator selects, according to the actual function of the target device, a service matching the actual function of the target device from the at least one candidate service as the target service. The manager may select a single target service or may select a plurality of target services.
Step 406, the request terminal sends other service acquisition requests to the management device; accordingly, the management apparatus receives the other service acquisition request.
In a possible implementation manner, when the request terminal detects that a specified control in the service selection interface is triggered, the request terminal sends the other service acquisition requests; that is, the other service acquisition request is a request sent when a specified control in the service selection interface is triggered.
In step 407, the management device pushes each candidate service other than the at least one candidate service to the service selection interface.
The at least one candidate service recommended by the management device for the request terminal may not be accurate enough, for example, a part or all of the services corresponding to the target device do not exist in the at least one candidate service, and at this time, the device model may not be correctly instantiated on the target device only through the at least one candidate service.
In view of the above problem, in the embodiment of the present application, a designated control is disposed in a service selection interface, and when a manager of a request terminal needs to select a target service from at least one candidate service, the designated control may be triggered, and accordingly, the request terminal requests a management device for another candidate service other than the at least one candidate service, and displays the requested another candidate service in the service selection interface, so that the manager selects the target service from the other candidate services.
In the application, the administrator of the requesting terminal may not perform the step of triggering the designated control, for example, the administrator of the requesting terminal selects the target service in the at least one candidate service, or the administrator of the requesting terminal cancels the service selection operation, and accordingly, the management device and the requesting terminal may not perform the step 406 and the step 407.
Step 408, the request terminal receives a selection operation of any one candidate service displayed on the service selection interface; when any one service in the service selection interface is selected as the target service, the management device pushes each candidate service element corresponding to the target service to the service element selection interface.
The service element selection interface may be an interface displayed in the request terminal.
Since the settings are the same in different devices and product devices, the service elements included in two services of the same type may also be different, requiring the manufacturer's administrator to perform the settings. Therefore, in the embodiment of the present application, after the administrator of the request terminal selects a candidate service as a target service in the service selection interface, the management device pushes, to the request terminal, each candidate service element corresponding to the target service, so that the user (i.e., the administrator) of the request terminal selects each service element of the target service from the candidate service elements displayed in the service selection interface.
For example, each candidate service element may include a required service element and an optional service element, in the service element selection interface, the required service element of the target service is set to be in an essential state, and the optional service element is set to be in an optional state, and a manager of the request terminal may set the state of the optional candidate service element to set the selection state of each optional candidate service element to be in a selected state and an unselected state, and after the manager of the request terminal clicks and determines, among the candidate service elements, the candidate service element in the selected state is determined as each service element of the target service.
Step 409, the request terminal sends an instantiation request of the target equipment to the management equipment; accordingly, the management device receives the instantiation request.
Wherein the instantiation request indicates that the target device corresponds to the target service.
In the embodiment of the application, after a manager of the request terminal selects the target service in the service selection interface and selects the service element of the target service in the service element selection interface, the request terminal may send an instantiation request to the management device.
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.
Step 410, the management device generates a service instance identifier of the target service according to the identifier generation rule; the identification generation rule is a rule that identifies a service in a digital form.
In a possible implementation manner of the present application, when the Service instance Identifier of the target Service is generated according to the Identifier generation rule, the Service instance Identifier may be generated based on a Service-universal Unique Identifier (Service-UUID) of the target Service.
For example, the step of generating, by the management device, the service instance identifier of the target service according to the identifier generation rule according to the instantiation order information may include the following steps:
s410a, obtaining the service type corresponding to the target service.
In one possible implementation, the management device obtains the service type of the target service from the instantiation request.
S410b, acquiring the universal unique service identification code corresponding to the service type.
Wherein the service universal unique identification code is a digital identification.
In the embodiment of the application, after the management device creates a candidate service, the service type of the candidate service is stored in correspondence with the service universal unique identification code.
In the instantiation stage, the management device locally queries a service universal unique identification code corresponding to the service type according to the service type, namely a digital identifier set for the service when an operator of the management device creates the service.
And S410c, carrying out digital change processing on the service universal unique identification code according to the identification generation rule to obtain a processed digital identification.
In this embodiment of the present application, when performing digital change processing on the service universal unique identifier according to the identifier generation rule, the management device performs left shift processing on the service universal unique identifier by a specified number in a binary system, and obtains the processed digital identifier.
In the embodiment of the application, since the service universal unique identification code of the target service is the digital identifier, the processed digital identifier can be obtained by performing left shift on the service universal unique identification code of the target service in a binary digital processing manner.
Where, for a number, left-shifting by n bits in binary is equivalent to multiplying by 2 to the power of n in decimal. For example, taking the specified number of bits as 8 bits and the service common identifier of the target service as 2 as an example, the target service is left-shifted by 8 bits in binary, which is equivalent to 2 times 8 to the power of 2 (i.e., 2 times 256).
And S410d, acquiring the service instance identifier of the target service based on the processed digital identifier.
In a possible implementation manner, the management device may use the processed digital identifier as a service instance identifier of the target service; or, the management device may also change the processed digital identifier to a certain extent to obtain the service instance identifier of the target service.
In one possible implementation manner, the management device obtains instantiation sequence information of the target service, wherein the instantiation sequence information is used for indicating that the target service is the ith service of the same type in the target device; i is more than or equal to 1, and i is an integer; and acquiring the service instance identifier of the target service according to the processed digital identifier and the instantiation sequence information.
In the embodiment of the present application, in order to avoid generating the same service instance identifier for the multiple services of the same type, instantiation order information is introduced to the target service to indicate an order of instantiation of the target service in the services of the same type of the target device.
In a possible implementation, the instantiation order information may include the number i.
For example, the instantiation request includes the service name and/or service identifier of the target service, and the order number i corresponding to the target service.
In another possible implementation manner, the instantiation request includes services corresponding to the service type of the target service in the target device; the instantiation sequence information of the target service is determined by the arrangement sequence of the target service in each service of the same type.
For example, the instantiation request includes service names of three services of the same type, and if the target service is the second of the three services, the instantiation order information of the target service indicates that i is 2.
In another possible implementation manner, the instantiation request may include the number of services corresponding to the service type of the target service in the target device; and the instantiation sequence information of the target service generates the sequential decision of the instantiation identification for each service through the management device.
For example, the instantiation request includes a service name of a certain service type and the number of services of the service type (for example, 3), and when an instantiation identifier is generated for a first service corresponding to the service type of the management device, the value i indicated by the instantiation order information of the service is set to 1; when the second service corresponding to the service type of the management device generates the instantiation identifier, the value of i indicated by the instantiation order information of the service is set to be 2, and the like.
In the embodiment of the application, after the processed digital identifier is obtained by performing digital change processing on the service universal unique identifier, the management device obtains the corresponding service instance identifier by combining the instantiation sequence of each service of the same type, that is, the service instance identifier is used to distinguish different services of the same type.
In a possible implementation manner, when the service instance identifier of the target service is obtained according to the processed digital identifier and the instantiation order information, the management device may add i to the processed digital identifier and subtract 1 to obtain the digital identifier, which is used as the service instance identifier of the target service.
For example, taking the example that the service common identifier of the target service is 2 and the specified number of bits is 8, for a device with multiple services of the same type, when a first service of the multiple services of the same type is instantiated, the service instance identifier of the first service is 2 × 256; when a second service in the plurality of services of the same type is instantiated, the service instance of the second service is identified as 2 × 256+1; when a third service of the plurality of services of the same type is instantiated, the service instance of the third service is identified as 2 × 256+2, and so on.
In the solution shown in the embodiment of the present application, the service instance identifier obtained by performing digital change processing on the service universal unique identifier to obtain the processed digital identifier and combining the digital identifier and the instantiation sequence information to obtain the service instance identifier can indicate the identifier of the corresponding service and implicitly identify the type of the service.
In another possible implementation manner of the present application, when the service instance identifier of the target service is generated according to the identifier generation rule, the management device may obtain instantiation order information of the target service, and use a digital identifier obtained by adding i to a specified digital identifier and subtracting 1 from the specified digital identifier as the service instance identifier of the target service; the specified numeric indication is an integer greater than or equal to 1.
For example, taking the specified number identifier as 1 as an example, for a device with a plurality of services of the same type, when a first service in the plurality of services of the same type is instantiated, the service instance identifier of the first service is 1; when a second service in the plurality of services of the same type is instantiated, the service instance identifier of the second service is 2; and when a third service in the plurality of services of the same type is instantiated, the service instance identifier of the third service is 3, and the like.
Step 411, the management device obtains the element type of each service element in the target service; and acquiring the instance identifier of each service element according to the element type of each service element.
Wherein, the element type of each service element includes an attribute, an operation or an event.
The instance identifier of each service element is unique in the target service;
or,
the instance identifier of each service element is unique in the same type of element of the target service.
In step 412, the management device generates a device model instantiation file containing the service instance identifier of the target service and the instance identifiers of the service elements.
In this embodiment of the present application, after the device model instantiation file is generated, the instantiation file of the device model generated according to the above scheme is stored/loaded/burned in each device of the same type as the target device.
When the management equipment generates an equipment model instantiation file, the value range, precision, step, unit and other information of the attribute can be modified; and the information of the value range, precision, stepping, unit and the like of the parameters of the operation and the event can be modified.
For example, when a manufacturer of a device sets a target service and a service element of the target service in the device, information such as a value range, accuracy, step, unit and the like of an attribute, an operation and/or an event in the target service may be set in an uploading configuration file manner or a manual selection/input manner, and when a management device instantiates a file in a generated device model, the value range, accuracy, step, unit and the like of the attribute, the operation or the event of the target service are modified based on the configuration file or a user operation.
Taking the SIID of a service obtained by shifting 8 bits to the left on the basis of a service-UUID as an example, the flow of the scheme shown in the embodiment of the present application may be as follows:
s1, when the Service is recorded in the management equipment, a fixed Service-UUID is distributed to each Service, and the uniqueness of the identifier in the life cycle needs to be kept.
S2, when the attributes, methods and events in the service are recorded in the management equipment, each element is assigned with an iid, which indicates that the element is unique in the corresponding service and is unchanged in the life cycle, and the element is not changed during instantiation.
Among these, the so-called instantiations are: one Service is used among different devices with the same function, so that different devices can select the attributes, methods and events of the Service according to the needs of the different devices. The instantiation of the Service also comprises that one device contains two instantiation services of the same type; for example, a desk lamp containing a main lamp and a night lamp needs to be instantiated twice for light Service.
S3, in the input process of the management equipment, modeling different equipment models according to the input different services, so as to obtain the equipment models of the equipment; such as a device model of the lamp.
S4, requesting to generate an instantiation file of the manufacturer according to the equipment model; the management device receives a device instantiation request, wherein the request comprises information such as the type, the model, the name, the manufacturer and the like of a specific device.
And S5, the management equipment automatically loads the equipment model of the specific equipment type according to the information, wherein the equipment model comprises subsequent services and candidate service elements in the candidate services, and the candidate service elements are selected by managers of manufacturers in the instantiation process.
S6, the management equipment automatically generates the siid of the instantiated Service according to the Service-uuid of the selected Service, and the siid generation rule is as follows:
when a service is instantiated, the generated siid is the service-UUID which is shifted by 8 bits left; if a plurality of services of the same type are instantiated, the second site for instantiating the same service is +1 after the service-UUID is shifted to the left by 8 bits; the third is +2 after the service-UUID is shifted to the left by 8 bits; and so on.
And S7, after the Service is selected, the manager of the manufacturer continuously selects the attributes, methods and events to be used in the Service, and the iid of the selected Service element needs to be kept unchanged so as to facilitate the subsequent message interaction processing.
And S8, if the Service of the current equipment model cannot meet the product requirement, starting to add other Service flows, and after receiving the request, the management background automatically loads all defined services for the selection of the manager of the manufacturer.
In summary, according to the scheme shown in the embodiment of the present application, when a piece of equipment is instantiated by a management device, different digital identifiers are automatically generated for services of the same type through a digital generation rule in combination with an instantiation sequence of the services of the same type in the equipment, so that multiple services of the same type in the same equipment are automatically distinguished and identified in an instantiation process, manual operation steps in the process of instantiating an equipment model are simplified, and instantiation efficiency of the equipment model is improved.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 5, a block diagram of a file generation apparatus in the internet of things according to an embodiment of the present application is shown. The device has the function of realizing the steps executed by the management equipment of the cloud platform in the file generation method in the Internet of things. As shown in fig. 5, the apparatus may include:
a first request receiving module 501, configured to receive an instantiation request of a target device; the instantiation request indicates that the target device corresponds to a target service;
an identifier generating module 502, configured to generate a service instance identifier of the target service according to an identifier generating rule;
the file generating module 503 is configured to generate an equipment model instantiation file of the target device, where the equipment model instantiation file includes a service instance identifier of the target service.
In a possible implementation manner, the identifier generating module 502 includes:
the processing unit is used for carrying out digital change processing on the service universal unique identification code of the target service according to the identification generation rule to obtain a processed digital identification;
and the identification obtaining unit is used for obtaining the service instance identification of the target service based on the processed digital identification.
In a possible implementation manner, the identifier generating module 502 further includes:
the service type acquisition unit is used for acquiring the service type corresponding to the target service before the processing unit processes the service universal unique identification code of the target service according to the identification generation rule and acquires the processed digital identification;
and the identification code acquisition unit is used for acquiring the universal and unique identification code of the service corresponding to the service type.
In a possible implementation manner, the processing unit is configured to perform, in a binary system, processing on the service common unique identifier by left-shifting an assigned digit to obtain the processed digital identifier.
In a possible implementation manner, the identifier obtaining unit is configured to use the processed digital identifier as a service instance identifier of the target service.
In a possible implementation manner, the identification obtaining unit is configured to,
acquiring instantiation sequence information of the target service, wherein the instantiation sequence information is used for indicating that the target service is the ith service of the same type in the target equipment; i is more than or equal to 1 and is an integer;
and acquiring the service instance identifier of the target service according to the processed digital identifier and the instantiation sequence information.
In a possible implementation manner, the identifier obtaining unit is configured to add, to the processed digital identifier, a digital identifier obtained by subtracting 1 from i, and use the digital identifier as the service instance identifier of the target service.
In one possible implementation, the identification generation module 502 is configured to,
acquiring instantiation sequence information of the target service, wherein the instantiation sequence information is used for indicating that the target service is the ith service of the same type in the target equipment; i is more than or equal to 1 and is an integer;
adding i to the appointed number identifier and subtracting 1 to obtain a number identifier, wherein the number identifier is used as the service instance identifier of the target service; the specified numeric indication is an integer greater than or equal to 1.
In one possible implementation, the apparatus further includes:
the element type acquisition module is used for acquiring the element types of all service elements in the target service before the file generation module generates the equipment model instantiation file of the target equipment; the element type comprises an attribute, an operation or an event;
an instance identifier obtaining module, configured to obtain an instance identifier of each service element according to the element type of each service element;
the file generation module is used for generating the equipment model instantiation file containing the service instance identifier of the target service and the instance identifier of each service element.
In a possible implementation manner, the instance identifier of each service element is unique in the target service;
or,
and the instance identifier of each service element is unique in the same type of elements of the target service.
In one possible implementation, the apparatus further includes:
a product information receiving module, configured to receive device information before the first request receiving module receives an instantiation request for a target device, where the device information includes at least one of device type information, device model information, and device manufacturer information of the target device;
a candidate service acquisition module, configured to acquire at least one candidate service according to the device information;
the first pushing module is used for pushing the at least one candidate service to a service selection interface so that a user can select the target service from the at least one candidate service displayed on the service selection interface.
In one possible implementation, the apparatus further includes:
the second request receiving module is used for receiving other service acquisition requests;
and the second pushing module is used for pushing other candidate services except the at least one candidate service to the service selection interface.
In one possible implementation, the apparatus further includes:
and the candidate service element pushing module is used for pushing each candidate service element corresponding to the target service to the service element selection interface when any one service in the service selection interface is selected as the target service, so that a user can select each service element of the target service from the candidate service elements displayed on the service selection interface.
In summary, according to the scheme shown in the embodiment of the present application, when a piece of equipment is instantiated by a management device, different digital identifiers are automatically generated for services of the same type through a digital generation rule in combination with an instantiation sequence of the services of the same type in the equipment, so that multiple services of the same type in the same equipment are automatically distinguished and identified in an instantiation process, manual operation steps in the process of instantiating an equipment model are simplified, and instantiation efficiency of the equipment model is improved.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the above functional modules is illustrated, and in practical applications, the above functions may be distributed by different functional modules according to actual needs, that is, the content structure of the device is divided into different functional modules, so as to complete all or part of the functions described above.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Referring to fig. 6, a schematic structural diagram of a computer device 600 according to an embodiment of the present application is shown. The computer device 600 may include: a processor 601, a receiver 602, a transmitter 603, a memory 604, and a bus 605.
The processor 601 includes one or more processing cores, and the processor 601 executes various functional applications and information processing by running software programs and modules.
The receiver 602 and the transmitter 603 may be implemented as one communication component, which may be a communication chip. The communication chip may also be referred to as a transceiver.
The memory 604 is coupled to the processor 601 by a bus 605.
The memory 604 may be configured to store a computer program, and the processor 601 is configured to execute the computer program to implement the steps performed by the server device, the configuration device, the cloud platform, or the account server in the foregoing method embodiments.
Further, memory 604 may be implemented by any type or combination of volatile or non-volatile storage devices, including, but not limited to: magnetic or optical disks, electrically erasable programmable read-only memories, static random access memories, read-only memories, magnetic memories, flash memories, programmable read-only memories.
In an exemplary embodiment, the computer device includes a processor, a memory, and a transceiver (which may include a receiver for receiving information and a transmitter for transmitting information).
In one possible implementation, when the computer device is implemented as a management device of a cloud platform,
the transceiver is used for receiving an instantiation request of a target device; the instantiation request indicates that the target device corresponds to a target service;
the processor is used for generating a service instance identifier of the target service according to an identifier generation rule;
the processor is further configured to generate an equipment model instantiation file of the target equipment, where the equipment model instantiation file includes a service instance identifier of the target service.
When the computer device is implemented as a management device of a cloud platform, the processor and the transceiver in the computer device according to the embodiment of the present application may execute the steps executed by the management device in the method shown in fig. 3 or fig. 4, which is not described herein again.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the storage medium, and the computer program is loaded and executed by a processor to implement each step in the file generation method in the internet of things shown in fig. 3 or fig. 4.
The present application also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, so that the computer device executes the steps in the file generation method in the internet of things shown in fig. 3 or fig. 4.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above description is only exemplary of the present application and should not be taken as limiting the present application, and any modifications, equivalents, improvements and the like that are made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (28)

  1. A file generation method in the Internet of things is characterized in that the method is executed by a management device of a cloud platform in the Internet of things, and the method comprises the following steps:
    receiving an instantiation request of a target device; the instantiation request indicates that the target device corresponds to a target service;
    generating a service instance identifier of the target service according to an identifier generation rule;
    and generating an equipment model instantiation file of the target equipment, wherein the equipment model instantiation file comprises a service instance identifier of the target service.
  2. The method of claim 1, wherein generating the service instance identifier of the target service according to the identifier generation rule comprises:
    processing the service universal unique identification code of the target service according to the identification generation rule to obtain a processed digital identification;
    and acquiring the service instance identifier of the target service based on the processed digital identifier.
  3. The method according to claim 2, wherein before processing the service universal unique identifier of the target service according to the identifier generation rule and obtaining the processed digital identifier, the method further comprises:
    acquiring a service type corresponding to the target service;
    and acquiring the service universal unique identification code corresponding to the service type.
  4. The method of claim 2, wherein the processing the service universal unique identifier according to the identifier generation rule to obtain a processed digital identifier comprises:
    and under the binary system, carrying out left shift pointing digit processing on the service universal unique identification code to obtain the processed digit identification.
  5. The method of claim 2, wherein obtaining the service instance identifier of the target service based on the processed digital identifier comprises:
    and taking the processed digital identifier as a service instance identifier of the target service.
  6. The method of claim 2, wherein the obtaining the service instance identifier of the target service according to the processed digital identifier comprises:
    acquiring instantiation sequence information of the target service, wherein the instantiation sequence information is used for indicating that the target service is the ith service of the same type in the target equipment; i is more than or equal to 1, and i is an integer;
    and acquiring the service instance identifier of the target service according to the processed digital identifier and the instantiation sequence information.
  7. The method according to claim 6, wherein said obtaining the service instance identifier of the target service according to the processed number identifier and the instantiation order information comprises:
    and adding i to the processed digital identifier and subtracting 1 to obtain a digital identifier, wherein the digital identifier is used as the service instance identifier of the target service.
  8. The method of claim 1, wherein generating the service instance identifier for the target service according to the identifier generation rule comprises:
    acquiring instantiation sequence information of the target service, wherein the instantiation sequence information is used for indicating that the target service is the ith service of the same type in the target equipment; i is more than or equal to 1 and is an integer;
    adding i to the appointed number identifier and subtracting 1 to obtain a number identifier, wherein the number identifier is used as the service instance identifier of the target service; the specified digital identity is an integer greater than or equal to 1.
  9. The method according to any one of claims 1 to 8, wherein before generating the device model instantiation file of the target device, the method further comprises:
    acquiring element types of all service elements in the target service; the element type comprises an attribute, an operation or an event;
    acquiring instance identifiers of the service elements according to the element types of the service elements;
    the generating of the device model instantiation file of the target device comprises:
    and generating the equipment model instantiation file containing the service instance identification of the target service and the instance identification of each service element.
  10. The method of claim 9,
    the instance identifier of each service element is unique in the target service;
    or,
    and the instance identifier of each service element is unique in the same type of elements of the target service.
  11. The method of claim 1, wherein prior to receiving the instantiation request for the target device, further comprising:
    receiving equipment information, wherein the equipment information comprises at least one of equipment type information, equipment model information and equipment manufacturer information of the target equipment;
    acquiring at least one candidate service according to the equipment information;
    pushing the at least one candidate service to a service selection interface so that the user can select the target service from the at least one candidate service displayed by the service selection interface.
  12. The method of claim 11, further comprising:
    receiving other service acquisition requests;
    pushing each other candidate service except the at least one candidate service to the service selection interface.
  13. The method according to claim 11 or 12, further comprising:
    when any one service in the service selection interface is selected as the target service, pushing each candidate service element corresponding to the target service to a service element selection interface so that a user can select each service element of the target service from the candidate service elements displayed on the service selection interface.
  14. A file generation device in the Internet of things is used in management equipment of a cloud platform in the Internet of things, and the device comprises:
    the device comprises a first request receiving module, a first control module and a second control module, wherein the first request receiving module is used for receiving an instantiation request of a target device; the instantiation request indicates that the target equipment corresponds to a target service;
    the identification generation module is used for generating a service instance identification of the target service according to an identification generation rule;
    and the file generation module is used for generating an equipment model instantiation file of the target equipment, wherein the equipment model instantiation file comprises a service instance identifier of the target service.
  15. The apparatus of claim 14, wherein the identity generation module comprises:
    the processing unit is used for processing the service universal unique identification code of the target service according to the identification generation rule to obtain a processed digital identification;
    and the identification obtaining unit is used for obtaining the service instance identification of the target service based on the processed digital identification.
  16. The apparatus of claim 14, wherein the identification generation module further comprises:
    a service type obtaining unit, configured to obtain a service type corresponding to the target service before the processing unit processes the service universal unique identifier of the target service according to the identifier generation rule and obtains a processed digital identifier;
    and the identification code acquisition unit is used for acquiring the universal and unique identification code of the service corresponding to the service type.
  17. The apparatus of claim 15,
    and the processing unit is used for carrying out left shift pointing digit processing on the service universal unique identification code under a binary system to obtain the processed digital identifier.
  18. The apparatus of claim 18,
    and the identifier obtaining unit is used for taking the processed digital identifier as a service instance identifier of the target service.
  19. The apparatus according to claim 15, wherein the identity obtaining unit is configured to,
    acquiring instantiation sequence information of the target service, wherein the instantiation sequence information is used for indicating that the target service is the ith service of the same type in the target equipment; i is more than or equal to 1, and i is an integer;
    and acquiring the service instance identifier of the target service according to the processed digital identifier and the instantiation sequence information.
  20. The apparatus of claim 19,
    and the identifier obtaining unit is used for adding i to the processed digital identifier and subtracting 1 to obtain the digital identifier, and the digital identifier is used as the service instance identifier of the target service.
  21. The apparatus of claim 14, wherein the identity generation module is configured to,
    acquiring instantiation sequence information of the target service, wherein the instantiation sequence information is used for indicating that the target service is the ith service of the same type in the target equipment; i is more than or equal to 1, and i is an integer;
    adding i to the appointed number identifier and subtracting 1 to obtain a number identifier, wherein the number identifier is used as the service instance identifier of the target service; the specified digital identity is an integer greater than or equal to 1.
  22. The apparatus of any one of claims 14 to 21, further comprising:
    the element type acquisition module is used for acquiring the element types of all service elements in the target service before the file generation module generates the equipment model instantiation file of the target equipment; the element type comprises an attribute, an operation or an event;
    an instance identifier obtaining module, configured to obtain an instance identifier of each service element according to the element type of each service element;
    the file generating module is used for generating the device model instantiation file containing the service instance identifier of the target service and the instance identifier of each service element.
  23. The apparatus of claim 22,
    the instance identifier of each service element is unique in the target service;
    or,
    and the instance identifier of each service element is unique in the same type of elements of the target service.
  24. The apparatus of claim 14, further comprising:
    a product information receiving module, configured to receive device information before the first request receiving module receives an instantiation request for a target device, where the device information includes at least one of device type information, device model information, and device manufacturer information of the target device;
    a candidate service acquisition module, configured to acquire at least one candidate service according to the device information;
    the first pushing module is used for pushing the at least one candidate service to a service selection interface so that a user can select the target service from the at least one candidate service displayed on the service selection interface.
  25. The apparatus of claim 24, further comprising:
    the second request receiving module is used for receiving other service acquisition requests;
    and the second pushing module is used for pushing other candidate services except the at least one candidate service to the service selection interface.
  26. The apparatus of claim 24 or 25, further comprising:
    and the candidate service element pushing module is used for pushing each candidate service element corresponding to the target service to the service element selection interface when any one service in the service selection interface is selected as the target service, so that a user can select each service element of the target service from the candidate service elements displayed on the service selection interface.
  27. A computer device, wherein the computer device comprises a processor, a memory, and a transceiver;
    a transceiver to receive an instantiation request for a target device; the instantiation request indicates that the target device corresponds to a target service;
    the processor is used for generating a service instance identifier of the target service according to an identifier generation rule;
    the processor is further configured to generate an equipment model instantiation file of the target equipment, where the equipment model instantiation file includes a service instance identifier of the target service.
  28. A computer-readable storage medium, in which a computer program is stored, the computer program being configured to be executed by a processor to implement the file generation method in the internet of things according to any one of claims 1 to 13.
CN202080102655.3A 2020-08-31 2020-08-31 File generation method and device in Internet of things, computer equipment and storage medium Pending CN115803736A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/112731 WO2022041280A1 (en) 2020-08-31 2020-08-31 Method and apparatus for generating file in internet of things, computer device, and storage medium

Publications (1)

Publication Number Publication Date
CN115803736A true CN115803736A (en) 2023-03-14

Family

ID=80354431

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202080102655.3A Pending CN115803736A (en) 2020-08-31 2020-08-31 File generation method and device in Internet of things, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN115803736A (en)
WO (1) WO2022041280A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115277421B (en) * 2022-07-21 2023-11-24 南京数睿数据科技有限公司 Configuration information pushing method, device, electronic equipment and computer readable medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10853837B2 (en) * 2013-10-07 2020-12-01 Adobe Inc. Integrated testing, targeting and measuring of web site components
CN106685691B (en) * 2016-11-09 2019-11-12 苏州数言信息技术有限公司 The efficient update configuration method of terminal device in Internet of things system
CN107544298B (en) * 2017-06-27 2019-11-29 新华三云计算技术有限公司 A kind of camera call method and device
CN107483247B (en) * 2017-08-17 2019-06-28 郑州云海信息技术有限公司 A kind of multi-level service configuration management method based on cloud platform
CN108089916A (en) * 2017-12-15 2018-05-29 北京搜狐新媒体信息技术有限公司 A kind of method and device for generating ID
CN109995805B (en) * 2017-12-29 2021-12-17 深圳市优必选科技有限公司 Intelligent robot management method, terminal device and medium
CN110263565A (en) * 2019-06-28 2019-09-20 北京百度网讯科技有限公司 Method and apparatus for calling service

Also Published As

Publication number Publication date
WO2022041280A1 (en) 2022-03-03

Similar Documents

Publication Publication Date Title
CN112073471B (en) Control method and device of equipment, storage medium and electronic device
CN109040200B (en) Access method and device of Internet of things equipment
KR20120072022A (en) Virtual smarthome system, server, home gateway based on clouding computing and method thereof
US20160270021A1 (en) M2m application remote registration method, device, system and storage medium
CN104639667A (en) Equipment identification method, equipment identification device and equipment identification system based on MAC address
CN105208090A (en) Zookeeper-based Leader selection method
CN109862063A (en) Distribution subscription matching process, device and storage medium based on MQTT
CN110413845B (en) Resource storage method and device based on Internet of things operating system
US11303583B2 (en) Resource trees by management controller
CN111435304A (en) Space unit generation method and device, storage medium and processor
CN114374602A (en) Master control equipment configuration method and device, cloud server and storage medium
CN114090388A (en) Information acquisition method, server cluster, server and equipment
CN109828840A (en) Resource method of combination, device, storage medium and electronic equipment
CN110249642A (en) The method and apparatus of operational instances resource
CN109286545A (en) A kind of smart home device management method and device
JP2020031305A (en) Multi-cloud operation program and multi-cloud operation method
CN115803736A (en) File generation method and device in Internet of things, computer equipment and storage medium
CN113994649A (en) Method, device, equipment and storage medium for accessing BLE Mesh equipment
CN113791766B (en) Method for combining data interfaces, electronic device and readable storage medium
EP2830289A1 (en) Adaptable reporting in a multi-client telecommunication network
CN114296696A (en) Business function operation method and device, storage medium and electronic equipment
CN113434190B (en) Data processing method and device, storage medium and electronic equipment
CN115836511A (en) Equipment management method and device in Internet of things, computer equipment and storage medium
CN104486449A (en) Calculation device controlling method and device
CN111552715A (en) User query method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination