Equipment connection management method and device, equipment, medium and program product

By creating object model component processes and user task threads after the IoT device is started, analyzing and publishing object model definition data to the cloud platform, the problem of difficulty and long cycle of IoT device access development is solved, and the simplification and efficiency of device access is achieved.

CN119996484APending Publication Date: 2025-05-13HONGHU WANLIAN (JIANGSU) TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510223265.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The cost of access and development of existing IoT devices is high and time-consuming, and the open source Hongmeng system does not support material model solutions, resulting in high difficulty and long cycle access of equipment.

Method used

After the IoT device is started, the object model component process is created, and the process is connected to the cloud platform and started user services; the user task thread is created, the object model definition file is read from the persistent storage, the object model definition data is parsed, and the data is written to the temporary storage through function calls and published to the cloud platform, so that the cloud platform can generate the corresponding object model.

Benefits of technology

It reduces the difficulty of developing IoT device access, shortens the development cycle, solves the coupling problem between object model components and other processes, and realizes the reuse of object model components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996484A_ABST
    Figure CN119996484A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Internet of Things, and discloses an equipment connection management method and device, equipment, a medium and a program product. The method comprises the following steps: after the Internet of Things equipment is started, creating a physical model component process, and accessing a cloud platform and starting a user service through the physical model component process; creating a first user task thread, reading the current object model definition file from the persistent storage through the first user task thread, and analyzing the current object model definition file to obtain current object model definition data; a function calling mode is adopted by a physical model component process, current physical model definition data is written into temporary storage, and the current physical model definition data is published to a model report theme so as to be sent to a cloud platform, so that the problem of coupling between a physical model component and other processes can be solved, and the user experience is improved. Therefore, multiplexing of the object model component can be realized, the development difficulty of access of the Internet of Things equipment can be reduced, and the development period can be shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things, and in particular to a device connection management method, apparatus, equipment, medium and program product. Background Art

[0002] There are many different IoT devices on the market, and different devices have different standards. The development cost of device access is high and the time is long.

[0003] At present, the open source Hongmeng system has just emerged and does not support the physical model solution. When it needs to connect to other terminal devices, such as sensor devices, control devices, etc., it needs to be customized for each device. Due to the differences in device software and hardware interfaces, the development is difficult and the development cycle is long. Summary of the invention

[0004] The present invention provides a device connection management method, apparatus, equipment, medium and program product, which can reduce the development difficulty of Internet of Things device access and shorten the development cycle.

[0005] According to one aspect of the present invention, there is provided a device connection management method, comprising:

[0006] After the IoT device is started, a physical model component process is created, and the cloud platform is connected and user services are started through the physical model component process;

[0007] Creating a first user task thread, and reading a current object model definition file from persistent storage through the first user task thread, parsing the current object model definition file, and obtaining current object model definition data;

[0008] The object model component process uses a function call method to write the current object model definition data into temporary storage, and publish the current object model definition data to the model reporting topic to send the current object model definition data to the cloud platform, so that the cloud platform generates a object model corresponding to the Internet of Things device according to the current object model definition data.

[0009] According to another aspect of the present invention, there is provided a device connection management apparatus, comprising:

[0010] A process creation module is used to create a thing model component process after the IoT device is started, and access the cloud platform and start user services through the thing model component process;

[0011] A file parsing module, used to create a first user task thread, and read a current object model definition file from a persistent storage through the first user task thread, and parse the current object model definition file to obtain current object model definition data;

[0012] The data publishing module is used to write the current object model definition data into temporary storage by using a function call through the object model component process, and publish the current object model definition data to the model reporting topic to send the current object model definition data to the cloud platform, so that the cloud platform generates a object model corresponding to the Internet of Things device according to the current object model definition data.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the device connection management method described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program is used to enable a processor to implement the device connection management method described in any embodiment of the present invention when executed.

[0018] According to another aspect of the present invention, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the device connection management method according to any embodiment of the present invention is implemented.

[0019] The technical solution of the embodiment of the present invention is as follows: after the Internet of Things device is started, a physical model component process is created, and the cloud platform is connected and user services are started through the physical model component process; a first user task thread is created, and through the first user task thread, the current physical model definition file is read from the persistent storage, and the current physical model definition file is parsed to obtain the current physical model definition data; the current physical model definition data is written to the temporary storage by the physical model component process using a function call method, and the current physical model definition data is published to the model reporting topic to send the current physical model definition data to the cloud platform, so that the cloud platform generates a physical model corresponding to the Internet of Things device according to the current physical model definition data. By running the physical model component as an independent process, the coupling problem between the physical model component and other processes can be solved, the reuse of the physical model component can be realized, the development difficulty of the Internet of Things device access can be reduced, and the development cycle can be shortened.

[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0022] Figure 1 is a flow chart of a device connection management method provided according to Embodiment 1 of the present invention;

[0023] Figure 2 It is a schematic diagram of the existing IoT connection solution based on the object model;

[0024] Figure 3 is a schematic diagram of a physical model component architecture provided according to Embodiment 1 of the present invention;

[0025] Figure 4 is a flow chart of a device connection management method provided according to Embodiment 2 of the present invention;

[0026] Figure 5 is a flowchart of another device connection management method provided according to Embodiment 2 of the present invention;

[0027] Figure 6 is a structural diagram of a device connection management apparatus provided according to Embodiment 3 of the present invention;

[0028] Figure 7 It is a structural schematic diagram of an electronic device for implementing the device connection management method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0030] It should be noted that the terms "first", "second", "target", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] Embodiment 1

[0032] Figure 1 A flow chart of a device connection management method is provided for the first embodiment of the present invention. This embodiment is applicable to the case where access management of IoT devices is implemented based on the physical model solution in the open source Hongmeng system. The method can be executed by a device connection management device, which can be implemented in the form of hardware and / or software. Typically, the device connection management device can be configured in an electronic device, such as a sensor device, a control device, or other IoT device. Figure 1 As shown, the method includes:

[0033] S110: After the IoT device is started, a thing model component process is created, and the cloud platform is connected and user services are started through the thing model component process.

[0034] Among them, the IoT devices may have different software or hardware interfaces, and this embodiment may not specifically limit the type of IoT devices. It should be noted that the existing IoT connection solutions based on the object model can be as follows: Figure 2 As shown, first, create a physical model instance. Create a physical model instance on the server to instantiate the device; then, create the device, create a model that conforms to the terminal device, and define the device form (such as access method, function description, etc.); secondly, obtain connection information, view the connection information, including server information, access key, etc.; further, connect and send and receive messages. The device side connects to the server according to the connection information obtained in the previous step and interacts with the server for data; finally, transfer the message flow to the business server. After the background obtains the device data, it is forwarded to the front end for processing.

[0035] However, in the prior art, IoT devices must first be registered on the cloud platform, and the device cannot publish the object model definition, which is not convenient for large-scale deployment, and the development is difficult and not convenient for subsequent expansion of devices. Figure 3The physical model component architecture shown includes: samgr (System Ability Manager) service framework, which is used to create the system capability service ObjectModelService (physical model service), which runs in an independent process to solve the coupling problem between the physical model component and other processes; the device access component, which is used to provide the device access capability of the cloud platform; the physical model framework, which is used to provide the device physical model capability and connect the data transmission between the cloud platform and the device business data; the user business component, which is used to realize the device business functions, such as temperature and humidity sensor data collection, switch control, etc.

[0036] Specifically, after the IoT device is started, the object model service can be started. For example, the object model service can be registered to the system samgr service framework, and samgr manages and schedules the object model service to create the object model component process. Then, the IoT device can be connected to the cloud platform through the MQTT (Message Queuing Telemetry Transport) protocol, and user services can be started. Among them, the MQTT protocol is a client-server based message publishing / subscription transmission protocol. The message sender publishes the message to be sent to the corresponding topic TOPIC, and the message receiver receives the message by subscribing to the corresponding topic.

[0037] Optionally, starting a user service through the object model component process may include:

[0038] The user business dynamic library is loaded through the object model component process, and the user business function pointer is obtained, and a message publishing interface is registered to the user business. The message publishing interface is called when the user business actively publishes a message to the cloud platform.

[0039] Specifically, when starting the user service, the user service is designed as an independent thread and packaged as an independent dynamic library, which is then loaded into the object model component process. The object model component is a framework for implementing the entire object model function. It serves as a bridge between the cloud platform and the user service, receives commands from the cloud platform, forwards them to the user service, or passes the user service data to the cloud platform. Secondly, the object model component and the user service use the form of function callbacks to transmit information. Typically, the object model component process can make the corresponding user service function effective by calling the corresponding user service function pointer. For example, the user service function pointer may include the object model definition acquisition function pointer funcGetDeviceModelPtr, the object model definition modification function pointer funcModifyModel DefineFile, etc.

[0040] Optionally, after accessing the cloud platform and starting the user service through the object model component process, the following may also be included:

[0041] Create a second user task thread, collect IoT device data through the second user task thread, and write the IoT device data to persistent storage;

[0042] The publishing message interface is called through the second user task thread to send the IoT device data to the cloud platform through the object model component process.

[0043] In this embodiment, a user task thread can be specially established to process user business data, that is, IoT device data. For example, if the IoT device is a temperature and humidity sensor, the temperature and humidity sensor data can be collected regularly in the second user task thread, and the collected data can be stored in a specified buffer. After that, the pre-registered publishing message interface can be called to send the temperature and humidity sensor data to the cloud platform through the object model component process.

[0044] The advantage of the above setting is that it can achieve decoupling between user business data processing and object model components, which can reduce the difficulty of device expansion.

[0045] S120: Create a first user task thread, and read a current object model definition file from persistent storage through the first user task thread, and parse the current object model definition file to obtain current object model definition data.

[0046] In this embodiment, a first user task thread can be established to process tasks related to the object model. Specifically, the first user task thread reads the current object model definition file model_define.json from the persistent storage, and parses the current object model definition file to obtain the current object model definition data. Among them, the object model definition file can be a file used to describe the function of the device, and can be in JSON (JavaScript Object Notation, JS key-value pair data) format. For example, the file format can be {"device function description":{"device attribute set":[],"device command set":[],"device event set":[],"protocol type":""},"object model version number":"1.0.0"}. The object model definition file can be filled in by the user according to the actual product function and preset in the device specified directory. Among them, the object model definition data can be in a table format, and can include multiple parameter items and corresponding parameter values.

[0047] Optionally, after parsing the current object model definition file, you can first determine whether the parsing result complies with the preset object model template rules. If so, the parsing result is determined as the object model definition data; if it is determined that it does not comply with the preset object model template rules, the parsing result can be discarded and an abnormal alarm can be issued.

[0048] It should be noted that, in the present embodiment, if the object model definition needs to be modified, only the new object model definition file needs to be replaced when the device is powered on. When the first user task thread detects a file change, it will automatically parse the new object model definition file to obtain the updated object model definition data.

[0049] S130. Using a function call method through the object model component process, the current object model definition data is written into temporary storage, and the current object model definition data is published to the model reporting topic, so as to send the current object model definition data to the cloud platform, so that the cloud platform generates an object model corresponding to the Internet of Things device according to the current object model definition data.

[0050] Specifically, the object model component process can obtain the current object model definition data by calling the object model definition acquisition function pointer funcGetDeviceModelPtr, and publish the current object model definition data to the model reporting topic to send the current object model definition data to the cloud platform. After receiving the current object model definition data, the cloud platform can model the IoT device based on the current object model definition data to obtain the object model corresponding to the IoT device. Later, the cloud platform can process the user business data reported by the IoT device according to the object model.

[0051] The technical solution of the embodiment of the present invention is as follows: after the Internet of Things device is started, a physical model component process is created, and the cloud platform is connected and user services are started through the physical model component process; a first user task thread is created, and through the first user task thread, the current physical model definition file is read from the persistent storage, and the current physical model definition file is parsed to obtain the current physical model definition data; the current physical model definition data is written to the temporary storage by the physical model component process using a function call method, and the current physical model definition data is published to the model reporting topic to send the current physical model definition data to the cloud platform, so that the cloud platform generates a physical model corresponding to the Internet of Things device according to the current physical model definition data. By running the physical model component as an independent process, the coupling problem between the physical model component and other processes can be solved, the reuse of the physical model component can be realized, the development difficulty of the Internet of Things device access can be reduced, and the development cycle can be shortened.

[0052] Embodiment 2

[0053] Figure 4 This is a flow chart of a device connection management method provided in Embodiment 2 of the present invention. This embodiment is a further refinement of the above technical solution. The technical solution in this embodiment can be combined with one or more of the above implementations. Figure 4 As shown, the method includes:

[0054] S210: After the IoT device is started, a thing model component process is created, and the cloud platform is accessed and user services are started through the thing model component process.

[0055] S220: Create a first user task thread, and read a current object model definition file from persistent storage through the first user task thread, and parse the current object model definition file to obtain current object model definition data.

[0056] S230: Write the current object model definition data into persistent storage.

[0057] Specifically, after acquiring the current object model definition data, the first user task thread may write the current object model definition data into a designated directory of a persistent storage (such as a hard disk).

[0058] S240: Read the current object model definition data from persistent storage by using a function call method through the object model component process, and write the current object model definition data into temporary storage.

[0059] Correspondingly, the object model component process can call funcGetDeviceModelPtr to first read the current object model definition data from the specified directory of the persistent storage, and then write the current object model definition data to a temporary storage, such as a shared memory.

[0060] S250. Publishing the current object model definition data to a model reporting topic to send the current object model definition data to a cloud platform, so that the cloud platform generates an object model corresponding to the IoT device according to the current object model definition data.

[0061] S260. Subscribe to the model adjustment topic of the cloud platform through the object model component process. If the first updated object model definition data of the cloud platform is detected according to the model adjustment topic, replace the current object model definition data in the temporary storage with the first updated object model definition data.

[0062] In this embodiment, after receiving the object model definition data, the cloud platform can remotely modify the object model definition data. Specifically, the cloud platform can obtain the first updated object model definition data according to the user's editing operation on the current object model definition data, and publish the first updated object model definition data to the model adjustment topic. The object model component process is configured to pre-subscribe to the model adjustment topic, and once the first updated object model definition data of the cloud platform is detected, the current object model definition data in the temporary storage can be replaced with the first updated object model definition data.

[0063] S270: Using a function call method through the object model component process, the first user task thread reads the first updated object model definition data from temporary storage, and replaces the current object model definition data in persistent storage with the first updated object model definition data.

[0064] Furthermore, the object model component process can call the object model definition modification function pointer funcModifyModelDefineFile, at which time the first user task thread can read the first updated object model definition data from the temporary storage, and replace the current object model definition data in the persistent storage with the first updated object model definition data to realize the object model definition modification.

[0065] S280. Generate a first updated object model definition file according to the first updated object model definition data through the first user task thread, and replace the current object model definition file in the persistent storage with the first updated object model definition file.

[0066] Finally, the first user task thread can generate a first updated object model definition file based on the first updated object model definition data and the preset file format of the object model definition file, and replace the current object model definition file in the persistent storage with the first updated object model definition file to achieve synchronous modification of the object model definition file.

[0067] The technical solution of the embodiment of the present invention is to subscribe to the model adjustment topic of the cloud platform through the object model component process. If the first updated object model definition data of the cloud platform is detected according to the model adjustment topic, the current object model definition data in the temporary storage is replaced with the first updated object model definition data; the object model component process adopts a function call method to enable the first user task thread to read the first updated object model definition data from the temporary storage, and replace the current object model definition data in the persistent storage with the first updated object model definition data; through the first user task thread, according to the first updated object model definition data, a first updated object model definition file is generated, and the current object model definition file in the persistent storage is replaced with the first updated object model definition file, which supports cloud platform users to remotely adjust the object model definition without making any modifications to the object model component, and can save the workload of on-site construction in specific scenarios.

[0068] In an optional implementation of this embodiment, the technical solution of this embodiment may further include:

[0069] When the first user task thread detects that a business function update exists, the updated business function is obtained, and a second updated object model definition file is generated according to the updated business function;

[0070] Replacing the current object model definition file in the persistent storage with the second updated object model definition file through the first user task thread, and parsing the second updated object model definition file to obtain second updated object model definition data;

[0071] Replacing the current object model definition data in persistent storage with the second updated object model definition data through the first user task thread;

[0072] Reading the second updated object model definition data from persistent storage by the object model component process in a function call manner, and replacing the current object model definition data in temporary storage with the second updated object model definition data;

[0073] The second updated object model definition data is sent to the cloud platform through the object model component process, so that the cloud platform generates a object model corresponding to the Internet of Things device according to the second updated object model definition data.

[0074] In this embodiment, if the physical module (for example, interface, etc.) of the IoT device is replaced or upgraded, the object model definition needs to be modified, and the device side needs to initiate an update of the object model definition. Specifically, when a user's business function editing operation is detected, it can be determined that there is a business function update, and the updated business function can be obtained based on the user's business function editing operation. Then, the user's business dynamic library can be updated based on the updated business function, and the current object model definition file can be updated, for example, the device function description content can be modified, etc., to obtain a second updated object model definition file. Furthermore, the first user task thread can use the second updated object model definition file to replace the current object model definition file, and parse the second updated object model definition file based on the preset file format of the object model definition file to obtain the second updated object model definition data.

[0075] Afterwards, a function call can be used to have the object model component process use the second updated object model definition data to replace the current object model definition data in temporary storage, and publish the second updated object model definition data to the model reporting topic to send the second updated object model definition data to the cloud platform.

[0076] The advantage of the above setting is that there is no need to modify the object model component code, which facilitates the functional expansion of IoT devices.

[0077] In a specific implementation of this embodiment, the process of the device connection management method can be as follows: Figure 5 As shown. First, the object model component process starts the object model service, connects to the cloud platform and starts the user business; then, two user task threads are created. The first user task thread is used to parse the object model definition file model_define.json and fill the parsing result into modelDefine to obtain the object model definition data. The second user task thread is used to process the user business data; further, the object model component process calls funcGetDeviceModelPtr to obtain the object model definition data and reports it to the cloud platform through the specified TOPIC.

[0078] Secondly, after receiving the object model definition data, the cloud platform can modify it remotely, and send the first updated object model definition data to the object model component process by specifying TOPIC, and the object model component process uses function calls to synchronize the first updated object model definition data to the user business. After receiving the first updated object model definition data, the first user task thread modifies the original object model definition data and synchronizes the modification to the object model definition file. Finally, if the IoT device has a new device function, the first user task thread modifies the business function and the object model definition file, and synchronizes the modification to the temporary storage and cloud platform through the object model component process.

[0079] In this embodiment, dynamic resetting of the object model configuration is supported, and the object model configuration is checked regularly to see if it has changed. If it has changed, the new configuration is reloaded and takes effect. Secondly, business data is processed in an independent user thread, and data interaction with the object model component is implemented in the form of a callback function. The object model component is a fixed framework. When a device needs to add new business functions, only the user business part needs to be modified, and the object model component does not need to be modified. This reduces the difficulty of large-scale deployment of IoT devices and the difficulty of device access development, making it easier to expand the device in the future. Finally, the object model component is an independent process, and the user business is loaded as a thread onto the object model component process. The user business is open to third-party developers as a software development kit, which can achieve rapid development based on product functions and save development time.

[0080] Embodiment 3

[0081] Figure 6 This is a schematic diagram of the structure of a device connection management apparatus provided by Embodiment 3 of the present invention. Figure 6 As shown, the device includes: a process creation module 310, a file parsing module 320 and a data publishing module 330; wherein,

[0082] The process creation module 310 is used to create a thing model component process after the IoT device is started, and access the cloud platform and start user services through the thing model component process;

[0083] A file parsing module 320 is used to create a first user task thread, and read a current object model definition file from a persistent storage through the first user task thread, and parse the current object model definition file to obtain current object model definition data;

[0084] The data publishing module 330 is used to write the current object model definition data into temporary storage by using a function call through the object model component process, and publish the current object model definition data to the model reporting topic to send the current object model definition data to the cloud platform, so that the cloud platform generates a object model corresponding to the Internet of Things device according to the current object model definition data.

[0085] The technical solution of the embodiment of the present invention is as follows: after the Internet of Things device is started, a physical model component process is created, and the cloud platform is connected and user services are started through the physical model component process; a first user task thread is created, and through the first user task thread, the current physical model definition file is read from the persistent storage, and the current physical model definition file is parsed to obtain the current physical model definition data; the current physical model definition data is written to the temporary storage by the physical model component process using a function call method, and the current physical model definition data is published to the model reporting topic to send the current physical model definition data to the cloud platform, so that the cloud platform generates a physical model corresponding to the Internet of Things device according to the current physical model definition data. By running the physical model component as an independent process, the coupling problem between the physical model component and other processes can be solved, the reuse of the physical model component can be realized, the development difficulty of the Internet of Things device access can be reduced, and the development cycle can be shortened.

[0086] Optionally, the file parsing module 320 is further configured to write the current object model definition data into persistent storage;

[0087] The data publishing module 330 is specifically used to read the current object model definition data from the persistent storage by using the function call method through the object model component process, and write the current object model definition data into the temporary storage.

[0088] Optionally, the device connection management device further includes:

[0089] a definition update module, configured to subscribe to a model adjustment topic of a cloud platform through the object model component process, and if first updated object model definition data of a cloud platform is detected according to the model adjustment topic, replace the current object model definition data in temporary storage with the first updated object model definition data;

[0090] A first definition data replacement module, configured to enable the first user task thread to read the first updated object model definition data from temporary storage by using a function call through the object model component process, and replace the current object model definition data in persistent storage with the first updated object model definition data;

[0091] The first definition file replacement module is used to generate a first updated object model definition file according to the first updated object model definition data through the first user task thread, and replace the current object model definition file in the persistent storage with the first updated object model definition file.

[0092] Optionally, the device connection management device further includes:

[0093] A business function update module, configured to obtain an updated business function when a business function update is detected through the first user task thread, and generate a second updated object model definition file according to the updated business function;

[0094] A second definition file replacement module, configured to replace the current object model definition file in the persistent storage with the second updated object model definition file through the first user task thread, and parse the second updated object model definition file to obtain second updated object model definition data;

[0095] A second definition data replacement module, configured to replace the current object model definition data in the persistent storage with the second updated object model definition data through the first user task thread;

[0096] a third definition data replacement module, configured to read the second updated object model definition data from persistent storage by using a function call through the object model component process, and replace the current object model definition data in temporary storage with the second updated object model definition data;

[0097] A definition data sending module is used to send the second updated object model definition data to the cloud platform through the object model component process, so that the cloud platform generates a object model corresponding to the Internet of Things device according to the second updated object model definition data.

[0098] Optionally, the process creation module 310 is specifically used to load the user business dynamic library through the object model component process, obtain the user business function pointer, and register the message publishing interface to the user business. The message publishing interface is called when the user business actively publishes a message to the cloud platform.

[0099] Optionally, the device connection management device further includes:

[0100] A device data collection module, used to create a second user task thread, collect IoT device data through the second user task thread, and write the IoT device data into persistent storage;

[0101] The device data sending module is used to call the publishing message interface through the second user task thread to send the Internet of Things device data to the cloud platform through the object model component process.

[0102] The device connection management apparatus provided in the embodiment of the present invention can execute the device connection management method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0103] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0104] Embodiment 4

[0105] Figure 7 A schematic diagram of the structure of an electronic device 40 that can be used to implement an embodiment of the present invention is shown. The electronic device 40 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device 40 can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0106] like Figure 7 As shown, the electronic device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory 42 or the computer program loaded from the storage unit 48 to the random access memory 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42 and the RAM 43 are connected to each other through a bus 44. The input / output (I / O) interface 45 is also connected to the bus 44.

[0107] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0108] The processor 41 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit, a graphics processing unit, various special artificial intelligence computing chips, various processors running machine learning model algorithms, digital signal processors, and any appropriate processors, controllers, microcontrollers, etc. The processor 41 executes the various methods and processes described above, such as the device connection management method.

[0109] In some embodiments, the device connection management method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the device connection management method described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to execute the device connection management method in any other appropriate manner (e.g., by means of firmware).

[0110] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays, application specific integrated circuits, application specific standard products, systems on a chip, load programmable logic devices, computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0111] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0112] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical fiber, a portable compact disk read-only memory, an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0113] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device 40 having: a display device (e.g., a cathode ray tube or a liquid crystal display) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the electronic device 40. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0114] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local area networks, wide area networks, blockchain networks, and the Internet.

[0115] A computing system may include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other. The server may be a cloud server.

[0116] This embodiment may also include a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the device connection management method provided by any embodiment of the present invention.

[0117] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0118] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A device connection management method, characterized in that: include: After the IoT device is started, a physical model component process is created, and the cloud platform is connected and user services are started through the physical model component process; Creating a first user task thread, and reading a current object model definition file from persistent storage through the first user task thread, parsing the current object model definition file, and obtaining current object model definition data; The object model component process uses a function call method to write the current object model definition data into temporary storage, and publish the current object model definition data to the model reporting topic to send the current object model definition data to the cloud platform, so that the cloud platform generates a object model corresponding to the Internet of Things device according to the current object model definition data.

2. The method according to claim 1, characterized in that After parsing the current object model definition file to obtain the current object model definition data, the method further includes: Writing the current object model definition data into persistent storage; Writing the current object model definition data into temporary storage by using a function call method through the object model component process includes: The object model component process uses a function call method to read the current object model definition data from the persistent storage, and write the current object model definition data into the temporary storage.

3. The method according to claim 2, characterized in that After publishing the current object model definition data to the model reporting topic to send the current object model definition data to the cloud platform, the method further includes: Subscribing to the model adjustment topic of the cloud platform through the object model component process, if the first updated object model definition data of the cloud platform is detected according to the model adjustment topic, replacing the current object model definition data in the temporary storage with the first updated object model definition data; By using a function call method through the object model component process, the first user task thread reads the first updated object model definition data from temporary storage, and replaces the current object model definition data in persistent storage with the first updated object model definition data; A first updated object model definition file is generated according to the first updated object model definition data through the first user task thread, and the current object model definition file in the persistent storage is replaced with the first updated object model definition file.

4. The method according to claim 2, characterized in that: Also includes: When the first user task thread detects that a business function update exists, the updated business function is obtained, and a second updated object model definition file is generated according to the updated business function; Replacing the current object model definition file in the persistent storage with the second updated object model definition file through the first user task thread, and parsing the second updated object model definition file to obtain second updated object model definition data; Replacing the current object model definition data in persistent storage with the second updated object model definition data through the first user task thread; Reading the second updated object model definition data from persistent storage by the object model component process in a function call manner, and replacing the current object model definition data in temporary storage with the second updated object model definition data; The second updated object model definition data is sent to the cloud platform through the object model component process, so that the cloud platform generates a object model corresponding to the Internet of Things device according to the second updated object model definition data.

5. The method according to claim 1, characterized in that Initiating user services through the object model component process includes: The user business dynamic library is loaded through the object model component process, and the user business function pointer is obtained, and a message publishing interface is registered to the user business. The message publishing interface is called when the user business actively publishes a message to the cloud platform.

6. The method according to claim 5, characterized in that After accessing the cloud platform and starting the user service through the object model component process, it also includes: Create a second user task thread, collect IoT device data through the second user task thread, and write the IoT device data to persistent storage; The publishing message interface is called through the second user task thread to send the IoT device data to the cloud platform through the object model component process.

7. A device connection management device, characterized in that: include: A process creation module is used to create a thing model component process after the IoT device is started, and access the cloud platform and start user services through the thing model component process; A file parsing module, used to create a first user task thread, and read a current object model definition file from a persistent storage through the first user task thread, and parse the current object model definition file to obtain current object model definition data; The data publishing module is used to write the current object model definition data into temporary storage by using a function call through the object model component process, and publish the current object model definition data to the model reporting topic to send the current object model definition data to the cloud platform, so that the cloud platform generates a object model corresponding to the Internet of Things device according to the current object model definition data.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor, and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the device connection management method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is used to enable a processor to implement the device connection management method according to any one of claims 1 to 6 when executed.

10. A computer program product, characterized in that The invention comprises a computer program, which implements the device connection management method according to any one of claims 1 to 6 when being executed by a processor.