Object model clients and edge computing devices
By splitting the object model meta-service application into an interface adaptation layer, an object model meta-service layer, and an object model meta-service interface layer in the OpenHarmony system, the problem of high coupling between the object model PA application and the object model FA application is solved, and the scalability and ease of development of the object model client are realized.
Patent Information
- Application Number
- CN202311438298.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-31
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2043-10-31
AI Technical Summary
When developing object model clients for existing IoT devices under the OpenHarmony system, the high coupling between the object model PA application and the object model FA application results in poor scalability.
The object model meta-service application is split into an interface adaptation layer, an object model meta-service layer, and an object model meta-service interface layer to decouple the interface from the specific implementation. By leveraging the multi-layered application capabilities of the OpenHarmony system, specific business and general service layers are separated.
It improves the scalability and ease of development of object model meta-service applications, reduces the coupling between object model FA and object model PA applications, and enhances maintainability.
Smart Images

Figure CN117472333B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet of Things (IoT) technology, and more particularly to a device model client and an edge computing device. Background Technology
[0002] Currently, IoT device model clients are typically developed based on the Android system, which is not compatible with the OpenHarmony system. Therefore, it is necessary to redevelop the corresponding IoT device applications based on the application framework provided by the OpenHarmony system. The IoT device model client under the OpenHarmony system consists of a Vehicle Ability (PA) application and a Feature Ability (FA) application. The PA application is the specific functional implementation of the IoT device; therefore, its development is particularly important. Consequently, the PA and FA applications included in the IoT model client are usually developed together. This results in high coupling between the PA and FA applications, hindering the expansion of the PA application. Summary of the Invention
[0003] This invention provides a physical model client and an edge computing device, aiming to improve the scalability of physical model meta-service applications.
[0004] In a first aspect, embodiments of the present invention provide a physical model client, including a physical model FA application and a physical model PA application, wherein the physical model PA application includes an interface adaptation layer, a physical model meta-service layer and a physical model meta-service interface layer;
[0005] The interface adaptation layer is used to adapt the local interface provided by the object model subsystem into a first interface that can be used by the object model meta-service layer.
[0006] The object model meta-service layer is used to provide object model meta-services, which include attribute reading service, instruction writing service and event handling service. The attribute reading service is used to read the attributes of the object model in the object model subsystem through the first interface. The instruction writing service is used to send control instructions to the object model in the object model subsystem through the first interface. The event handling service is used to obtain the events reported by the object model in the object model subsystem through the first interface and process the events.
[0007] The object model meta-service interface layer is used to provide a second interface for the object model FA application to call the object model meta-service.
[0008] In some embodiments, the attribute reading service includes a general attribute reading service, which is used to read general attributes of the object model in the object model subsystem through the first interface. The general attributes include attributes that all IoT devices of various product types possess.
[0009] The instruction writing service includes a general instruction writing service, which is used to send general control instructions to the object model in the object model subsystem through the first interface. The general control instructions include control instructions that can be executed by all IoT devices of various product types.
[0010] The event processing service includes a general event processing service, which is used to obtain general events reported by the object models in the object model subsystem through the first interface, and process the general events. The general events include events that will occur in all IoT devices of various product types.
[0011] In some embodiments, the implementation code of the general attribute reading service, general instruction writing service, and general event processing service of the first object model is the same as the implementation code of the attribute reading service, general instruction writing service, and general event processing service of the second object model, and the product type of the IoT device corresponding to the first object model is different from the product type of the IoT device corresponding to the second object model.
[0012] In some embodiments, the attribute reading service further includes a public attribute reading service, which is used to read public attributes of the object model in the object model subsystem through the first interface. The public attributes include non-generic attributes that are possessed by all IoT devices of the same product type.
[0013] The instruction writing service includes a public instruction writing service, which is used to send public control instructions to the object models in the object model subsystem through the first interface. The public control instructions include non-general control instructions that can be executed by all IoT devices of the same product type.
[0014] The event processing service includes a public event processing service, which is used to obtain public events reported by the object models in the object model subsystem through the first interface and process the public events. The public events include non-general events that will occur in all IoT devices of the same product type.
[0015] In some embodiments, the implementation code of the public attribute reading service, public instruction writing service, and public event processing service of the first object model is the same as the implementation code of the public attribute reading service, public instruction writing service, and public event processing service of the third object model, and the product type of the IoT device corresponding to the first object model is the same as the product type of the IoT device corresponding to the third object model.
[0016] In a second aspect, embodiments of the present invention also provide an edge computing device, including a material model subsystem and a material model client as described in the first aspect;
[0017] The object model PA application is configured to obtain a first instruction sent by the object model FA application through the second interface, and send the first instruction to the object model subsystem through the object model meta service and the first interface;
[0018] The object model subsystem is configured to send response data to the object model PA application in response to the first instruction;
[0019] The object model PA application is further configured to obtain the response data sent by the object model subsystem through the first interface, and send the response data to the object model FA application through the object model meta service and the second interface.
[0020] In some embodiments, the object model meta-service includes a general function application service and a public function application service. The general function application service is used to implement the general functions of IoT devices. The general functions include functions that all IoT devices of various different product types have. The public function application service is used to implement the public functions of IoT devices. The public functions include non-general functions that all IoT devices of the same product type have.
[0021] The object model PA application is further configured to send the first instruction to the object model subsystem through the general function application service and the first interface when the first instruction is located in the first preset instruction set, and to send the first instruction to the object model subsystem through the general function application service and the first interface when the first instruction is located in the second preset instruction set.
[0022] In some embodiments, the edge computing device further includes a device control subsystem for communicating with multiple Internet of Things (IoT) devices and the object model subsystem;
[0023] The object model subsystem is further configured to, upon receiving the first instruction, obtain a device identifier and an action instruction code from the first instruction, and send the action instruction code and the logical port number corresponding to the device identifier to the device control subsystem;
[0024] The device control subsystem is configured to send a second instruction to the corresponding IoT device based on the control protocol corresponding to the device identifier, using the logical port number and the action instruction code, so that the IoT device responds to the second instruction.
[0025] In some embodiments, the device control subsystem includes:
[0026] The port mapping module is configured to obtain the physical port number mapped to the logical port number;
[0027] The instruction writing module is configured to write the second instruction corresponding to the action instruction code;
[0028] The instruction sending module is configured to send the second instruction to the corresponding IoT device based on the control protocol corresponding to the device identifier and the physical port number.
[0029] In some embodiments, the object model client includes a first object model client and a second object model client. The first object model client includes a first object model FA application and a first object model PA application. The second object model client includes a second object model FA application and a second object model PA application. The first object model FA application and the first object model PA application correspond to IoT devices of a first product type and a first product model. The second object model FA application and the second object model PA application correspond to IoT devices of a second product type and a second product model. The first product type is different from the second product type, and the first product model is different from the second product model.
[0030] This invention provides a physical model client and an edge computing device. The entire physical model meta-service application in this invention is divided into an interface adaptation layer, a physical model meta-service layer, and a physical model meta-service interface layer, thereby decoupling the interface from the specific implementation of the physical model meta-service. This allows for the improvement of the specific implementation of the physical model meta-service without modifying or affecting the interface code, thus greatly improving the scalability of the physical model meta-service application. Furthermore, it fully utilizes the multi-layered application capabilities of the OpenHarmony system, separating specific business from general service layers, and improving the ease of development and maintenance of the physical model FA and PA applications. Attached Figure Description
[0031] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0032] Figure 1 This is a schematic block diagram of the structure of a physical model client provided in an embodiment of the present invention;
[0033] Figure 2 This is a schematic block diagram of another object model client provided in an embodiment of the present invention;
[0034] Figure 3 This is a schematic diagram illustrating the connection between the object model client and the object model subsystem provided in an embodiment of the present invention;
[0035] Figure 4 This is a schematic block diagram of the structure of an edge computing device provided in an embodiment of the present invention;
[0036] Figure 5 This is a schematic block diagram of another edge computing device provided in an embodiment of the present invention. Detailed Implementation
[0037] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0038] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0039] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0040] To facilitate understanding of the technical solutions provided in the embodiments of the present invention, several concepts will be explained below.
[0041] OpenHarmony is an open-source project under the OpenAtom Foundation, a distributed operating system designed for all scenarios. OpenHarmony provides features such as a distributed soft bus, distributed data management, distributed task scheduling, and a distributed virtualization platform.
[0042] A distributed soft bus serves as a unified platform for multiple intelligent devices, providing unified distributed communication capabilities for seamless interconnection between these devices. It enables rapid discovery and connection of intelligent devices, and efficient transmission of tasks and data. Leveraging soft bus technology, distributed data management capabilities can be achieved, thereby enabling distributed management of application data and user data. User data is no longer bound to a single physical device; business logic is separated from data storage, and data is seamlessly integrated across devices during application runtime.
[0043] From a software perspective, operating systems supporting distributed soft bus technology can deploy specific applications on a per-ability basis. An ability is an abstraction of the capabilities an application possesses and is a crucial component of the application. In other words, an application can possess multiple capabilities (i.e., it can contain multiple abilities). Specifically, application capabilities are divided into two types: FA (Feature Ability) and PA (Particle Ability). FA represents capabilities with a UI (User Interface), which are visible to the user and designed for interaction. PA represents capabilities without a UI and primarily provides support for FAs, such as providing computing functionality as a background service or providing data access functionality as a data repository, etc.
[0044] Currently, IoT device model clients are typically developed based on the Android system, which is not compatible with the OpenHarmony system. Therefore, it is necessary to redevelop the corresponding IoT device applications based on the application framework provided by the OpenHarmony system. The IoT device model client under the OpenHarmony system consists of a Vehicle Ability (PA) application and a Feature Ability (FA) application. The PA application is the specific functional implementation of the IoT device; therefore, its development is particularly important. Consequently, the PA and FA applications included in the IoT model client are usually developed together. This results in high coupling between the PA and FA applications, hindering the expansion of the PA application.
[0045] To address the aforementioned issues, embodiments of the present invention provide a physical model client and an edge computing device. In these embodiments, the entire physical model meta-service application is divided into an interface adaptation layer, a physical model meta-service layer, and a physical model meta-service interface layer. This decouples the interface from the specific implementation of the physical model meta-service. This allows for the refinement of the specific implementation of the physical model meta-service without modifying or affecting the interface code, thereby significantly improving the scalability of the physical model meta-service application. Furthermore, it fully leverages the multi-layered application capabilities of the OpenHarmony system, separating specific business logic from general service layers, thus enhancing the ease of development and maintenance of the physical model FA and PA applications.
[0046] The following detailed description of some embodiments of the present invention is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0047] Please see Figure 1 , Figure 1 This is a schematic block diagram of the structure of a material model client provided in an embodiment of the present invention.
[0048] like Figure 1 As shown, the object model client 100 includes an object model FA application 110 and an object model PA application 120. The object model PA application 120 includes an interface adaptation layer 121, an object model meta-service layer 122, and an object model meta-service interface layer 123. The interface adaptation layer 121 is used to adapt the local interface provided by the object model subsystem into a first interface that can be used by the object model meta-service layer. The object model meta-service layer 122 is used to provide object model meta-services, including attribute reading service, instruction writing service, and event handling service. The attribute reading service is used to read the attributes of the object model in the object model subsystem through the first interface. The instruction writing service is used to send control instructions to the object model in the object model subsystem through the first interface. The event handling service is used to obtain the events reported by the object model in the object model subsystem through the first interface and process the events. The object model meta-service interface layer 123 is used to provide the object model FA application 110 with a second interface for calling the object model meta-services. The object model subsystem provides native interfaces written in C++, with the first interface being a JS interface and the second interface being a JS interface.
[0049] In this embodiment, the entire object model PA application 120 is divided into an interface adaptation layer 121, an object model meta-service layer 122, and an object model meta-service interface layer 123, which decouples the interface from the specific implementation of the object model PA. This allows the specific implementation of the object model PA to be improved without modifying or affecting the interface code, thereby greatly improving the scalability of the object model PA application. Furthermore, it fully utilizes the multi-layered application capabilities of the OpenHarmony system, separating the object model FA application 110 and the object model PA application 120, thus improving the ease of development and maintenance of the object model FA application and the object model PA application.
[0050] In some embodiments, such as Figure 2 As shown, the object model meta-services include general function application services and common function application services. General function application services include general attribute reading services, general instruction writing services, and general event handling services. Common function application services include common attribute reading services, common instruction writing services, and common event handling services. Specifically, the attribute reading service includes general attribute reading services and common attribute reading services; the instruction writing service includes general instruction writing services and common instruction writing services; and the event handling service includes general event handling services and common event handling services.
[0051] In some embodiments, such as Figure 3 As shown, the general attribute reading service is used to read the general attributes of the object models in the object model subsystem 200 through the first interface. These general attributes include attributes that all IoT devices of various product types possess. For example, devices such as fans, air conditioners, washing machines, and water heaters belong to different product types, and these devices all possess attributes such as device identification codes and chip temperatures. Therefore, device identification codes and chip temperatures can be used as general attributes.
[0052] In some embodiments, the general instruction writing service is used to send general control instructions to the object model in the object model subsystem 200 through a first interface. These general control instructions include control instructions executable by all IoT devices of various product types. For example, televisions, audio equipment, air conditioners, and energy storage devices belong to different product types, and the control instructions executable by these devices include sleep instructions and power-off instructions. Therefore, sleep instructions and power-off instructions can be used as general control instructions for these devices.
[0053] In some embodiments, the general event processing service is used to obtain general events reported by the object models in the object model subsystem 200 through a first interface, and to process the general events. These general events include events that occur to all IoT devices of various product types. For example, energy storage devices, air conditioners, and televisions are different product types, and events that occur to all these devices include device overheating events and device access events. Therefore, device overheating events and device access events can be considered as general events.
[0054] In some embodiments, the implementation code for the general attribute reading service, general instruction writing service, and general event handling service of the first object model is the same as that of the second object model. However, the product type of the IoT device corresponding to the first object model is different from that of the IoT device corresponding to the second object model. The object model PA application provided in this embodiment can reuse the implementation code of the general attribute reading service, general instruction writing service, and general event handling service for development, which can improve the efficiency of object model PA application development.
[0055] In some embodiments, the public attribute reading service is used to read the public attributes of the object models in the object model subsystem 200 through a first interface. Public attributes include non-generic attributes possessed by all IoT devices of the same product type. For example, if the product type is an air conditioner, attributes possessed by air conditioners of different models and manufacturers include device identification code, chip temperature, operating temperature, fan speed, cooling power, and heating power. Since device identification code and chip temperature are generic attributes, operating temperature, fan speed, cooling power, and heating power are considered public attributes for the air conditioner product type.
[0056] In some embodiments, the common instruction writing service is used to send common control instructions to the object model in the object model subsystem 200 through a first interface. These common control instructions include non-generic control instructions that can be executed by all IoT devices of the same product type. For example, if the product type is an air conditioner, control instructions that can be executed by air conditioners of different models and manufacturers include sleep commands, power-off commands, temperature adjustment commands, fan speed adjustment commands, and mode adjustment commands. Since sleep commands and power-off commands are generic control instructions, temperature adjustment commands, fan speed adjustment commands, and mode adjustment commands are considered as common control instructions for the air conditioner product type.
[0057] In some embodiments, the public event processing service is used to obtain public events reported by the object models in the object model subsystem 200 through a first interface, and to process the public events. These public events include non-generic events that occur in all IoT devices of the same product type. For example, if the product type is an air conditioner, events that occur in air conditioners of different models and manufacturers include overheating events, device access events, air vent baffle not returning to its original position events, and filter not being cleaned for a long time events. Since overheating events and device access events are generic events, events such as air vent baffle not returning to its original position events and filter not being cleaned for a long time events are considered public events for the air conditioner product type.
[0058] In some embodiments, the implementation code for the public attribute reading service, public instruction writing service, and public event handling service of the first object model is the same as that of the third object model, and the product type of the IoT device corresponding to the first object model is the same as that of the IoT device corresponding to the third object model. The object model PA application provided in this embodiment can reuse the implementation code of the public attribute reading service, public instruction writing service, and public event handling service for development, thus improving the efficiency of object model PA application development.
[0059] Please see Figure 4 , Figure 4 This is a schematic block diagram of the structure of an edge computing device provided in an embodiment of the present invention.
[0060] like Figure 4 As shown, the edge computing device 300 includes a device model subsystem 200 and a device model client 100. The device model client 100 includes a device model FA application 110 and a device model PA application 120. The device model PA application 120 includes an interface adaptation layer 121, a device model meta-service layer 122, and a device model meta-service interface layer 123. The interface adaptation layer 121 adapts the local interfaces provided by the device model subsystem into a first interface that can be used by the device model meta-service layer. The device model meta-service layer 122 provides device model meta-services. The device model meta-service interface layer 123 provides a second interface for the device model FA application 110 to call the device model meta-services.
[0061] In some embodiments, the object model PA application 120 is configured to obtain a first instruction sent by the object model FA application 110 through a second interface, and send the first instruction to the object model subsystem 200 through the object model meta-service and the first interface; the object model subsystem 200 is configured to respond to the first instruction by sending response data to the object model PA application 120; the object model PA application 120 is further configured to obtain the response data sent by the object model subsystem 200 through the first interface, and send the response data to the object model FA application 110 through the object model meta-service and the second interface, so that the object model FA application 110 processes the response data. The object model meta-service includes an attribute reading service, an instruction writing service, and an event handling service.
[0062] In some embodiments, the first instruction includes an attribute reading instruction or a device control instruction. The object model PA application 120 is further configured to send the attribute reading instruction to the object model subsystem 200 through an attribute reading service and a first interface when the first instruction is an attribute reading instruction. The object model subsystem 200 is configured to respond to the attribute reading instruction, obtain the corresponding attribute information of the object model, and send the attribute information to the object model PA application 120. The object model PA application 120 is further configured to obtain the attribute information sent by the object model subsystem 200 through the first interface, and send the attribute information to the object model FA application 110 through the attribute reading service and a second interface, so that the object model FA application 110 outputs the attribute information.
[0063] In some embodiments, the object model PA application 120 is further configured to send the device control instruction to the object model subsystem 200 through an instruction writing service and a first interface when the first instruction is a device control instruction; the object model subsystem 200 is configured to respond to the device control instruction, obtain the control feedback result of the object model, and send the control feedback result to the object model PA application 120; the object model PA application 120 is further configured to obtain the control feedback result sent by the object model subsystem 200 through the first interface, and send the control feedback result to the object model FA application 110 through the instruction writing service and the second interface, so that the object model FA application 110 outputs the control feedback result.
[0064] In some embodiments, the object model meta-service includes a general function application service and a public function application service. The general function application service is used to implement the general functions of IoT devices. The general functions include functions that all IoT devices of various product types have. The public function application service is used to implement the public functions of IoT devices. The public functions include non-general functions that all IoT devices of the same product type have.
[0065] The object model PA application 120 is further configured to send the first instruction to the object model subsystem 200 through a general function application service and a first interface when the first instruction is located in a first preset instruction set, and to send the first instruction to the object model subsystem 200 through a common function application service and a first interface when the first instruction is located in a second preset instruction set. The first preset instruction set includes general attribute reading instructions and general control instructions for reading general attributes, and the second preset instruction set includes common attribute reading instructions and common control instructions for reading common attributes. The first and second preset instruction sets can be set based on actual conditions, and this embodiment of the invention does not specifically limit them. The object model PA application 120 provided in this embodiment can adaptively call a general function application service or a common function application service to process the instruction triggered by the object model FA application 110, improving the service call flexibility of the object model PA application 120.
[0066] In some embodiments, such as Figure 5 As shown, the edge computing device 300 also includes a device control subsystem 400, which communicates with multiple IoT devices and the object model subsystem 200. The object model subsystem 200 is further configured to, upon receiving a first instruction, obtain a device identifier and an action instruction code from the first instruction, and send the action instruction code and the logical port number corresponding to the device identifier to the device control subsystem 400. The device control subsystem 400 is configured to, based on the control protocol corresponding to the device identifier, use the logical port number and the action instruction code to send a second instruction to the corresponding IoT device, so that the IoT device responds to the second instruction. The edge computing device 300 provided in this embodiment can achieve decoupling between the object model subsystem and the device control subsystem. Furthermore, the object model subsystem does not concern itself with the object model's control protocol; the specific operation of controlling the corresponding IoT device according to the control protocol is performed by the device control subsystem. This allows the object model subsystem to be well-compatible with the diverse control protocols used by different object models, greatly improving the compatibility and scalability of the object model subsystem.
[0067] In some embodiments, the device control subsystem 400 includes: a port mapping module configured to acquire the physical port number mapped to the logical port number; an instruction writing module configured to write a second instruction corresponding to an action instruction code; and an instruction sending module configured to send the second instruction to the corresponding IoT device based on the control protocol corresponding to the device identifier and the physical port number. The control protocol used by the IoT device in this embodiment can be MQTT (Message Queuing Telemetry Transport) or CoAP (Constrained Application Protocol), and this embodiment does not specifically limit this.
[0068] In some embodiments, the object model subsystem 200 is further configured to, after registering a new object model, determine the first product type and first product model of the IoT device corresponding to the newly registered object model; determine whether the object model client 100 corresponds to the first product type and first product model; and, when it is determined that the object model client 100 corresponds to the first product type and first product model, send the device identification code of the IoT device corresponding to the newly registered object model to the object model client 100; the object model client 100 is configured to bind its own client identification code to the device identification code after receiving the device identification code. In this embodiment, the object model clients 100 corresponding to object model devices with the same product type and product model in the edge computing device are the same, so that object model devices with the same product type and product model can share a single object model client, saving storage space of the edge computing device.
[0069] In some embodiments, the object model client 100 includes a first object model client and a second object model client. The first object model client includes a first object model FA application and a first object model PA application. The second object model client includes a second object model FA application and a second object model PA application. The first object model FA application and the first object model PA application correspond to IoT devices of a first product type and a first product model. The second object model FA application and the second object model PA application correspond to IoT devices of a second product type and a second product model. The first product type and the second product type are different, and the first product model and the second product model are different.
[0070] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, as well as the functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware embodiments, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as integrated circuits, such as application-specific integrated circuits (ASICs).
[0071] It should be understood that the term "and / or" as used in this specification and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations. It should be noted that, herein, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0072] The sequence numbers of the above embodiments of the present invention are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. The above descriptions are only specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A client for object modeling, characterized in that, It includes object model FA application and object model PA application, wherein the object model PA application includes an interface adaptation layer, an object model meta-service layer and an object model meta-service interface layer; The interface adaptation layer is used to adapt the local interface provided by the object model subsystem into a first interface that can be used by the object model meta-service layer. The object model meta-service layer is used to provide object model meta-services, which include attribute reading service, instruction writing service and event handling service. The attribute reading service is used to read the attributes of the object model in the object model subsystem through the first interface. The instruction writing service is used to send control instructions to the object model in the object model subsystem through the first interface. The event handling service is used to obtain the events reported by the object model in the object model subsystem through the first interface and process the events. The object model meta-service interface layer is used to provide the object model FA application with a second interface for calling the object model meta-service; The object model meta-service includes a general function application service and a public function application service. The general function application service is used to implement general functions of IoT devices, including functions that are possessed by all IoT devices of various product types. The public function application service is used to implement public functions of IoT devices, including non-general functions that are possessed by all IoT devices of the same product type. The object model PA application is configured to obtain a first instruction sent by the object model FA application through the second interface; and is further configured to send the first instruction to the object model subsystem through the general function application service and the first interface when the first instruction is located in a first preset instruction set, and to send the first instruction to the object model subsystem through the public function application service and the first interface when the first instruction is located in a second preset instruction set.
2. The object model client according to claim 1, characterized in that, The attribute reading service includes a general attribute reading service, which is used to read the general attributes of the object model in the object model subsystem through the first interface. The general attributes include attributes that all IoT devices of various product types possess. The instruction writing service includes a general instruction writing service, which is used to send general control instructions to the object model in the object model subsystem through the first interface. The general control instructions include control instructions that can be executed by all IoT devices of various product types. The event processing service includes a general event processing service, which is used to obtain general events reported by the object models in the object model subsystem through the first interface, and process the general events. The general events include events that will occur in all IoT devices of various product types.
3. The object model client according to claim 2, characterized in that, The implementation code of the general attribute reading service, general instruction writing service, and general event processing service of the first object model is the same as that of the second object model. The product type of the IoT device corresponding to the first object model is different from that of the IoT device corresponding to the second object model.
4. The object model client according to claim 2, characterized in that, The attribute reading service also includes a public attribute reading service, which is used to read the public attributes of the object model in the object model subsystem through the first interface. The public attributes include non-general attributes that are possessed by all IoT devices of the same product type. The instruction writing service includes a public instruction writing service, which is used to send public control instructions to the object models in the object model subsystem through the first interface. The public control instructions include non-general control instructions that can be executed by all IoT devices of the same product type. The event processing service includes a public event processing service, which is used to obtain public events reported by the object models in the object model subsystem through the first interface and process the public events. The public events include non-general events that will occur in all IoT devices of the same product type.
5. The object model client according to claim 4, characterized in that, The implementation code of the public attribute reading service, public instruction writing service, and public event processing service of the first object model is the same as that of the third object model. The product type of the IoT device corresponding to the first object model is the same as that of the IoT device corresponding to the third object model.
6. An edge computing device, characterized in that, Includes a physical model subsystem and a physical model client as described in any one of claims 1-5; The object model PA application is configured to obtain a first instruction sent by the object model FA application through the second interface, and send the first instruction to the object model subsystem through the object model meta service and the first interface; The object model subsystem is configured to send response data to the object model PA application in response to the first instruction; The object model PA application is further configured to obtain the response data sent by the object model subsystem through the first interface, and send the response data to the object model FA application through the object model meta service and the second interface.
7. The edge computing device according to claim 6, characterized in that, The edge computing device also includes a device control subsystem, which is used to communicate with multiple IoT devices and the object model subsystem. The object model subsystem is further configured to, upon receiving the first instruction, obtain a device identifier and an action instruction code from the first instruction, and send the action instruction code and the logical port number corresponding to the device identifier to the device control subsystem; The device control subsystem is configured to send a second instruction to the corresponding IoT device based on the control protocol corresponding to the device identifier, using the logical port number and the action instruction code, so that the IoT device responds to the second instruction.
8. The edge computing device according to claim 7, characterized in that, The equipment control subsystem includes: The port mapping module is configured to obtain the physical port number mapped by the logical port number; The instruction writing module is configured to write the second instruction corresponding to the action instruction code; The instruction sending module is configured to send the second instruction to the corresponding IoT device based on the control protocol corresponding to the device identifier and the physical port number.
9. The edge computing device according to any one of claims 6-8, characterized in that, The object model client includes a first object model client and a second object model client. The first object model client includes a first object model FA application and a first object model PA application. The second object model client includes a second object model FA application and a second object model PA application. The first object model FA application and the first object model PA application correspond to IoT devices of a first product type and a first product model. The second object model FA application and the second object model PA application correspond to IoT devices of a second product type and a second product model. The first product type is different from the second product type, and the first product model is different from the second product model.
Citation Information
Patent Citations
Development method and device of Internet of Things component
CN116192897A
Device control method, edge computing device and storage medium
CN116300510A
