Sub-device adaptation method and device, and Internet of Things system

By acquiring and processing sub-device configuration data on the Internet of Things platform, determining the target configuration data and generating a material model, the problem of low adaptation efficiency of IoT platforms to Zifeng devices in the prior art is solved, and automated adaptation and fast access are achieved.

CN119583598APending Publication Date: 2025-03-07SHENZHEN QIANHAI EVOC ASIA-PACIFIC ELECTRONIC EQUIP TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411756482.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In the prior art, when the Internet of Things platform accesses a large number of Zifeng devices from different manufacturers, it faces adaptation limitations and high costs, resulting in low access efficiency.

Method used

The configuration data of the sub-device is obtained through the gateway and sent to the service platform to determine the target configuration data. The gateway and the service platform respectively generate matching object models to realize automated adaptation of the sub-device.

Benefits of technology

It improves the adaptation efficiency of Zifeng sub-equipment, simplifies the construction process of material models, reduces development costs and time, and realizes rapid adaptation of sub-equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583598A_ABST
    Figure CN119583598A_ABST
Patent Text Reader

Abstract

The embodiment of the invention is applicable to the technical field of Internet of Things, and provides a sub-device adaptation method and device and an Internet of Things system, the method is applied to a gateway, and the method comprises the following steps: acquiring first configuration data of a sub-device; the first configuration data comprises universal attribute information and private attribute information corresponding to a preset protocol; sending the first configuration data to the service platform; the service platform is used for determining target configuration data based on the first configuration data; the target configuration data is one of the first configuration data and second configuration data different from the first configuration data; generating a gateway object model matched with the target configuration data; and adopting the gateway object model to adapt to the sub-equipment. According to the embodiment of the invention, automatic construction of the object model and rapid adaptation of the sub-equipment can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application belong to the technical field of Internet of Things, and in particular, to a sub-device adaptation method, apparatus, and Internet of Things system. Background Art

[0002] With the advancement of digitalization, more and more Zigbee devices are connected to the Internet platform around themes such as smart manufacturing, smart cities, smart buildings, and smart homes. The number of IoT devices is growing exponentially every year, running through all aspects of production, society, humanities, life, and daily life. Therefore, the access methods and solutions for a large number of Zigbee devices from different manufacturers have become a problem that the IoT platform needs to face. At the same time, the speed and scope of access are a major factor restricting the number of platform devices.

[0003] When a sub-device (such as the above-mentioned Zifeng device) is connected to the Internet of Things, the gateway and platform need to build a physical model that matches the sub-device. The gateway and platform use the same physical model to realize data collection and transmission of the sub-device.

[0004] However, in the prior art, the platform object model is built by the platform developer manually coding and editing scripts, and the gateway object model requires the gateway developer to code the gateway program to add the gateway to build a new device object model. Since the object model developer and the gateway developer can only develop object models for a specified part of the sub-devices, the adaptation of the gateway and the platform to the sub-devices has certain limitations. Summary of the invention

[0005] In view of this, the embodiments of the present application provide a sub-device adaptation method, apparatus, Internet of Things system, electronic device and computer program product to improve the adaptation efficiency of Zifeng sub-devices.

[0006] A first aspect of an embodiment of the present application provides a sub-device adaptation method, which is applied to a gateway, wherein the gateway is communicatively connected to a service platform, and the method includes:

[0007] Acquire first configuration data of the sub-device; the first configuration data includes general attribute information and private attribute information corresponding to the preset protocol;

[0008] sending the first configuration data to the service platform; the service platform is used to determine target configuration data based on the first configuration data; the target configuration data is one of the first configuration data and second configuration data different from the first configuration data;

[0009] Generating a gateway object model matching the target configuration data;

[0010] The gateway object model is used to adapt the sub-device.

[0011] A second aspect of an embodiment of the present application provides a sub-device adaptation method, which is applied to a service platform, wherein the service platform is connected to a gateway for communication, and the gateway is used to obtain first configuration data of the sub-device; the first configuration data includes general attribute information and private attribute information corresponding to a preset protocol; the method includes:

[0012] receiving the first configuration data sent by the gateway;

[0013] Determine target configuration data based on the first configuration data; the target configuration data is one of the first configuration data and second configuration data different from the first configuration data;

[0014] generating a platform object model matching the target configuration data;

[0015] The platform object model is used to adapt the sub-device.

[0016] A third aspect of an embodiment of the present application provides a sub-device adaptation device, which is applied to a gateway, wherein the gateway is communicatively connected to a service platform, and the device includes:

[0017] A first configuration data acquisition module, used to acquire first configuration data of a sub-device; the first configuration data includes general attribute information and private attribute information corresponding to a preset protocol;

[0018] A first configuration data sending module, used to send the first configuration data to the service platform; the service platform is used to determine target configuration data based on the first configuration data; the target configuration data is one of the first configuration data and second configuration data different from the first configuration data;

[0019] A gateway object model generation module, used to generate a gateway object model matching the target configuration data;

[0020] The gateway adaptation module is used to adapt the sub-device using the gateway object model.

[0021] A fourth aspect of the embodiments of the present application provides a sub-device adaptation device, which is applied to a service platform, wherein the service platform is connected to a gateway for communication, and the gateway is used to obtain first configuration data of the sub-device; the first configuration data includes general attribute information and private attribute information corresponding to a preset protocol; the device includes:

[0022] A first configuration data receiving module, used for receiving the first configuration data sent by the gateway;

[0023] a target configuration data determination module, configured to determine target configuration data based on the first configuration data; the target configuration data being one of the first configuration data and second configuration data different from the first configuration data;

[0024] A platform object model generation module, used to generate a platform object model matching the target configuration data;

[0025] The platform adaptation module is used to adapt the sub-device using the platform object model.

[0026] A fifth aspect of the embodiments of the present application provides an Internet of Things system, the system comprising: a gateway and a service platform;

[0027] The gateway acquires first configuration data of the sub-device; the first configuration data includes general attribute information and private attribute information corresponding to the preset protocol;

[0028] The gateway sends the first configuration data to the service platform;

[0029] The service platform receives the first configuration data sent by the gateway;

[0030] The service platform determines target configuration data based on the first configuration data; the target configuration data is one of the first configuration data and second configuration data different from the first configuration data;

[0031] The service platform generates a platform object model matching the target configuration data;

[0032] The gateway generates a gateway object model matching the target configuration data;

[0033] The gateway adapts the sub-device using the gateway object model;

[0034] The service platform adapts the sub-device using the platform object model.

[0035] The sixth aspect of an embodiment of the present application provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device implements the sub-device adaptation method as described in the first aspect above.

[0036] A seventh aspect of the embodiments of the present application provides a computer program product, including a computer program. When the computer program is executed, the sub-device adaptation method described in the first aspect is executed.

[0037] An eighth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the sub-device adaptation method as described in the first aspect above is implemented.

[0038] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0039] In an embodiment of the present application, first configuration data of a sub-device is obtained through a gateway; the first configuration data includes general attribute information and private attribute information corresponding to a preset protocol; the gateway sends the first configuration data to the service platform; the service platform is used to determine target configuration data based on the first configuration data; the target configuration data is one of the first configuration data and second configuration data different from the first configuration data, and the gateway generates a gateway object model that matches the target configuration data; the service platform is used to generate a platform object model that matches the target configuration data; the gateway object model is used to adapt the sub-device, so that the gateway obtains the first configuration data of the sub-device to be adapted, which includes general attribute information and private attribute information. After the target configuration data is determined by the service platform, the service platform and the gateway use the same target configuration data to construct object models respectively, thereby realizing automatic construction of object models and rapid adaptation of sub-devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or prior art descriptions. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0041] Figure 1 It is a sub-device access development flow chart in the prior art;

[0042] Figure 2 It is a flow chart of sub-device access to the network in the prior art;

[0043] Figure 3 is a schematic diagram of a sub-device adaptation method provided in an embodiment of the present application;

[0044] Figure 4 It is an Internet of Things framework provided by an embodiment of the present application;

[0045] Figure 5 is a sub-device adaptation flow chart provided in an embodiment of the present application;

[0046] Figure 6 is a schematic diagram of another sub-device adaptation method provided in an embodiment of the present application;

[0047] Figure 7 is a schematic diagram of a sub-device adaptation device provided in an embodiment of the present application;

[0048] Figure 8 is a schematic diagram of another sub-device adaptation device provided in an embodiment of the present application;

[0049] Fig. 9 This is a schematic diagram of an Internet of Things system provided by an embodiment of the present application;

[0050] Fig.10 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0052] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0053] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0054] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0055] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0056] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0057] Reference Figure 1 , showing a sub-device access development flow chart in the prior art. When a gateway (for example: Zifeng smart home gateway) needs to adapt a new sub-device (the new sub-device is a sub-device that the gateway currently does not support to access the network), the gateway developer and the platform developer are required to manually perform adaptability development. The development process includes: 101, the gateway developer adapts and develops the gateway software for the new sub-device (such as the smart switch of xx brand xxx model) (builds the physical model of the new sub-device). 102, the platform developer adapts and develops the platform software for the new sub-device (such as the smart switch of xx brand xxx model) (builds the physical model of the new sub-device). 103, after passing the firmware test, it is released to the market. 104, the gateway upgrades the firmware to be compatible with the new device.

[0058] Reference Figure 2 , shows a flow chart of a sub-device access to the network in the prior art. After the gateway is upgraded, the user can access the network with the new device compatible with the gateway, including the following steps:

[0059] 201. The user adds a sub-device in the user interface provided by the platform.

[0060] 202. The platform sends a network access permission instruction to the gateway.

[0061] 203, the gateway enters the network configuration mode.

[0062] 204, the user performs network configuration operations on the sub-device.

[0063] 205, the gateway interacts with the sub-device to access the network.

[0064] 206 , the gateway uses the object model built by the gateway developer to adapt the sub-device currently accessing the network.

[0065] 207, the gateway sends a sub-device network access request to the platform.

[0066] 208. The platform uses the object model built by the platform developer to adapt the sub-device currently accessing the network.

[0067] 209 , the platform sends relevant information to the user interface, so that the user interface prompts that a new sub-device is found.

[0068] 210, the user interface prompts whether to identify the sub-device (the device that cannot be adapted prompts that it cannot be identified).

[0069] 211. The user confirms the operation of adding a device on the user interface.

[0070] 212. The platform sends a network access instruction to the gateway.

[0071] 213, the gateway responds to the network access instruction.

[0072] 214, the gateway and the sub-device perform networking interaction.

[0073] 215. The sub-device is successfully connected to the network.

[0074] 216, the gateway reports the device online status (online or offline) to the platform.

[0075] 217, the platform sends relevant information to the user interface so that the device online status is displayed on the user interface.

[0076] When the device is successfully connected to the network, the user can control the sub-device that has been connected to the network by operating in the user interface, and the control results can be displayed through the user interface.

[0077] exist Figure 2 In the process shown, each model of sub-device requires the gateway developer to adapt. The gateway developer needs to parse the device data point information one by one, convert it into the platform protocol to forward the data point information. There are many Zigbee products, and they cannot be adapted one by one, resulting in extremely high adaptation costs and low access efficiency. Each model of sub-device requires the platform developer to build a model according to the device data points, and the model tests each point and command. The adaptation cost is extremely high and the access efficiency is low. Usually, the sub-device manufacturer and the platform are not the same company. When there is no cooperative relationship, the manufacturer does not provide parameters, resulting in the gateway developer and platform developer being unable to adapt because they cannot get the device parameters.

[0078] The technical solution of the present application is described below through specific embodiments.

[0079] The sub-device in the embodiment of the present application is a Zifeng sub-device, the gateway is a Zifeng gateway, and the service platform is an online platform (including but not limited to a cloud computing platform) that can communicate with the Zifeng gateway. The gateway can exchange data with the sub-devices and service platforms that have been connected to the network, and the service platform can store, analyze and process the data, as well as provide users with application services related to the Internet of Things.

[0080] The gateway communicates with the service platform through MQTT (Message Queuing Telemetry Transport) and HTTPS (Hypertext Transfer Protocol Secure), and uses the service platform's private protocol. The southbound protocol supports the Zifeng 3.0 protocol and supports loading private attribute configuration data parsing.

[0081] Reference Figure 3 , shows a schematic diagram of a sub-device adaptation method provided by an embodiment of the present application, and the embodiment of the present application is applied to a gateway, and the gateway is connected to a service platform for communication. The embodiment of the present application may specifically include the following steps:

[0082] Step 301, obtaining first configuration data of a sub-device;

[0083] The first configuration data includes general attribute information and private attribute information corresponding to the preset protocol; the preset protocol is the Zifeng protocol (including but not limited to the Zifeng 3.0 protocol), and the general attributes are standard attributes predefined in the preset protocol. Private attributes are custom attributes set by the device manufacturer. General attribute information includes general attribute related parameters (for example: data type, numerical range, etc.), and private attribute information includes private attribute related parameters. In practice, private attribute information is divided into two categories, one is that the definition method complies with the definition rules of private attributes in the Zifeng protocol specification, and the other is that the definition method does not comply with the definition rules of private attributes in the Zifeng protocol specification.

[0084] After establishing a communication connection with the sub-device, the gateway can obtain first configuration data corresponding to the sub-device, where the first configuration data includes general attribute information and at least part of private attribute information of the sub-device.

[0085] As an example, the configuration data includes a manufacturer identification, a device model, a list of data points, a type of each data point, a data value range, data transmission parameters, and a control method.

[0086] Step 302, sending the first configuration data to the service platform;

[0087] The service platform is used to determine target configuration data based on the first configuration data; the target configuration data is one of the first configuration data and second configuration data different from the first configuration data.

[0088] The service platform can determine that the first configuration data or the second configuration data is the target configuration data, and instruct the gateway to determine the target configuration data.

[0089] Furthermore, the second configuration data may be configuration data obtained by performing an adjustment operation (eg, adding, deleting, or modifying) on ​​the first configuration data.

[0090] In some cases, private attribute information cannot be fully obtained. The user can determine whether it is necessary to adjust the first configuration data (including but not limited to adding private attribute information, modifying private attribute information) based on actual needs. If the user performs an adjustment operation, the service platform determines that the adjusted configuration data is the second configuration data, and further determines that the second configuration data is the target configuration data.

[0091] In other cases, the user does not know how to perform the adjustment operation, or the user does not need the function corresponding to the private attribute that has not been obtained, and the user can also choose not to perform the adjustment operation. If the user does not perform the adjustment operation on the first configuration data, the service platform determines the first configuration data as the target configuration data.

[0092] Step 303, generating a gateway object model matching the target configuration data;

[0093] The service platform is used to generate a platform object model matching the target configuration data;

[0094] The gateway uses the target configuration data to generate the gateway object model, and the service platform uses the same target configuration data to generate the platform object model, so that the object models of the gateway and the service platform are obtained from the same configuration data. Based on the gateway object model and the platform object model, the gateway and the service platform can synchronize the sub-device related data corresponding to the object model.

[0095] Step 304: Adapt the sub-device using the gateway object model.

[0096] After generating the gateway object model, the gateway can use the gateway object model to identify and interact with the sub-device and service platform to adapt the sub-device.

[0097] The interaction between the gateway and the sub-device may include but is not limited to: the gateway sends read, write, control and other instruction data to the sub-device; the sub-device sends response result data corresponding to the instruction data to the gateway.

[0098] The service platform is used to adapt the sub-device using the platform object model. Since the gateway can use the gateway object model to interact with the sub-device, the service platform can use the generated platform object model to interact with the gateway, thereby realizing the adaptation of the service platform to the sub-device, and then realizing the interaction with the sub-device. The interaction between the service platform and the sub-device may include but is not limited to: sending the command data such as reading, writing, and controlling the sub-device to the gateway, and the gateway sending the command data to the sub-device; receiving the response result data corresponding to the command data sent by the sub-device through the gateway.

[0099] By obtaining the first configuration data through the gateway and transmitting it to the service platform, after the service platform determines the target configuration data based on the first configuration data, the gateway and the service platform can each generate a physical model corresponding to the sub-device for the same target configuration data, simplifying the way of creating a new physical model, avoiding the original need for platform developers to code physical models and gateway developers to code in the prior art, and relying entirely on manual model building, realizing the automatic construction of physical models to complete the adaptation of sub-devices and improve the adaptation efficiency of sub-devices. At the same time, it can also save the platform developers and developers in the prior art a large number of repetitive customization tasks for new sub-devices, saving development costs and time, making sub-device modeling simpler and more convenient.

[0100] In an embodiment of the present application, first configuration data of a sub-device is obtained through a gateway; the first configuration data includes general attribute information and private attribute information corresponding to a preset protocol; the gateway sends the first configuration data to the service platform; the service platform is used to determine target configuration data based on the first configuration data; the target configuration data is one of the first configuration data and second configuration data different from the first configuration data, and the gateway generates a gateway object model that matches the target configuration data; the service platform is used to generate a platform object model that matches the target configuration data; the gateway object model is used to adapt the sub-device, so that the gateway obtains the first configuration data of the sub-device to be adapted, which includes general attribute information and private attribute information. After the target configuration data is determined by the service platform, the service platform and the gateway use the same target configuration data to construct object models respectively, thereby realizing automatic construction of object models and rapid adaptation of sub-devices.

[0101] For the process of determining the target configuration data by the service platform, in one implementation, the user can communicate with the service platform through a terminal device, and the terminal device can display a user interface provided by the service platform, in which the general attribute information and private attribute information included in the first configuration data are displayed. The user can determine whether to adjust the first configuration data in the user interface according to actual needs.

[0102] If the user performs an adjustment operation on the first configuration data in the user interface, the terminal device can interact with the service platform so that the service platform can receive adjustment information corresponding to the adjustment operation. If the service platform determines that there is adjustment information corresponding to the first configuration data, the service platform generates second configuration data based on the first configuration data and the adjustment information, and determines that the second configuration data is the target configuration data; the service platform sends the second configuration data to the gateway to instruct the gateway to determine that the second configuration data is the target configuration data.

[0103] If the user does not perform any adjustment operation on the first configuration data in the user interface (for example, the user platform displays the first configuration data and then starts a countdown, and the user does not perform any adjustment operation on the first configuration data when the countdown ends), the service platform cannot receive the adjustment information.

[0104] If the service platform determines that there is no adjustment information corresponding to the first configuration data, the service platform determines that the first configuration data is the target configuration data; the service platform sends a preset instruction or the first configuration data to the gateway to instruct the gateway to determine that the first configuration data is the target configuration data.

[0105] The service platform may transmit the first configuration data back to the gateway so that the gateway determines the first configuration data as the target configuration data. The preset instruction may be used to instruct the gateway to determine the first configuration data as the target configuration data. When the user does not perform any adjustment operation on the first configuration data, the first configuration data saved by the service platform and the gateway are consistent. The gateway may be instructed to determine the target configuration data by sending instructions instead of configuration data, which can reduce the amount of data transmission between the service platform and the gateway when determining the target configuration data, and improve the efficiency of the gateway in determining the target configuration data.

[0106] In an optional embodiment of the present application, before step 301, the method further includes:

[0107] In response to receiving the network access request sent by the sub-device, confirming that the sub-device joins the network where the gateway is located.

[0108] and Figure 2 The network access process shown is different. In the embodiment of the present application, after the sub-device to be adapted sends a network access request to the gateway, when the gateway receives the network access request of the sub-device, in order to obtain the first configuration data, the gateway will directly allow the sub-device to join the network where the gateway is located.

[0109] In an optional embodiment of the present application, step 301 may include: reading the general attribute information of the sub-device corresponding to the preset protocol according to the preset protocol rule information; calling the preset packet capture component to obtain the private attribute information of the sub-device corresponding to the preset protocol; and generating the first configuration data based on the general attribute information and the private attribute information.

[0110] The gateway and the sub-device respectively store protocol libraries (eg, Zifeng 3.0 protocol library), and the gateway can read the general attribute information of the sub-device according to the protocol rules in the protocol library.

[0111] The gateway cannot directly obtain private attribute information according to the protocol rules. The gateway is provided with a packet capture component, through which the private attribute information of the sub-device is obtained. After obtaining the general attribute information and private attribute information of the sub-device, the gateway can combine the general attribute information and the private attribute information to generate the first configuration data.

[0112] In an optional embodiment of the present application, calling the preset packet capture component to obtain private attribute information of the sub-device corresponding to the preset protocol includes: calling the preset packet capture component to obtain the interaction message between the sub-device and the preset protocol; extracting the private attribute information corresponding to the preset protocol based on the interaction message.

[0113] The gateway can call the packet capture component to capture the interaction message of the wireless signal of the sub-device, and read the private attribute information corresponding to the preset protocol contained in the interaction.

[0114] As an example, the packet capture component includes a built-in electronic packet capturer and / or a packet capture program.

[0115] The following further describes the embodiments of the present application with different examples. Figure 4 , shows an Internet of Things framework provided by an embodiment of the present application, including:

[0116] Zigbee protocol stack parser: standard Zigbee3.0 open source protocol stack, processing all Zigbee data messages and command messages. The collection of all data messages and command messages constitutes the content of the object model.

[0117] Gateway configuration acquisition module: Filters out common attribute information, private attribute information and communication parameters from the data and commands accessed by the parser, and generates configuration information based on the attribute information and private attribute information.

[0118] Gateway JSON encoder: encodes the configuration information and communication parameters processed and output by the general module into JSON messages according to the platform protocol and transmits them to the platform via MQTT.

[0119] Platform JSON parser: The platform receives 331JSON messages (product registration messages) from the gateway through MQTT subscription, parses the communication parameters and configuration information of the sub-devices, and transmits them to the WEB interface in XML format.

[0120] WEB interface (user interface): displays the communication parameters and point configuration parameters in XML format transmitted by the platform, and supports users to modify, adjust and save. If the modification is not made within a timeout period, the communication parameters and point configuration parameters in XML format will be automatically output to the platform.

[0121] Platform JSON encoder: converts the communication parameters and point configuration parameters in the complete XML format into a configuration file in JSON format, and uses the file to generate a platform object model. At the same time, it is sent to the Zigbee gateway in the form of a message, and the Zigbee gateway uses the message to generate a gateway object model.

[0122] The following is an example to further explain the process of adapting Zifeng sub-device to Zifeng network. Figure 5 , shows a sub-device adaptation flow chart provided in an embodiment of the present application, including the following steps:

[0123] 501. The user clicks on "add sub-device" in the user interface provided by the service platform.

[0124] 502, the service platform sends a network access permission instruction to the gateway.

[0125] 503, the sub-device sends a network access request to the gateway.

[0126] 504. The gateway performs network access confirmation on the sub-device, so that the sub-device successfully accesses the network.

[0127] 505, the gateway uses standard Zifeng 3.0 protocol rules to read common attribute information.

[0128] 506. The gateway activates a packet capturer built into the gateway to capture all interaction messages of the Zifeng wireless signal, the interaction messages including private attributes, and converts the private attribute message data into private attribute information.

[0129] 507 , the gateway combines the general attribute information and the private attribute information to generate configuration file 1 (first configuration data).

[0130] 508, the gateway reports the product registration message to the service platform, and transmits the "configuration file 1" to the service platform in JSON message format.

[0131] 509, the platform parses the common attributes and prompts the user through the user interface whether it is necessary to enter additional private attribute information.

[0132] 510, the user interface displays complete configuration data (for example, including: a list of manufacturer model data points of the device, the type of each data point, the data value range, data transmission parameters, and control method), leaving the missing parts blank, and the user chooses whether manual entry is required.

[0133] 511, if the user modifies the configuration data, "configuration file 2" (second configuration data) is generated.

[0134] 512, send "configuration file 2" to the gateway or send an instruction not to modify the configuration file. The gateway and the service platform use the same configuration file to build the object model.

[0135] 513, the service platform responds to the user operation and confirms adding the device.

[0136] 514, the service platform sends a command to the gateway to add a device to the network.

[0137] 515, the gateway and the sub-device perform networking interaction.

[0138] 516, Sub-device adaptation is successful.

[0139] After the sub-device is successfully adapted, you can also perform the following steps:

[0140] 517, the gateway reports the device online status (online or offline) to the platform.

[0141] 518, displaying the online status of the device on the user interface.

[0142] 519, responding to the user operation, sending a control instruction to the gateway.

[0143] 520, the gateway sends the control instruction to the sub-device.

[0144] 521, the sub-device sends the control result to the gateway.

[0145] 522. The gateway sends the control result to the service platform so that the control result is displayed in the user interface.

[0146] Reference Figure 6 , shows a schematic diagram of another sub-device adaptation method provided by an embodiment of the present application. The embodiment of the present application can be applied to a service platform, and the gateway is used to obtain first configuration data of the sub-device; the first configuration data includes general attribute information and private attribute information corresponding to a preset protocol; the embodiment of the present application may specifically include the following steps:

[0147] 601, receiving the first configuration data sent by the gateway;

[0148] 602, determining target configuration data based on the first configuration data; the target configuration data is one of the first configuration data and second configuration data different from the first configuration data;

[0149] 603, generating a platform object model matching the target configuration data;

[0150] The gateway is used to generate a gateway object model matching the target configuration data;

[0151] Step 604: Adapt the sub-device using the gateway object model.

[0152] In an optional embodiment of the present application, the method further includes:

[0153] If there is adjustment information corresponding to the first configuration data, generating second configuration data according to the first configuration data and the adjustment information, and determining the second configuration data as the target configuration data;

[0154] The second configuration data is sent to the gateway to instruct the gateway to determine that the second configuration data is the target configuration data.

[0155] In an optional embodiment of the present application, the method further includes:

[0156] If there is no adjustment information corresponding to the first configuration data, determining that the first configuration data is the target configuration data;

[0157] A preset instruction or the first configuration data is sent to the gateway to instruct the gateway to determine that the first configuration data is the target configuration data.

[0158] It should be noted that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0159] Reference Figure 7 , showing a schematic diagram of a sub-device adaptation device provided in an embodiment of the present application, the embodiment of the present application is applied to a gateway, and the gateway is communicatively connected with a service platform. The embodiment of the present application may specifically include a first configuration data acquisition module 701, a first configuration data sending module 702, and a gateway object model generation module 702, wherein:

[0160] A first configuration data acquisition module 701 is used to acquire first configuration data of a sub-device; the first configuration data includes general attribute information and private attribute information corresponding to a preset protocol;

[0161] A first configuration data sending module 702 is used to send the first configuration data to the service platform; the service platform is used to determine target configuration data based on the first configuration data; the target configuration data is one of the first configuration data and second configuration data different from the first configuration data;

[0162] The gateway object model generation module 703 is used to generate a gateway object model matching the target configuration data; the service platform is used to generate a platform object model matching the target configuration data;

[0163] The gateway adaptation module 704 is used to adapt the sub-device using the gateway object model.

[0164] In an optional embodiment of the present application, the device further includes:

[0165] The network access module is used to confirm that the sub-device joins the network where the gateway is located in response to receiving the network access request sent by the sub-device.

[0166] In an optional embodiment of the present application, the first configuration data acquisition module 701 includes:

[0167] A general attribute information reading submodule, used to read the general attribute information of the sub-device corresponding to the preset protocol according to the preset protocol rule information;

[0168] A private attribute information reading submodule, used for calling a preset packet capture component to obtain private attribute information of the sub-device corresponding to a preset protocol;

[0169] The first configuration data generating submodule is used to generate first configuration data according to the general attribute information and the private attribute information.

[0170] In an optional embodiment of the present application, the private attribute information reading submodule includes:

[0171] An interactive message reading unit, used for calling a preset packet capture component to obtain interactive messages between the sub-device;

[0172] The private attribute information reading unit is used to extract the private attribute information corresponding to the preset protocol according to the interactive message.

[0173] Reference Figure 8 , shows a schematic diagram of a sub-device adaptation device provided by an embodiment of the present application, the embodiment of the present application is applied to a service platform, the service platform is connected to a gateway for communication, the gateway is used to obtain first configuration data of the sub-device; the first configuration data includes general attribute information and private attribute information corresponding to a preset protocol; the embodiment of the present application may specifically include a first configuration data receiving module 801, a target configuration data determining module 802, and a platform object model generating module 803, wherein:

[0174] A first configuration data receiving module 801, configured to receive the first configuration data sent by the gateway;

[0175] A target configuration data determination module 802 is configured to determine target configuration data based on the first configuration data; the target configuration data is one of the first configuration data and second configuration data different from the first configuration data;

[0176] The platform object model generation module 803 is used to generate a platform object model matching the target configuration data; the gateway is used to generate a gateway object model matching the target configuration data;

[0177] The platform adaptation module 804 is used to adapt the sub-device using the platform object model.

[0178] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment part.

[0179] In an optional embodiment of the present application, the device further includes:

[0180] a second configuration data generating module, configured to generate second configuration data according to the first configuration data and the adjustment information if there is adjustment information corresponding to the first configuration data, and determine that the second configuration data is the target configuration data;

[0181] The second configuration data sending module is used to send the second configuration data to the gateway to instruct the gateway to determine the second configuration data as the target configuration data.

[0182] In an optional embodiment of the present application, the device further includes:

[0183] A first configuration data determining module, configured to determine that the first configuration data is the target configuration data if there is no adjustment information corresponding to the first configuration data;

[0184] The target configuration data indicating module is used to send a preset instruction or the first configuration data to the gateway to instruct the gateway to determine the first configuration data as the target configuration data.

[0185] Reference Fig. 9 , shows a schematic diagram of an Internet of Things system provided by an embodiment of the present application, and the embodiment of the present application includes: a gateway 901 and a service platform 902;

[0186] The gateway 901 obtains first configuration data of the sub-device; the first configuration data includes general attribute information and private attribute information corresponding to the preset protocol;

[0187] The gateway 901 sends the first configuration data to the service platform 902;

[0188] The service platform 902 receives the first configuration data sent by the gateway 901;

[0189] The service platform 902 determines target configuration data based on the first configuration data; the target configuration data is one of the first configuration data and second configuration data different from the first configuration data;

[0190] The service platform 902 generates a platform 902 physical model matching the target configuration data;

[0191] The gateway 901 generates a gateway 901 physical model matching the target configuration data;

[0192] The gateway 901 uses the gateway object model to adapt the sub-device;

[0193] The service platform 902 adapts the sub-device using the platform object model.

[0194] Reference Fig.10 , shows a schematic diagram of an electronic device provided by an embodiment of the present application. Fig.10 As shown, the electronic device 1000 in the embodiment of the present application includes: a processor 1010, a memory 1020, and a computer program 1021 stored in the memory 1020 and executable on the processor 1010. When the processor 1010 executes the computer program 1021, the steps in each embodiment of the above-mentioned sub-device adaptation method are implemented, for example Figure 3 Steps 301 to 304 shown, or Figure 6 In steps 601 to 604 shown, the processor 1010 implements the functions of each module / unit in the above-mentioned device embodiments when executing the computer program 1021, for example Figure 7 The functions of the modules 701 to 704 shown, or Figure 8 Functions of modules 801 to 804 are shown.

[0195] Exemplarily, the computer program 1021 may be divided into one or more modules / units, which are stored in the memory 1020 and executed by the processor 1010 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which may be used to describe the execution process of the computer program 1021 in the electronic device 1000.

[0196] The electronic device 1000 may include, but is not limited to, a processor 1010 and a memory 1020. Those skilled in the art will appreciate that Fig.10It is only an example of the electronic device 1000 and does not constitute a limitation of the electronic device 1000. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 1000 may also include input and output devices, network access devices, buses, etc.

[0197] The processor 1010 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0198] The memory 1020 may be an internal storage unit of the electronic device 1000, such as a hard disk or memory of the electronic device 1000. The memory 1020 may also be an external storage device of the electronic device 1000, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1000. Further, the memory 1020 may also include both an internal storage unit of the electronic device 1000 and an external storage device. The memory 1020 is used to store the computer program 1021 and other programs and data required by the electronic device 1000. The memory 1020 may also be used to temporarily store data that has been output or is to be output.

[0199] The embodiment of the present application further discloses a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the sub-device adaptation method as described in the above-mentioned embodiments is implemented.

[0200] The embodiment of the present application further discloses a computer program product, including a computer program. When the computer program is executed, the sub-device adaptation method described in the above embodiments is executed.

[0201] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application is described in detail with reference to the above-mentioned embodiments, a person skilled in the art should understand that the technical solutions described in the above-mentioned embodiments can still be modified, or some of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A sub-device adaptation method, characterized in that: Applied to a gateway, the gateway is communicatively connected with a service platform, the method comprises: Acquire first configuration data of the sub-device; the first configuration data includes general attribute information and private attribute information corresponding to the preset protocol; sending the first configuration data to the service platform; the service platform is used to determine target configuration data based on the first configuration data; the target configuration data is one of the first configuration data and second configuration data different from the first configuration data; Generating a gateway object model matching the target configuration data; The gateway object model is used to adapt the sub-device.

2. The method according to claim 1, characterized in that: Before acquiring the first configuration data of the sub-device, the method further includes: In response to receiving the network access request sent by the sub-device, confirming that the sub-device joins the network where the gateway is located.

3. The method according to claim 1 or 2, characterized in that: The obtaining of first configuration data of the sub-device includes: Reading the general attribute information of the sub-device corresponding to the preset protocol according to the preset protocol rule information; Calling a preset packet capture component to obtain private attribute information of the sub-device corresponding to the preset protocol; The first configuration data is generated according to the general attribute information and the private attribute information.

4. The method according to claim 3, characterized in that The calling of the preset packet capture component to obtain the private attribute information of the sub-device corresponding to the preset protocol includes: Calling the preset packet capture component to obtain the interaction message between the sub-device; Extract private attribute information corresponding to the preset protocol according to the interaction message.

5. A sub-device adaptation method, characterized in that: Applied to a service platform, the service platform is in communication connection with a gateway, the gateway is used to obtain first configuration data of a sub-device; The first configuration data includes general attribute information and private attribute information corresponding to the preset protocol; the method includes: receiving the first configuration data sent by the gateway; Determine target configuration data based on the first configuration data; the target configuration data is one of the first configuration data and second configuration data different from the first configuration data; generating a platform object model matching the target configuration data; The platform object model is used to adapt the sub-device.

6. The method according to claim 5, characterized in that The method further comprises: If there is adjustment information corresponding to the first configuration data, generating second configuration data according to the first configuration data and the adjustment information, and determining the second configuration data as the target configuration data; The second configuration data is sent to the gateway to instruct the gateway to determine that the second configuration data is the target configuration data.

7. The method according to claim 5 or 6, characterized in that: The method further comprises: If there is no adjustment information corresponding to the first configuration data, determining that the first configuration data is the target configuration data; A preset instruction or the first configuration data is sent to the gateway to instruct the gateway to determine that the first configuration data is the target configuration data.

8. A sub-device adaptation device, characterized in that: Applied to a gateway, the gateway is communicatively connected with a service platform, and the device comprises: A first configuration data acquisition module, used to acquire first configuration data of a sub-device; the first configuration data includes general attribute information and private attribute information corresponding to a preset protocol; A first configuration data sending module, used to send the first configuration data to the service platform; the service platform is used to determine target configuration data based on the first configuration data; the target configuration data is one of the first configuration data and second configuration data different from the first configuration data; A gateway object model generation module, used to generate a gateway object model matching the target configuration data; The gateway adaptation module is used to adapt the sub-device using the gateway object model.

9. A sub-device adaptation device, characterized in that: Applied to a service platform, the service platform is connected to a gateway for communication, the gateway is used to obtain first configuration data of a sub-device; the first configuration data includes general attribute information and private attribute information corresponding to a preset protocol; the device includes: A first configuration data receiving module, used for receiving the first configuration data sent by the gateway; a target configuration data determination module, configured to determine target configuration data based on the first configuration data; the target configuration data being one of the first configuration data and second configuration data different from the first configuration data; A platform object model generation module, used to generate a platform object model matching the target configuration data; The platform adaptation module is used to adapt the sub-device using the platform object model.

10. An Internet of Things system, characterized in that: The system includes: a gateway and a service platform; The gateway acquires first configuration data of the sub-device; the first configuration data includes general attribute information and private attribute information corresponding to the preset protocol; The gateway sends the first configuration data to the service platform; The service platform receives the first configuration data sent by the gateway; The service platform determines target configuration data based on the first configuration data; the target configuration data is one of the first configuration data and second configuration data different from the first configuration data; The service platform generates a platform object model matching the target configuration data; The gateway generates a gateway object model matching the target configuration data; The gateway adapts the sub-device using the gateway object model; The service platform adapts the sub-device using the platform object model.

Citation Information

Cited By

  • Access method and device of Internet of Things equipment and Internet of Things system

    CN121037429A