Equipment service registration method and device, storage medium and electronic equipment
By converting smart devices in a smart home into a unified set of device services and registering them on the platform, the complexity of development caused by the independent management of smart devices is solved, the flexibility and scalability of applications are achieved, and the development process is simplified.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HAIER YOUJIA INTELLIGENT TECH (BEIJING) CO LTD
- Filing Date
- 2026-02-03
- Publication Date
- 2026-05-19
AI Technical Summary
In smart homes, smart devices are managed as independent entities, leading to complex application development and a lack of cross-device compatibility and portability.
By identifying device types and functional attributes, these are converted into a unified set of device services and registered with the target platform, enabling applications to directly call these services, regardless of which device provides them.
It simplifies the development process of application scenarios, improves the flexibility and scalability of applications, reduces development and maintenance costs, and promotes interconnection between devices.
Smart Images

Figure CN122069128A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart home technology, and more specifically, to a method and apparatus for registering device services, a storage medium, and an electronic device. Background Technology
[0002] In current smart homes, device management and control mainly revolve around specific individual devices. Each device is treated as an independent entity, and its status maintenance, control logic, and attribute calls are all closely related to the device itself.
[0003] However, when developing smart home applications, developers must have a deep understanding of the characteristics, functions, and operation of each device. For example, to write an application that automatically adjusts temperature and humidity in response to environmental changes, developers need to know which devices are equipped with temperature and humidity sensors, and then write specific device control logic. This device dependency not only increases development complexity but also limits the application's portability and cross-device compatibility.
[0004] There is still no effective solution to the problem that the management of smart devices as independent entities in related technologies leads to the complexity of developing smart home application scenarios. Summary of the Invention
[0005] This application provides a device service registration method and apparatus, storage medium and electronic device to at least solve the problem in the related art where smart devices are managed as independent individuals, leading to the complexity of smart home scenario application development.
[0006] According to one embodiment of this application, a device service registration method is provided, comprising: when a target device accesses a target network, obtaining the device type and device function attributes of the target device; determining a set of device services corresponding to the target device based on the device type and the device function attributes, wherein the set of device services includes one or more device services; registering the set of device services to a target platform, so that when a target object uses a target function, it can call the target device service corresponding to the target function in a target application, wherein the set of device services includes the target device service, and after registering the device service to the target platform, the device service is displayed in the target application.
[0007] In an exemplary embodiment, determining the device service set corresponding to the target device based on the device type and the device functional attributes includes: determining the attribute type corresponding to each device functional attribute based on the device type, and determining the device service set by one of the following methods: determining the device service corresponding to each attribute type through a service abstraction model, and determining the device service corresponding to each attribute type as the device service set; determining the device service corresponding to each attribute type based on the mapping relationship between attribute type and service type, and determining the device service corresponding to each attribute type as the device service set.
[0008] In one exemplary embodiment, registering the device service set to a target platform includes: determining whether other gateway devices exist in the target network; if other gateway devices exist in the target network, determining a first device score of the other gateway devices and a second device score of the target gateway device; and if the second device score is greater than the first device score, registering the device service set to the target platform.
[0009] In one exemplary embodiment, determining a second device score for the target gateway device includes: acquiring device information of the target gateway device in multiple dimensions; determining a first weight of the device information according to the scoring rules of the gateway device; adjusting the first weight according to the weight adjustment rules to obtain a second weight; and determining the second device score based on the device information and the corresponding second weight.
[0010] In an exemplary embodiment, obtaining the device type and device functional attributes of the target device includes: obtaining multimodal feature information of the target device, wherein the multimodal feature information includes at least one of the following: hardware features, software features, and runtime behavior features; fusing the multimodal feature information to generate an identity feature vector of the target device; comparing the identity feature vector with a preset feature vector based on a target comparison algorithm to determine the comparison result, wherein the preset feature vector is a legitimate identity feature vector; and obtaining the device type and device functional attributes of the target device when the comparison result indicates that the similarity between the identity feature vector and the preset feature vector is greater than a preset threshold.
[0011] In one exemplary embodiment, registering the device service set to a target platform includes: encrypting the device service set based on the key of the target device; and sending the encrypted device service set to the target platform to register the device service set to the target platform.
[0012] In one exemplary embodiment, after registering the device service set to the target platform, the method further includes: receiving response information from the target platform; if the response information indicates registration failure, determining whether the device service set has been registered to the target platform; and if the device service set has not been registered to the target platform, registering the device service set to the target platform again.
[0013] According to another embodiment of this application, a device service registration apparatus is also provided, comprising: an acquisition module, configured to acquire the device type and device function attributes of the target device when the target device accesses the target network; a determination module, configured to determine a set of device services corresponding to the target device based on the device type and the device function attributes, wherein the set of device services includes one or more device services; and a registration module, configured to register the set of device services to a target platform, so that when a target object uses a target function, it can call the target device service corresponding to the target function in a target application, wherein the set of device services includes the target device service, and after the device service is registered to the target platform, the device service is displayed in the target application.
[0014] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the above-described device service registration method at runtime.
[0015] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above-described device service registration method through the computer program.
[0016] In this application embodiment, by identifying and extracting the functional attributes of devices and converting them into a unified service set, the development process of scenario applications is simplified. For example, when a smart air conditioner is connected to the home network, the system automatically detects and obtains its temperature and humidity control functions, and then abstracts these functions into "temperature regulation service" and "humidity regulation service." These services are registered to the cloud platform, becoming callable resources for smart home applications. The service set registered to the target platform allows scenario applications to no longer be limited to specific hardware devices, but can directly call the corresponding services according to the required functions, regardless of which device provides the service. This not only improves the flexibility and scalability of applications but also reduces development and maintenance costs. For example, when developing an "environmental comfort optimization" scenario application, developers do not need to know the detailed information of all devices in the home; they only need to call the "temperature regulation service" and "humidity regulation service," and the application can automatically adapt to any device that provides these services, whether it is an air conditioner, humidifier, or other smart device. In summary, this application embodiment solves the problem in related technologies where smart devices are managed as independent entities, leading to complex development of smart home scenario applications. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of the hardware environment for a device service registration method according to an embodiment of this application;
[0020] Figure 2 This is a flowchart of a device service registration method according to an embodiment of this application;
[0021] Figure 3 This is a system architecture diagram of a device service registration method according to an embodiment of this application;
[0022] Figure 4 This is a timing diagram of a device service registration method according to an embodiment of this application;
[0023] Figure 5 This is a timing diagram of an application method for device services according to an embodiment of this application;
[0024] Figure 6This is a structural block diagram of a device service registration apparatus according to an embodiment of this application. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] According to one aspect of the embodiments of this application, a method for registering device services is provided. This method for registering device services is widely applicable to whole-house intelligent digital control application scenarios such as smart homes, smart home ecosystems, and intelligence house ecosystems. Optionally, in this embodiment, the above-mentioned method for registering device services can be applied to, for example... Figure 1 The hardware environment shown consists of terminal device 102 and server 104. For example... Figure 1 As shown, server 104 is connected to terminal device 102 via a network and can be used to provide services (such as application services) to the terminal or clients installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data processing services for server 104.
[0028] The aforementioned network may include, but is not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. The terminal device 102 may not be limited to PC, mobile phone, tablet computer, gateway device, etc.
[0029] This embodiment provides a device service registration method, applied to a target gateway device. Figure 2 This is a flowchart of a device service registration method according to an embodiment of this application, which includes the following steps:
[0030] Step S202: When the target device is connected to the target network, obtain the device type and device function attributes of the target device;
[0031] When a target device connects to a target network, such as a home Wi-Fi network, the target gateway device, acting as a smart hub connecting the devices, begins to acquire and identify the type and functional attributes of the target device, and records the device's identity and its various functions, such as temperature and humidity monitoring and voice recognition.
[0032] Step S204: Determine the device service set corresponding to the target device based on the device type and the device functional attributes, wherein the device service set includes one or more device services;
[0033] Based on device type and functional attributes, the target gateway device abstracts these characteristics into a series of device service sets. Each set represents one or more functions of the device, encapsulated as services, that is, transforming the physical characteristics of the hardware device into logical services that can be recognized by software.
[0034] Step S206: Register the device service set to the target platform so that when the target object uses the target function, it can call the target device service corresponding to the target function in the target application. The device service set includes the target device service. After registering the device service to the target platform, the device service is displayed in the target application.
[0035] Once the device service set is built, the target gateway device is responsible for registering these services with the target platform, typically a cloud service platform. The registration process ensures the availability and discoverability of the services, enabling target applications to access and invoke them. After successful service registration, the target application can display and directly invoke these device services without needing to know about the physical devices behind the services.
[0036] Through the above steps, by identifying and extracting the functional attributes of devices and converting them into a unified set of services, the development process of scenario applications is simplified. For example, when a smart air conditioner is connected to the home network, the system automatically detects and obtains its temperature and humidity control functions, and then abstracts these functions into "temperature regulation service" and "humidity regulation service." These services are registered to the cloud platform, becoming callable resources for smart home applications. The service set registered to the target platform means that scenario applications are no longer limited to specific hardware devices, but can directly call the corresponding services according to the required functions, regardless of which device provides the service. This not only improves the flexibility and scalability of applications but also reduces development and maintenance costs. For example, when developing an "environmental comfort optimization" scenario application, developers do not need to know the detailed information of all devices in the home; they only need to call the "temperature regulation service" and "humidity regulation service," and the application can automatically adapt to any device that provides these services, whether it is an air conditioner, humidifier, or other smart device. In summary, the embodiments of this application solve the problem in related technologies where smart devices are managed as independent entities, leading to complex development of smart home scenario applications.
[0037] Optionally, determining the set of device services corresponding to the target device based on the device type and the device functional attributes includes: determining the attribute type corresponding to each device functional attribute based on the device type, and determining the set of device services through one of the following methods: determining the device service corresponding to each attribute type through a service abstraction model, and determining the device service corresponding to each attribute type as the set of device services; or determining the device service corresponding to each attribute type based on the mapping relationship between attribute type and service type, and determining the device service corresponding to each attribute type as the set of device services.
[0038] In this embodiment, the functional attributes of the smart device are identified according to its type, and the attribute types of these functional attributes are further determined. The attribute type is an abstract classification of the device's functional attributes. For example, the functional attribute of a temperature and humidity sensor can be classified as the "environmental monitoring" attribute type, while the voice recognition function can be classified as the "voice interaction" attribute type.
[0039] A service abstraction model is a predefined set of rules or algorithms that automatically determines the appropriate device services based on the device's attribute type. For example, if a device has an "environmental monitoring" attribute type, the service abstraction model will convert it into a "temperature and humidity monitoring service." The use of this model ensures the automatic generation of device service sets without manual intervention, achieving standardized and automated construction of device services.
[0040] Another approach is to directly utilize the mapping relationship between attribute types and service types to determine the service set. This mapping relationship can be predefined; for example, the system may have a "attribute type - service type" lookup table configured to explicitly indicate which service type a specific attribute type should be converted to. After a device connects to the network, the gateway device will use the lookup table to convert the identified attribute types into the corresponding service types, thereby constructing the device's service set.
[0041] Through the embodiments of this application, smart devices in smart homes can be transformed into services more efficiently and systematically. Once these service sets are registered to the platform, they can be quickly invoked by various scenario applications without needing to concern themselves with the details of specific devices. This greatly simplifies the development process of scenario applications, promotes the interconnection between devices, and enhances the flexibility of smart home applications.
[0042] Optionally, registering the device service set to the target platform includes: determining whether there are other gateway devices in the target network; if there are other gateway devices in the target network, determining a first device score of the other gateway devices and a second device score of the target gateway device; and if the second device score is greater than the first device score, registering the device service set to the target platform.
[0043] Before registering its service collection with the target platform, the target gateway device proactively detects the presence of other gateway devices in the target network. This identifies potential multi-gateway configurations in the network environment, preventing subsequent registration conflicts. Upon detecting other gateway devices, the target gateway device further evaluates its own score (second device score) and the scores of other gateway devices (first device score). The device score is a quantitative assessment of the gateway device's capabilities based on a series of preset criteria, which may include, but are not limited to, factors such as gateway processing power, network stability, device management capabilities, and historical reliability.
[0044] If the target gateway device's second device score is higher than the first device score of other gateway devices, the target gateway device will execute the process of registering the device service set with the target platform. That is, the gateway device with the higher score will be given priority in service registration, which helps optimize the allocation of network resources and improves the registration efficiency and reliability of the device service set.
[0045] Through the above embodiments, intelligent and efficient registration of device service sets is achieved in a multi-gateway environment, avoiding unnecessary conflicts and resource waste, while enhancing the stability of the smart home network and the reliability of service calls.
[0046] Optionally, determining a second device score for the target gateway device includes: acquiring device information of the target gateway device across multiple dimensions; determining a first weight of the device information according to the scoring rules of the gateway device; adjusting the first weight according to the weight adjustment rules to obtain a second weight; and determining the second device score based on the device information and the corresponding second weight.
[0047] In this embodiment, multi-dimensional device information is collected from the target gateway device. This device information includes, but is not limited to, the device's hardware configuration (such as CPU performance and memory size), software version, network connectivity, historical operational data (such as latency and packet loss rate), security performance, and energy consumption. Each piece of device information is assigned a primary weight according to predefined gateway device scoring rules. For example, CPU performance may be given a higher weight because it directly affects the device's processing power and response speed.
[0048] After determining the first weight, it is adjusted according to the weight adjustment rules to obtain the second weight. These rules can dynamically adjust the importance of each dimension of information based on factors such as device usage scenarios, time, and user needs. For example, during peak hours, the weight of network connectivity will be increased because network stability and bandwidth are crucial for a good user experience. Finally, based on the collected device information and the adjusted second weight, a second device score for the target gateway device is calculated.
[0049] The above embodiments help the system dynamically adjust the role and load of gateway devices, ensure the reasonable allocation of network resources, and improve the overall operating efficiency and user experience of the system.
[0050] Optionally, obtaining the device type and device function attributes of the target device includes: obtaining multimodal feature information of the target device, wherein the multimodal feature information includes at least one of the following: hardware features, software features, and runtime behavior features; fusing the multimodal feature information to generate an identity feature vector of the target device; comparing the identity feature vector with a preset feature vector based on a target comparison algorithm to determine the comparison result, wherein the preset feature vector is a legitimate identity feature vector; and obtaining the device type and device function attributes of the target device when the comparison result indicates that the similarity between the identity feature vector and the preset feature vector is greater than a preset threshold.
[0051] In this embodiment, multimodal feature information is collected from the target device. This multimodal feature information includes, but is not limited to, hardware features (such as device model and hardware configuration), software features (such as operating system version and installed applications), and runtime behavior features (such as network traffic, runtime, and energy consumption). The collected multimodal feature information is then fused to generate the target device's identity feature vector. The fusion process involves data preprocessing, feature extraction, and feature fusion techniques.
[0052] The generated identity feature vector is compared with a preset set of legal identity feature vectors. This comparison can be achieved using target comparison algorithms, including but not limited to Euclidean distance, cosine similarity, and machine learning classifiers. If the comparison result indicates that the similarity between the identity feature vector and the preset feature vector is greater than a preset threshold, meaning the target device's identity is legal, further steps can be taken to obtain the device type and functional attributes.
[0053] Only after the device's legitimacy has been verified will the system continue to obtain the device's type and functional attributes for subsequent service abstraction and registration.
[0054] The fusion processing of multimodal feature information in this embodiment improves the accuracy and robustness of device identification, while the legality verification based on the comparison algorithm effectively prevents unauthorized devices from accessing the network and ensures network security.
[0055] Optionally, registering the device service set to the target platform includes: encrypting the device service set based on the key of the target device; and sending the encrypted device service set to the target platform to register the device service set to the target platform.
[0056] Before a collection of device services is registered with the target platform, it is encrypted using the target device's key. This key can be a unique security key of the target device, such as the private key in a public-private key pair generated by the device, or a special key assigned to the device by the system. The encryption process converts critical information within the collection of device services into ciphertext, ensuring that even if the data is intercepted during transmission, it cannot be easily deciphered, thus improving data security.
[0057] Once encrypted, the set of device services is sent to the target platform via a secure communication protocol to complete the registration of the service set. This communication protocol includes, but is not limited to, secure protocols such as SSL / TLS, which not only ensures encrypted data transmission but also provides additional guarantees for data integrity and authentication, further enhancing the security of the entire registration process.
[0058] The embodiments of this application ensure the security of data transmission and the legitimacy of device identity.
[0059] Optionally, after registering the device service set to the target platform, the method further includes: receiving response information from the target platform; if the response information indicates that registration failed, determining whether the device service set has been registered to the target platform; and if the device service set has not been registered to the target platform, registering the device service set to the target platform again.
[0060] After the device service set is sent to the target platform and registration is attempted, the gateway device will wait for the response information from the target platform. The response information may contain various status codes to indicate whether the service registration was successful or not, as well as the specific reason for failure.
[0061] Upon receiving the response from the target platform, the system checks the status code in the response to determine whether the registration of the device service set was successful. If the status code indicates registration failure, it checks whether the device service set has already been registered with the target platform. This approach takes into account potential platform delays or temporary malfunctions, ensuring that the service registration result is not misjudged due to brief anomalies.
[0062] If the check results show that the device service set has indeed failed to register with the target platform, the solution will attempt to re-initiate the registration process. This retry mechanism can handle situations such as momentary network instability or the platform being temporarily unable to accept requests, improving the reliability and success rate of service registration.
[0063] The embodiments of this application can ensure that the device service set is successfully registered to the target platform. By timely response information acquisition, detailed registration status checks and necessary retry operations, it effectively improves the efficiency of the device service process and user experience in the smart home system.
[0064] To better understand the process of the above-mentioned device service registration method, the implementation flow of the above-mentioned device service registration method will be described below in conjunction with optional embodiments, but it is not intended to limit the technical solution of the embodiments of this application.
[0065] This embodiment provides a device service registration system. Figure 3 This is a system architecture diagram of a device service registration method according to an embodiment of this application, such as... Figure 3 As shown, it includes:
[0066] Cloud service platform: Located at the center of the architecture, it is the core of the entire system.
[0067] The cloud service platform is responsible for service registration, service conflict management, and service query.
[0068] External network: The cloud service platform connects to the outside world through the external network.
[0069] Service Gateway (equivalent to the target device gateway in the above embodiments): The cloud service platform connects to the local area network through the service gateway. Figure 3 The text displays multiple service gateways (service gateway 1, service gateway 2, ..., service gateway n).
[0070] It should be noted that one or more service gateways are deployed within the local area network, which are responsible for searching and discovering local smart devices; parsing the type of smart devices, extracting smart device attributes, abstracting them into corresponding services based on device type and device attributes, and registering the abstracted services to the cloud service platform.
[0071] The abstracted service fields include: {serv_id:xxx;serv_name:xxx;serv_type:xxx;serv_devid:xxx;serv_location:xxx;serv_attr:xxx;serv_value:xxx}.
[0072] Serv_id: The ID automatically generated during service registration;
[0073] Serv_name: The name of the service;
[0074] Serv_type: The type of service, such as temperature service, humidity service, voice microphone service, display screen service, etc.;
[0075] Serv_devid: The device ID of the device where the service resides;
[0076] Serv_location: The location of the service on the device, such as the living room, dining room, master bedroom, etc.;
[0077] Serv_attr, serv_value: The attribute name and value of the service; for example, humidity service, humidity:66%.
[0078] Local Area Network (LAN): The service gateway connects to the LAN, which connects various devices.
[0079] Equipment: The local area network connects air conditioners, televisions, speakers, and other devices not specifically listed.
[0080] Applications: Different applications run on the cloud service platform, including scenario applications, AI applications, big data applications, and other applications.
[0081] It should be noted that each application can check which services have been registered on the cloud service platform and can use them directly.
[0082] This embodiment provides a method for registering device services. Figure 4 This is a timing diagram of a device service registration method according to an embodiment of this application, such as... Figure 4 As shown, it includes:
[0083] Step S401: The smart device connects to the local area network;
[0084] Smart devices, such as air conditioners and refrigerators, connect to the home network via wireless or wired connections, becoming nodes in the network.
[0085] Step S402: The local gateway detects and identifies smart devices;
[0086] The local gateway device initiates a LAN scan and uses device discovery protocols (such as MDNS and UPnP) to locate smart devices within the network.
[0087] Step S403: The local gateway determines the type and functional attributes of the smart device;
[0088] The local gateway analyzes the detected smart devices, identifies their type and functional attributes, such as confirming that the air conditioner has a temperature and humidity sensor, and the refrigerator has a built-in microphone and speaker.
[0089] Step S404: The local gateway abstracts the device functional attributes into service modules;
[0090] Based on the type and functional attributes of the devices, the local gateway abstracts specific device attributes into service modules. For example, the temperature and humidity sensors of an air conditioner are abstracted into an environmental monitoring service, while the microphone and speaker of a refrigerator are transformed into a voice interaction service.
[0091] Step S405: Register the service module with the cloud service platform;
[0092] The abstracted service module registers with the designated cloud service platform through a secure data transmission channel, submitting the device type and corresponding service information.
[0093] The cloud service platform receives and processes service registration requests. If a service for the same device has already been registered by another gateway, the platform will notify subsequent registration requesters to avoid duplicate registrations and will record all valid service registration information.
[0094] Step S406: Service registration information update and synchronization.
[0095] The cloud service platform maintains a global service registration database. When a gateway goes offline, the platform automatically detects and updates the service registration status to ensure that the service is always proxied by the online gateway device, thus maintaining high availability and consistency of smart home applications.
[0096] Through the above steps, the functional attributes of smart devices are presented in the form of services in the smart home system, which not only improves the interoperability between devices, but also optimizes the development process of scenario applications and realizes the effective integration and utilization of software and hardware resources.
[0097] This embodiment provides an application method for device services. Figure 5 This is a timing diagram of the application method of device service according to the embodiments of this application, such as... Figure 5 As shown, it includes:
[0098] Step S501: The local gateway detects and identifies smart devices;
[0099] Step S502: Register the service to the cloud service platform.
[0100] The functions of smart devices are automatically registered to the device service management database on the cloud platform through the local gateway in the form of service modules. In other words, the specific functions of the device are transformed into service resources that can be invoked by applications.
[0101] Step S503: The APP application queries and calls the registration service;
[0102] The smart home app, based on user account permissions, sends a request to the cloud platform to query the service modules registered for all smart devices bound to that user account.
[0103] Based on the service type queried, the application intelligently matches or writes application logic to dynamically invoke device services. For example, when the voice wake-up service of a smart kitchen refrigerator is registered, the app can automatically trigger associated scene operations, such as the preset action of opening the refrigerator door or initiating a voice query for a shopping list.
[0104] Step S504: Service type determination and application triggering.
[0105] After a service is found, the app will automatically analyze the service type and assess whether it meets the preset application triggering conditions. For example, under specific time and environmental conditions, the smart refrigerator's voice wake-up service can be activated to execute relevant scenarios or associated operations.
[0106] Based on the service type and application logic, the APP application can flexibly write or adjust its own functions to achieve interaction with smart devices and automatic triggering of smart scenarios.
[0107] Through the above steps, the smart home app can efficiently query and access the services registered by the devices, achieving seamless integration between devices and applications, and providing users with a more intelligent, convenient, and personalized home experience.
[0108] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0109] Figure 6 This is a structural block diagram of a device service registration apparatus according to an embodiment of this application; as shown below. Figure 6 As shown, it includes:
[0110] The acquisition module 62 is used to acquire the device type and device function attributes of the target device when the target device is connected to the target network;
[0111] The determining module 64 is used to determine the set of device services corresponding to the target device based on the device type and the device functional attributes, wherein the set of device services includes one or more device services;
[0112] Registration module 66 is used to register the device service set to the target platform so that when the target object uses the target function, it can call the target device service corresponding to the target function in the target application. The device service set includes the target device service. After the device service is registered to the target platform, the device service is displayed in the target application.
[0113] By identifying and extracting the functional attributes of devices and converting them into a unified set of services, the development process of scenario applications is simplified. For example, when a smart air conditioner connects to the home network, the system automatically detects and obtains its temperature and humidity control functions, then abstracts these functions into "temperature regulation service" and "humidity regulation service." These services are registered to the cloud platform, becoming callable resources for smart home applications. The service set registered to the target platform frees scenario applications from being limited to specific hardware devices; instead, they can directly call the corresponding services based on the required functions, regardless of which device provides the service. This not only improves the flexibility and scalability of applications but also reduces development and maintenance costs. For example, when developing an "environmental comfort optimization" scenario application, developers do not need to know the detailed information of all devices in the home; they only need to call the "temperature regulation service" and "humidity regulation service," and the application can automatically adapt to any device providing these services, whether it is an air conditioner, humidifier, or other smart device. In summary, the embodiments of this application solve the problem in related technologies where smart devices are managed as independent entities, leading to complex development of smart home scenario applications.
[0114] In an exemplary embodiment, the determining module 64 is configured to determine the attribute type corresponding to each device functional attribute according to the device type, and determine the device service set by one of the following methods: determining the device service corresponding to each attribute type through a service abstraction model, and determining the device service corresponding to each attribute type as the device service set; or determining the device service corresponding to each attribute type according to the mapping relationship between attribute type and service type, and determining the device service corresponding to each attribute type as the device service set.
[0115] In one exemplary embodiment, the registration module 66 is configured to determine whether other gateway devices exist in the target network; if other gateway devices exist in the target network, determine a first device score of the other gateway devices and a second device score of the target gateway device; if the second device score is greater than the first device score, register the device service set to the target platform.
[0116] In an exemplary embodiment, the registration module 66 is configured to acquire device information of the target gateway device in multiple dimensions; determine a first weight of the device information according to the scoring rules of the gateway device; adjust the first weight according to the weight adjustment rules to obtain a second weight; and determine the second device score according to the device information and the corresponding second weight.
[0117] In an exemplary embodiment, the acquisition module 62 is configured to acquire multimodal feature information of the target device, wherein the multimodal feature information includes at least one of the following: hardware features, software features, and runtime behavior features; fuse the multimodal feature information to generate an identity feature vector of the target device; compare the identity feature vector with a preset feature vector based on a target comparison algorithm to determine the comparison result, wherein the preset feature vector is a legitimate identity feature vector; and if the comparison result indicates that the similarity between the identity feature vector and the preset feature vector is greater than a preset threshold, acquire the device type and device functional attributes of the target device.
[0118] In one exemplary embodiment, the registration module 66 is configured to encrypt the device service set based on the key of the target device; and send the encrypted device service set to the target platform to register the device service set to the target platform.
[0119] In one exemplary embodiment, the registration module 66 is configured to receive response information from the target platform; if the response information indicates registration failure, determine whether the device service set has been registered to the target platform; and if the device service set has not been registered to the target platform, re-register the device service set to the target platform.
[0120] Embodiments of this application also provide a storage medium including a stored program, wherein the program executes any of the methods described above when it is run.
[0121] Optionally, in this embodiment, the storage medium may be configured to store program code for performing the following steps:
[0122] S1, when the target device is connected to the target network, obtain the device type and device function attributes of the target device;
[0123] S2, determine the device service set corresponding to the target device according to the device type and the device functional attributes, wherein the device service set includes one or more device services;
[0124] S3, register the device service set to the target platform so that when the target object uses the target function, it can call the target device service corresponding to the target function in the target application. The device service set includes the target device service. After registering the device service to the target platform, the device service is displayed in the target application.
[0125] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0126] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0127] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0128] S1, when the target device is connected to the target network, obtain the device type and device function attributes of the target device;
[0129] S2, determine the device service set corresponding to the target device according to the device type and the device functional attributes, wherein the device service set includes one or more device services;
[0130] S3, register the device service set to the target platform so that when the target object uses the target function, it can call the target device service corresponding to the target function in the target application. The device service set includes the target device service. After registering the device service to the target platform, the device service is displayed in the target application.
[0131] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0132] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0133] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0134] The embodiments described herein also provide a computer program that includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in any of the above method embodiments.
[0135] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0136] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0137] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for registering device services, characterized in that, Applied to target gateway devices, including: When the target device is connected to the target network, obtain the device type and device function attributes of the target device; The set of device services corresponding to the target device is determined based on the device type and the device functional attributes, wherein the set of device services includes one or more device services; The device service set is registered with the target platform so that when the target object uses the target function, it can call the target device service corresponding to the target function in the target application. The device service set includes the target device service. After the device service is registered with the target platform, the device service is displayed in the target application.
2. The device service registration method according to claim 1, characterized in that, The set of device services corresponding to the target device is determined based on the device type and the device functional attributes, including: Based on the device type, determine the attribute type corresponding to each device functional attribute, and determine the device service set using one of the following methods: The device service corresponding to each attribute type is determined by the service abstraction model, and the device service corresponding to each attribute type is determined as the set of device services. The device service corresponding to each attribute type is determined based on the mapping relationship between attribute type and service type, and the device service corresponding to each attribute type is determined as the set of device services.
3. The device service registration method according to claim 1, characterized in that, Registering the device service collection to the target platform includes: Determine whether other gateway devices exist in the target network; If other gateway devices exist in the target network, determine the first device score of the other gateway devices and the second device score of the target gateway device; If the second device score is greater than the first device score, the set of device services will be registered to the target platform.
4. The device service registration method according to claim 3, characterized in that, Determining the second device score of the target gateway device includes: Obtain device information of the target gateway device from multiple dimensions; The first weight of the device information is determined according to the scoring rules of the gateway device, and the first weight is adjusted according to the weight adjustment rules to obtain the second weight; The second device score is determined based on the device information and the corresponding second weight.
5. The device service registration method according to claim 1, characterized in that, Obtaining the device type and device function attributes of the target device includes: The multimodal feature information of the target device is obtained, wherein the multimodal feature information includes at least one of the following: hardware features, software features, and runtime behavior features; The multimodal feature information is fused to generate the identity feature vector of the target device; The identity feature vector is compared with a preset feature vector based on a target comparison algorithm to determine the comparison result, wherein the preset feature vector is a legitimate identity feature vector; If the comparison result indicates that the similarity between the identity feature vector and the preset feature vector is greater than a preset threshold, the device type and device function attributes of the target device are obtained.
6. The device service registration method according to claim 1, characterized in that, Registering the device service collection to the target platform includes: The device service set is encrypted based on the key of the target device; The encrypted set of device services is sent to the target platform to register the set of device services with the target platform.
7. The device service registration method according to claim 1, characterized in that, After registering the device service set to the target platform, the method further includes: Receive the response information from the target platform; If the response information indicates that registration failed, determine whether the device service set has been registered to the target platform; If the device service set has not been registered to the target platform, the device service set will be registered to the target platform again.
8. A device for registering equipment services, characterized in that, include: The acquisition module is used to acquire the device type and device function attributes of the target device when the target device is connected to the target network. The determining module is configured to determine the set of device services corresponding to the target device based on the device type and the device functional attributes, wherein the set of device services includes one or more device services; The registration module is used to register the set of device services to the target platform, so that when the target object uses the target function, it can call the target device service corresponding to the target function in the target application. The set of device services includes the target device service. After the device service is registered to the target platform, the device service is displayed in the target application.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method described in any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 7 through the computer program.