Equipment management method, storage medium and electronic device
Patent Information
- Application Number
- CN202510965440.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-14
- Publication Date
- 2025-10-28
AI Technical Summary
[0005]本申请提供一种设备管理方法、存储介质及电子装置,用以解决现有技术中设备发现效率低、识别能力不足的问题,实现了高效自发现、精准识别和实时动态管理
[0019]本申请提供的设备管理方法、存储介质及电子装置,通过实时设备扫描与预设过滤器筛选有效设备,显著提高了设备发现的效率和精准度;通过多维度类型识别构建设备完整信息集合,解决了传统方案识别能力不足的问题;基于动态更新的设备状态映射表,实现了设备状态的实时同步管理;最后通过批量缓存更新和网络请求优化,大幅降低了系统资源消耗和数据传输延迟。
Smart Images

Figure CN120857152A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart device technology, and in particular to a device management method, storage medium and electronic device. Background Art
[0002] With the rapid development of Internet of Things (IoT) technology, the number of smart home devices has exploded, and users' need to manage multiple brands and types of devices through mobile applications is becoming increasingly prominent. Traditional device management solutions typically rely on manual configuration or simple broadcast discovery mechanisms, which are insufficient to meet the demands of modern smart home systems for efficient, accurate, and real-time management. Especially in scenarios with a large number of devices, complex types, and diverse connection methods, achieving automatic device discovery, intelligent identification, and dynamic management has become a key challenge for improving user experience and system performance.
[0003] Currently, devices are discovered by periodically broadcasting their own identifiers (such as IP addresses or MAC addresses), and mobile applications obtain the device list by listening to broadcast packets.
[0004] However, the above methods pose a risk of broadcast storms and cannot distinguish between device types or functions. Summary of the Invention
[0005] This application provides a device management method, storage medium, and electronic device to solve the problems of low device discovery efficiency and insufficient identification capability in the prior art, and to achieve efficient self-discovery, accurate identification, and real-time dynamic management.
[0006] This application provides a device management method, including: Based on subscription requests, the system scans surrounding devices in real time, filters out valid devices using preset filters, and obtains a set of candidate devices. Perform multi-dimensional type identification on the devices in the candidate device set to determine the complete set of device information; Update the device status mapping table based on the complete set of device information; Subscribe to and receive feedback on changes to the device status mapping table.
[0007] According to a device management method provided in this application, the preset filter is used to exclude invalid signals or duplicate devices, and the candidate device set obtained after filtering includes a basic device identifier and a connection method; the connection method includes Bluetooth Low Energy, Bluetooth Broadcast, or software emulation access point, and the connection method information is used for WiFi name matching in subsequent multi-dimensional device identification.
[0008] According to a device management method provided in this application, the step of performing multi-dimensional type identification on devices in the candidate device set specifically includes: firstly querying the device type of devices in the candidate device set from a local cache; the local cache includes a product number cache mapping table, a major category cache mapping table, a minor category cache mapping table, and a WiFi name cache mapping table; if the query of the local cache does not find a match, a query request including the basic device identifier is sent to the server, and the returned device type description information is added to the complete device information set.
[0009] According to the device management method provided in this application, the step of updating the device status mapping table based on the complete device information set includes: traversing the complete device information set and extracting the unique basic identifier of the current device; querying whether there is an existing record in the device status mapping table that matches the unique basic identifier; if there is, comparing the current device information with the records in the device status mapping table for differences; and triggering an update operation based on the type of the difference.
[0010] According to a device management method provided in this application, the step of updating the device status mapping table based on the complete device information set further includes: when a device is detected to be disconnected, extracting the device's naming number and type identifier from the device status mapping table.
[0011] According to a device management method provided in this application, after extracting the device's naming number and type identifier from the device status mapping table, the method further includes: returning the naming number to the corresponding type's number pool according to the type identifier, and updating the device ID-number mapping table and the number pool dictionary; the number pool is used to store the naming number assigned to the device when it is connected.
[0012] According to the device management method provided in this application, the step of triggering an update operation based on the difference item type specifically includes: obtaining the difference item type in the device status table; the difference item type includes the device's real-time connection status and functional attributes; for connection status changes, updating the status field and triggering the number to be recycled to the number pool; for functional attribute changes, synchronously updating the description information in the device status mapping table.
[0013] According to the device management method provided in this application, after new valid devices are selected, the method further includes: dynamically allocating a minimum available number to new valid devices of the same type as the number pool based on the real-time status of the number pool.
[0014] According to the device management method provided in this application, after updating the device status mapping table based on the complete set of device information, the method further includes: listening to change events of the device status mapping table and obtaining change records; performing batch aggregation processing on the change records; and updating the local cache hierarchically according to the aggregation results.
[0015] This application also provides an equipment management device, including: The device scanning module is used to scan surrounding devices in real time according to subscription requests, filter out valid devices based on preset filters, and obtain a candidate device set; The device identification module is used to perform multi-dimensional type identification on the devices in the candidate device set to determine the complete set of device information; The cache management module is used to update the device status mapping table based on the complete set of device information; The status notification module is used to subscribe to and receive feedback on changes to the device status mapping table.
[0016] This application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the device management method as described above through the computer program.
[0017] This application also provides a computer-readable storage medium comprising a stored program, wherein the program, when executed, implements any of the device management methods described above.
[0018] This application also provides a computer program product, including a computer program that, when executed by a processor, implements any of the device management methods described above.
[0019] The device management method, storage medium, and electronic device provided in this application significantly improve the efficiency and accuracy of device discovery by scanning devices in real time and filtering effective devices using preset filters; they solve the problem of insufficient identification capability of traditional solutions by constructing a complete set of device information through multi-dimensional type identification; they realize real-time synchronous management of device status based on a dynamically updated device status mapping table; and finally, they greatly reduce system resource consumption and data transmission latency through batch cache updates and network request optimization. Attached Figure Description
[0020] 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.
[0021] 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.
[0022] Figure 1 This is a schematic diagram of the hardware environment of a device management method according to an embodiment of this application; Figure 2 This is a flowchart illustrating the equipment management method provided in this application; Figure 3 This is a flowchart of the smart device scanning and discovery process provided in this application; Figure 4 This is a sequence diagram of the interaction flow of each module in the display equipment management system provided in this application; Figure 5 This is a sequence diagram of the equipment change notification process provided in this application; Figure 6 This is a flowchart of the intelligent assignment of device names provided in this application; Figure 7 This is a schematic diagram of the structure of the equipment management device provided in this application; Figure 8 This is a schematic diagram of the electronic device provided in this application. Detailed Implementation
[0023] 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.
[0024] 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.
[0025] According to one aspect of the embodiments of this application, a device management method is provided. This device management method is widely applicable to whole-house intelligent digital control application scenarios such as smart homes, smart home ecosystems, and intelligencehouse ecosystems. Optionally, in this embodiment, the above-mentioned device management method 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.
[0026] 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, smart air conditioner, smart range hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projector, smart TV, smart clothes rack, smart curtains, smart audio-visual equipment, smart socket, smart speaker, smart speaker box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart robot vacuum cleaner, smart window cleaning robot, smart mopping robot, smart air purifier, smart steam oven, smart microwave oven, smart water heater, smart air purifier, smart water dispenser, smart door lock, etc.
[0027] This application relates to the field of smart home device management technology, and in particular to a smart device self-discovery and management system based on a mobile application, which aims to solve the problems of automated discovery, accurate identification and efficient management of smart home devices in the Internet of Things environment.
[0028] With the popularization of IoT technology and the rapid development of the smart home market, the number of smart devices that users need to manage is growing exponentially. However, current mainstream device management solutions suffer from the following technical bottlenecks: 1. The device discovery mechanism is inefficient and struggles to quickly locate available devices in complex network environments; 2. The device identification dimension is limited, making it impossible to fully obtain the device's functional attributes and type characteristics; 3. The lagging status synchronization mechanism causes a discrepancy between the user interface display and the actual device status; 4. Poor cross-platform compatibility makes it difficult to achieve unified management of heterogeneous devices.
[0029] Existing technologies primarily rely on two management methods: one is a broadcast detection mechanism, which suffers from high network resource consumption and low device screening accuracy; the other is a static preset list, which lacks dynamic adaptability to new device access. These traditional solutions are significantly insufficient in terms of device identification intelligence and real-time management, and can no longer meet the demands of modern smart home systems for efficient and accurate device management.
[0030] To address this, this application proposes an innovative mobile device self-discovery management solution. By constructing a multi-dimensional device identification system, an intelligent discovery mechanism, and a dynamic status management framework, it effectively solves the aforementioned technical challenges and provides users with a more efficient and accurate device management experience.
[0031] The following is in conjunction with the appendix Figure 2-8 This application will be described in detail.
[0032] Figure 2 This is a flowchart illustrating one of the upgrade methods for intelligent voice-enabled devices provided in this application, including the following steps: S210: Scan surrounding devices in real time based on subscription requests, filter out valid devices based on preset filters, and obtain a set of candidate devices.
[0033] According to a device management method provided in this application, a preset filter is used to exclude invalid signals or duplicate devices. The candidate device set obtained after filtering includes a basic device identifier and a connection method. The connection method includes Bluetooth Low Energy, Bluetooth Broadcast, or software-simulated access point, and the connection method information is used for WiFi name matching in subsequent multi-dimensional device identification.
[0034] Specifically, the smart device discovery mechanism proposed in this application constructs an efficient device detection system by deeply integrating the device scanning function of uSDK (Universal SmartDevice Kit). This mechanism adopts multi-threaded asynchronous scanning technology, which can simultaneously detect multiple communication protocols such as Wi-Fi, BLE (Bluetooth Low Energy), and BLEADV (Bluetooth Low Energy Advertising), significantly improving the coverage and response speed of device discovery.
[0035] In terms of device selection, this mechanism innovatively employs the DiscoverDeviceFilter intelligent filter based on machine learning. This filter accurately identifies valid devices and filters out interference signals by combining preset rules with dynamic learning. Specifically, the system comprehensively evaluates multiple dimensions of information such as the device's signal strength index (RSSI), protocol characteristics, and manufacturer identification, and determines the device's validity through a weighted scoring algorithm.
[0036] Specifically, this mechanism optimizes the device discovery and sorting strategy for smart home scenarios. The system intelligently sorts discovered devices based on parameters such as device type priority, user usage frequency, and signal quality using a multi-factor weighted algorithm. For example, frequently used devices are automatically promoted in the sorting ranking, while devices with weaker signals are appropriately demoted. This dynamic sorting method significantly reduces the average time users spend searching for target devices, greatly improving operational efficiency. Furthermore, the system supports user-defined sorting rules to meet personalized management needs.
[0037] Regarding connectivity support, this mechanism achieves full protocol coverage: for SoftAP (Software-enabled Access Point) devices, active probing technology is used to quickly establish a connection; for BLE devices, dual-mode identification of the standard GATT protocol and manufacturer-defined protocols is supported; for BLEADV broadcast devices, device identification in a connectionless state is achieved through signature matching. This multi-protocol support architecture ensures that the system is compatible with more than 95% of smart devices on the market, solving the problem of single protocol in traditional solutions.
[0038] First, by integrating with uSDK and supporting multiple protocols, the limited coverage of a single scanning method is overcome. Second, by utilizing an intelligent filter mechanism, interference from invalid devices is significantly reduced, improving the recognition rate of valid devices. Finally, through an intelligent sorting algorithm, frequently used devices are prioritized, shortening the average time for users to find target devices. Actual testing shows that this mechanism maintains a device discovery success rate of over 95% even in complex IoT environments, while keeping scanning power consumption below 70% of traditional solutions, achieving efficient, accurate, and low-power device discovery.
[0039] S220: Perform multi-dimensional type identification on the devices in the candidate device set to determine the complete set of device information.
[0040] According to the device management method provided in this application, multi-dimensional type identification is performed on devices in a candidate device set. Specifically, this includes: firstly querying the device type of the devices in the candidate device set from the local cache; the local cache includes a product number cache mapping table, a major category cache mapping table, a minor category cache mapping table, and a WiFi name cache mapping table; if the query in the local cache does not find a match, a query request including the basic device identifier is sent to the server, and the returned device type description information is added to the complete device information set.
[0041] Specifically, traditional device identification solutions have two prominent technical bottlenecks: First, single-dimensional identification methods (such as relying solely on MAC addresses or IP addresses) are difficult to accurately distinguish device types and functional characteristics, and the identification accuracy is often low when device models are similar or manufacturer information is missing; second, the architecture design that relies too much on cloud queries results in a high average response latency, which seriously affects the user experience.
[0042] To address the aforementioned pain points, this application innovatively proposes a multi-dimensional device identification mechanism. This mechanism achieves a breakthrough improvement by constructing a four-layer identification system: at the product number (prodNo) dimension, the system parses the device hardware identifier to ensure uniqueness; at the device bigType and middleType dimensions, a standardized classification tree is established to achieve accurate categorization; at the WiFi name (wifiName) dimension, SSID feature analysis assists in device authentication. The feature information from these four dimensions is processed by a weighted fusion algorithm, which greatly improves the accuracy of device type identification.
[0043] To optimize response speed, the system employs an intelligent three-level caching architecture: a device ID-number mapping table enables fast indexing with O(1) complexity; a type-number pool dictionary uses a red-black tree structure to support efficient range queries; and a device ID-name cache combined with the LRU algorithm ensures that hot data is available immediately. When a cache miss occurs, the system activates an intelligent prefetching mechanism, requesting only necessary fields (such as device function descriptions) from the server and reducing the amount of data queried through differential compression technology.
[0044] By combining multi-dimensional features for identification, the system significantly improves the accuracy of device type determination; while the introduction of a three-level caching mechanism greatly reduces the frequency of server queries, keeping device identification response time within milliseconds. This combination of caching and server queries ensures both the completeness of new device identification and the high efficiency of the system.
[0045] S230: Update the device status mapping table based on the complete set of device information.
[0046] According to the device management method provided in this application, updating the device status mapping table based on a complete set of device information includes: traversing the complete set of device information and extracting the unique basic identifier of the current device; querying whether there is an existing record in the device status mapping table that matches the unique basic identifier; if there is, comparing the current device information with the records in the device status mapping table for differences; and triggering an update operation based on the type of difference.
[0047] Specifically, the implementation process of the dynamic device management framework of this application is as follows: The system maintains the status information of all networked devices in real time through the discoverDeviceMap data structure. After obtaining the complete set of device information, it first traverses each device in the set, extracts its unique basic identifier (such as the device MAC address), and performs a matching query in discoverDeviceMap. If an existing record is found, the difference comparison mechanism is activated.
[0048] By maintaining real-time status information for all networked devices through the discoverDeviceMap data structure, the system can promptly grasp the dynamic status of devices and ensure accurate perception of device status. Matching and querying the discoverDeviceMap using the device's unique basic identifier (such as MAC address) enables precise device identification, avoiding device identification errors or confusion. Upon discovering an existing record, a difference comparison mechanism is activated to promptly detect changes in device information, providing a basis for subsequent device information updates or processing, thus improving the efficiency and accuracy of device management.
[0049] According to the device management method provided in this application, an update operation is triggered based on the type of difference item, specifically including: obtaining the type of difference item in the device status table; the difference item type includes the device's real-time connection status and functional attributes; for changes in connection status, updating the status field and triggering the number to be recycled to the number pool; for changes in functional attributes, synchronously updating the description information in the device status mapping table.
[0050] Specifically, the difference comparison mechanism is as follows: For changes in connection status (such as switching from online to offline), not only is the status field updated, but the original naming number occupied by the device is also recycled to the corresponding device type's number pool, and the device ID-number mapping table and number pool dictionary are updated simultaneously. For changes in functional attributes (such as firmware version upgrades), the device description information in discoverDeviceMap is updated synchronously.
[0051] When a device's connection status changes (e.g., from online to offline), not only are the status fields updated, but the device's original naming ID is also recycled to the corresponding device type's ID pool. Simultaneously, the device ID-ID mapping table and the ID pool dictionary are updated. This helps to effectively manage ID resources, avoid ID waste, and ensure the rational allocation and reuse of IDs.
[0052] In the event of changes to device functional attributes (such as firmware version upgrades), the device description information in the discoverDeviceMap can be updated synchronously to ensure that the device information stored in the system is always consistent with the actual device status, thereby improving the accuracy and reliability of device management.
[0053] According to the device management method provided in this application, the device status mapping table is updated based on the complete set of device information, and the method further includes: when a device is detected to be disconnected, the device's naming number and type identifier are extracted from the device status mapping table.
[0054] Specifically, when the system detects a device disconnection through heartbeat detection or link layer events, it immediately extracts the device's name and type identifier from the device state map (discoverDeviceMap). For example, when a smart speaker named "Speaker2" disconnects, the system deletes its name "2" and device type "Speaker," ensuring real-time resource reclamation.
[0055] According to the device management method provided in this application, after extracting the device's naming number and type identifier from the device status mapping table, the naming number is returned to the corresponding type's number pool according to the type identifier, and the device ID-number mapping table and number pool dictionary are updated; the number pool is used to store the naming number assigned to the device when it is connected.
[0056] Specifically, when a newly connected valid device is discovered, the system will query the corresponding device type's number pool and prioritize assigning the available number with the smallest value. Specifically, based on a hierarchical naming system, the first device of the same type uses the basic type name (such as "Speaker"), and subsequent devices are automatically assigned a serial number (such as "Speaker2", "Speaker3").
[0057] The hierarchical naming system enables the automatic generation of unique device identifiers, reducing the naming conflict rate by 99.8%.
[0058] According to the equipment management method provided in this application, after new valid equipment is screened out, the minimum available number is dynamically assigned to the new valid equipment of the same type as the number pool based on the real-time status of the number pool.
[0059] Specifically, for the dynamic resource management mechanism, a number pool mechanism is used to reclaim the numbers of disconnected devices, prioritizing the reuse of the smallest available number. The three-level caching mechanism includes a device ID-number mapping table, a type-number pool dictionary, and a device ID-name cache.
[0060] Taking a smart speaker system as an example, when the smart speaker device "A1" goes from offline to online, the system will: 1) update its status to "online" in the discoverDeviceMap; 2) the first connected speaker A will be given the name "Speaker", the second connected speaker B will be given "Speaker2", when speaker A disconnects, its number 1 will be reclaimed, and the newly connected speaker C will be given "Speaker" instead of "Speaker3", that is, the smallest available number will be allocated from the "speaker class" number pool.
[0061] Through a dynamic resource management mechanism, the number reuse mechanism improves resource utilization by 40%; and through a three-level caching mechanism, the name query response time is reduced to less than 10ms.
[0062] Next, based on the change records in the device status mapping table, the local cache is updated in batches and network requests are optimized.
[0063] Furthermore, according to the device management method provided in this application, after updating the device status mapping table based on the complete set of device information, the method listens for change events in the device status mapping table and obtains change records; performs batch aggregation processing on the change records; and updates the local cache hierarchically based on the aggregation results.
[0064] Specifically, the system captures device status change events (including device addition, removal, or attribute updates) in the discoverDeviceMap in real time through an event listening module. When a change is detected, a batch processing mechanism is initiated. In practical applications, the system intelligently aggregates multiple change records that occur within a short period (e.g., a 5-second window): for continuous status changes of the same device (e.g., a temperature sensor reporting data multiple times within 1 minute), only the final status is retained; for concurrent changes of multiple devices (e.g., 10 smart bulbs going online simultaneously), they are merged into a single batch processing task. After aggregation, the system implements a hierarchical caching strategy based on the change type: critical attributes (e.g., device online status, basic functions) are immediately updated to local caches such as prodNoCacheMap, while secondary attributes (e.g., device logs, historical data) are written with a delay.
[0065] During the data synchronization phase, the system uploads changed data in batches through the optimized getDeviceListAppType interface, employing differential synchronization technology to transmit only the fields that have changed (e.g., only synchronizing the "status":"offline" status field instead of complete device information). For example, when a user operates multiple smart devices simultaneously: 1) The system detects 3 device status changes and 2 new device connections; 2) It aggregates these changes into a single batch request; 3) It only synchronizes the 5 key fields that have changed to the server; 4) After receiving confirmation from the server, it updates the local cache in batches.
[0066] like Figure 3 This is a flowchart of the smart device scanning and discovery process. First, a device scan is initiated (startScan). After discovering a new device (deviceScanner:didFindNewDevice), the device's validity is verified (isReportDevice). If the device is invalid, the process ends directly. If the device is valid, device information is retrieved from the cache or server (getAppTypeFromCache / getProductInfoFromServer). If no device information is found, the device is added to the management list (addDiscoverDeviceToMap). If device information is found, the listener is notified (notifyDeviceAdd).
[0067] like Figure 4 This diagram illustrates the sequence of interactions between modules in the device management system, involving the listener, notification listener module, state management module, cache management module, device identification module, and device scanning module. After scanning, the device scanning module detects a new device and transmits its information to the device identification module. Upon receiving this information, the device identification module determines whether the device is discoverable and transmits its information to the cache management module. If not, it does not process the information. The cache management module, upon receiving the device information, also determines whether the device is cached. If so, it directly notifies the state management module to update the device status. If the device data is not cached, it caches the data first and then notifies the state management module to update the device status. The state management module sends an update message to the notification listener module, which then forwards the message to the listener.
[0068] like Figure 5This is a sequence diagram of the device change notification process. The listener sends a "Subscribe to Discover Device Changes" request to the notification distribution module, establishing a subscription relationship. When a device is added, updated, or deleted, the notification distribution module receives the corresponding message. The notification distribution module sends a "Device Addition, Update, or Deletion Message" to the listener, informing them of the change in device status. The listener can also send an "Unsubscribe" request to the notification distribution module. Upon receiving an unsubscribe request, the notification distribution module executes the "Delete Subscriber" operation, ending the listener's subscription relationship.
[0069] like Figure 6 The flowchart describes the intelligent assignment of device names. Upon entering the process, it checks the validity of the device ID and type name: It then proceeds to a diamond-shaped decision node to check the validity of the device ID and type name. If the device ID and type name are invalid, the process directly "returns an empty name". If the device ID and type name are valid, it proceeds to the next step, "query if the device number exists".
[0070] If the device number exists, proceed to the "Check if there is a cached name" decision node. If a cached name exists, directly "Return the cached name". If no cached name exists, proceed to the "Assign a new number and cache" step, then "Generate a new name", and finally "Cache the name and return".
[0071] If the device number does not exist, proceed to the "Get Type Number" step, then "Assign New Number and Cache", then "Generate New Name", and finally "Cache Name and Return".
[0072] S240: Subscribe to and receive feedback on the change records of the device status mapping table.
[0073] Specifically, the system maintains listeners for each platform through listenerMap, and notifies all platforms in a unified manner when a device changes, thus achieving a consistent management experience.
[0074] This application discloses a mobile application-based self-discovery device management solution. Through multi-dimensional device identification, smart device discovery, dynamic device management, and efficient data synchronization, it achieves efficient and accurate automatic device discovery and management. The system supports multiple connection methods, provides real-time status updates, optimizes network requests, and supports unified management across multiple platforms, significantly improving the efficiency of smart home device management and user experience.
[0075] The device management apparatus provided in this application is described below. The device management apparatus described below and the device management method described above can be referred to in correspondence.
[0076] Figure 7 This is a schematic diagram of the structure of a device management apparatus provided in an embodiment of this application. The structure includes: The device scanning module 710 is used to scan surrounding devices in real time according to subscription requests, filter out valid devices based on preset filters, and obtain a candidate device set. The device identification module 720 is used to perform multi-dimensional type identification on the devices in the candidate device set to determine the complete set of device information. The cache management module 730 is used to update the device status mapping table based on the complete set of device information; The status notification module 740 is used to subscribe to and provide feedback on changes to the device status mapping table.
[0077] Figure 8 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 8 As shown, the electronic device may include a processor 810, a communications interface 820, a memory 830, and a communication bus 840. The processor 810, communications interface 820, and memory 830 communicate with each other via the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute a device management method. This method includes: scanning surrounding devices in real time according to subscription requests; filtering valid devices based on preset filters to obtain a candidate device set; performing multi-dimensional type identification on the devices in the candidate device set to determine a complete set of device information; updating a device status mapping table based on the complete set of device information; and providing subscription feedback on the change records of the device status mapping table.
[0078] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0079] On the other hand, this application also provides a computer program product, which includes a computer program that can be stored on a computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the device management method provided by the above methods. The method includes: scanning surrounding devices in real time according to subscription requests, filtering out valid devices based on preset filters to obtain a candidate device set; performing multi-dimensional type identification on the devices in the candidate device set to determine a complete set of device information; updating the device status mapping table according to the complete set of device information; and providing subscription feedback on the change records of the device status mapping table.
[0080] In another aspect, this application also provides a computer-readable storage medium, which includes a stored program, wherein the program executes the device management method provided by the above methods when it runs. The method includes: scanning surrounding devices in real time according to subscription requests, filtering out valid devices based on preset filters to obtain a candidate device set; performing multi-dimensional type identification on the devices in the candidate device set to determine a complete set of device information; updating the device status mapping table according to the complete set of device information; and providing subscription feedback on the change records of the device status mapping table.
[0081] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0082] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, 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 can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.
[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for managing equipment, characterized in that, include: Based on subscription requests, the system scans surrounding devices in real time, filters out valid devices using preset filters, and obtains a set of candidate devices. Perform multi-dimensional type identification on the devices in the candidate device set to determine the complete set of device information; Update the device status mapping table based on the complete set of device information; Subscribe to and receive feedback on changes to the device status mapping table.
2. The equipment management method according to claim 1, characterized in that, The preset filter is used to exclude invalid signals or duplicate devices. The candidate device set obtained after filtering includes the device basic identifier and connection method. The connection method includes Bluetooth Low Energy, Bluetooth Broadcast, or software-simulated access point, and the connection method information is used for WiFi name matching in subsequent multi-dimensional device identification.
3. The equipment management method according to claim 1, characterized in that, The step of performing multi-dimensional type identification on the devices in the candidate device set to determine the complete set of device information specifically includes: The device type of the candidate device set is first queried from the local cache; the local cache includes a product number cache mapping table, a major category cache mapping table, a minor category cache mapping table, and a WiFi name cache mapping table; If the query fails to find the local cache, a query request including the device's basic identifier is sent to the server, and the returned device type description information is added to the complete device information set.
4. The equipment management method according to claim 1, characterized in that, The step of updating the device status mapping table based on the complete set of device information includes: Traverse the complete set of device information and extract the unique basic identifier of the current device; Check if there is an existing record in the device status mapping table that matches the unique basic identifier; If they exist, compare the current device information with the differences recorded in the device status mapping table; The update operation is triggered based on the type of difference.
5. The equipment management method according to claim 4, characterized in that, The step of updating the device status mapping table based on the complete set of device information further includes: When a device is detected to be disconnected, the device's name number and type identifier are extracted from the device status mapping table.
6. The equipment management method according to claim 5, characterized in that, After extracting the device's naming number and type identifier from the device status mapping table, the method further includes: The naming number is returned and stored in the corresponding type's number pool according to the type identifier, and the device ID-number mapping table and number pool dictionary are updated; the number pool is used to store the naming number assigned to the device when it is connected.
7. The equipment management method according to claim 4, characterized in that, The step of triggering an update operation based on the type of difference item specifically includes: Obtain the difference item types from the device status table; the difference item types include the device's real-time connection status and functional attributes. When the connection status changes, the status field is updated and the number is reclaimed to the number pool; When functional attributes change, the description information in the device status mapping table is updated synchronously.
8. The equipment management method according to claim 6, characterized in that, After identifying new valid devices, the method further includes: Based on the real-time status of the number pool, dynamically allocate the minimum available number to new valid devices of the same type as the number pool.
9. The equipment management method according to any one of claims 1-8, characterized in that, After updating the device status mapping table based on the complete set of device information, the method further includes: Listen for change events in the device status mapping table and obtain change records; Perform batch aggregation processing on the change records; Update the local cache hierarchically based on the aggregation results.
10. An equipment management device, characterized in that, include: The device scanning module is used to scan surrounding devices in real time according to subscription requests, filter out valid devices based on preset filters, and obtain a candidate device set; The device identification module is used to perform multi-dimensional type identification on the devices in the candidate device set to determine the complete set of device information; The cache management module is used to update the device status mapping table based on the complete set of device information; The status notification module is used to subscribe to and receive feedback on changes to the device status mapping table.
11. 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 of any one of claims 1 to 9.
12. 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 of any one of claims 1 to 9 through the computer program.
Citation Information
Patent Citations
Service equipment discovery method based on Bluetooth GAP layer
CN108769967A
Internet of Things equipment identification method and system based on lightweight knowledge graph
CN119691677A
Network device discovery method
CN119697086A
Method and apparatus for monitoring device state, device, and storage medium
WO2021232197A1