Methods, systems, electronic devices, and storage media for determining the protocol library
By identifying device protocol requirements and generating evidence of protocol incompatibility in a home host system, and selecting a suitable protocol library, the problem of time-consuming and resource-intensive protocol library updates in existing technologies is solved, achieving efficient and reliable protocol library selection and deployment.
Patent Information
- Application Number
- CN202611618755.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-20
- Publication Date
- 2026-11-17
AI Technical Summary
Existing technologies for updating protocol libraries in home consoles typically rely on protocol identifiers, device models, or version numbers, resulting in significant time and resource consumption. Furthermore, the failure results of candidate protocol libraries cannot effectively guide the selection of subsequent versions, and cannot guarantee the reliable deployment of protocol libraries in real home device environments.
The home host determines the device protocol requirements of smart devices, selects multiple candidate protocol libraries from a pre-set protocol repository, and verifies them. When the verification fails, it generates protocol incompatibility evidence information and filters out incompatible candidate protocol libraries based on this information until a target protocol library that meets the requirements is found.
It improves the efficiency and accuracy of protocol library selection, avoids repeated downloads and trying unsuitable versions, and ensures reliable deployment of the protocol library in home device environments.
Smart Images

Figure CN123123055A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of smart home, specifically relating to a method, system, electronic device, and storage medium for determining a protocol library. Background Technology
[0002] In related technologies, home hosts need to support new devices or new protocol versions, and generally the protocol library is maintained in the cloud according to the protocol identifier, device model or version number.
[0003] When a home host discovers that it does not have the corresponding protocol library locally, or that the existing version is too old, it downloads the specified version or the latest version from the cloud. Once the file integrity, signature, and dynamic loading interface checks pass, the currently running version is replaced with the downloaded protocol library.
[0004] In some technologies, certain solutions store several historical versions in the cloud. When the latest version becomes unusable, the home host downloads the next newer version until the protocol library is usable. This method can sometimes be very time-consuming and resource-intensive. Summary of the Invention
[0005] In view of the above problems, a method, system, electronic device, and storage medium for determining a protocol library are proposed to overcome or at least partially solve the above problems, including: A method for determining a protocol library, applied to a home host that is communicatively connected to a smart device, the method comprising: Determine the device protocol requirement characteristics of the smart device, and based on the device protocol requirement characteristics, determine multiple first candidate protocol libraries from a preset protocol repository; From multiple first candidate protocol libraries, a second candidate protocol library is determined, and the second candidate protocol library is verified. When the verification of the second candidate protocol library fails, evidence of protocol incompatibility against the second candidate protocol library is generated. Based on the evidence of protocol incompatibility, a new second candidate protocol library is determined from the remaining first candidate protocol library until the new second candidate protocol library is verified and the verified second candidate protocol library is used as the target protocol library.
[0006] In some embodiments, generating protocol incompatibility evidence information for the second candidate protocol library includes: Determine the failure stage where the second candidate protocol library verification fails; Determine the set of devices affected by the failure of the second candidate protocol library verification; Determine the requirement dimensions of the device protocol requirement features that are not met by the second candidate protocol library; Determine the root cause information of the second candidate protocol library verification failure; Based on the aforementioned demand dimensions and the root cause information, the filtering conditions are determined; Based on the failure stage, the set of devices, the demand dimension, the root cause information, and the filtering conditions, the protocol incompatibility evidence information is generated.
[0007] In some embodiments, determining a new second candidate protocol library from the remaining first candidate protocol library based on the protocol incompatibility evidence information includes: Based on the evidence of protocol incompatibility, the first candidate protocol library, excluding the second candidate protocol library that failed verification, is filtered. From the filtered first candidate protocol library, a new second candidate protocol library is determined.
[0008] In some embodiments, determining the device protocol requirement characteristics of the smart device includes: Determine the protocol identity characteristics of the smart device; Determine the operating environment information required by the home host operating protocol library; Determine the communication method between the home host and the smart device; Determine the firmware feature set corresponding to the smart device; Based on the functional requirements of the home host, determine the set of conversion interfaces; Determine the standard device attributes of the smart device in the home host system; The home host determines the message type of the smart device during the operation of the smart device; The device protocol requirement features are generated based on the protocol identity features, the operating environment information, the communication method, the firmware feature set, the conversion interface set, the standard device attributes, and the message type.
[0009] In some embodiments, determining a plurality of first candidate protocol libraries from a preset protocol repository based on the device protocol requirement characteristics includes: Based on the device protocol requirement characteristics, a requirement characteristic summary is determined; The description information of each protocol library in the protocol repository is determined, and multiple first candidate protocol libraries are determined from the protocol repository based on the requirement feature summary and the description information.
[0010] In some embodiments, determining the requirement feature summary based on the device protocol requirement features includes: The device protocol requirement features are organized according to the preset field format; The device protocol requirement features are sorted according to preset rules; The sorted device protocol requirement features are serialized, and a digest operation is performed on the serialized device protocol requirement features to obtain the requirement feature digest.
[0011] In some embodiments, the verification of the second candidate protocol library includes: Download the second candidate protocol library to the preset isolation verification area; The second candidate protocol library in the isolation verification area is verified, and after the verification is passed, the second candidate protocol library is tested based on the information actually output by the smart device.
[0012] In some embodiments, the method further includes: When generating new device protocol requirement characteristics, change requirement information is determined based on the new device protocol requirement characteristics and the old device protocol requirement characteristics. The target protocol library is verified based on the changed requirements information.
[0013] In some embodiments, after determining the target protocol library, the method further includes: The newly received protocol processing request is appended with the protocol library generation identifier of the target protocol library; the previously received protocol processing request is appended with the protocol library generation identifier of the old protocol library. Based on the protocol library generation identifier, the corresponding protocol library is invoked to process the protocol processing request.
[0014] This application also provides a protocol library determination system applied to a home host, the home host being communicatively connected to a smart device, the system comprising: The protocol requirement feature generation module is used to determine the device protocol requirement features of the smart device, and to determine multiple first candidate protocol libraries from a preset protocol repository based on the device protocol requirement features. The isolation verification module is used to determine a second candidate protocol library from multiple first candidate protocol libraries and to verify the second candidate protocol library; The incompatibility evidence generation module is used to generate protocol incompatibility evidence information for the second candidate protocol library when the verification of the second candidate protocol library fails. Candidate control and progressive acquisition are used to determine a new second candidate protocol library from the remaining first candidate protocol library based on the protocol incompatibility evidence information, until the new second candidate protocol library is verified and the verified second candidate protocol library is used as the target protocol library.
[0015] This application also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the above-described method for determining the protocol library.
[0016] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described method for determining the protocol library.
[0017] The embodiments of this application have the following advantages: In this embodiment, the home host determines the device protocol requirement characteristics of the smart device and, based on these characteristics, identifies multiple first candidate protocol libraries from a pre-set protocol repository. From these first candidate protocol libraries, a second candidate protocol library is selected and verified. If the second candidate protocol library fails verification, protocol incompatibility evidence information is generated. Based on this incompatibility evidence information, a new second candidate protocol library is selected from the remaining first candidate protocol libraries until the new second candidate protocol library passes verification. The verified second candidate protocol library is then used as the target protocol library. Through this embodiment, the home host can compile the results of failed candidate protocol library verifications into a set of incompatibility evidence information. The home host can then reorganize the candidate protocol libraries based on this incompatibility evidence information, eliminating those with the same incompatibility conditions and selecting the next candidate protocol library. Only one candidate protocol library is acquired and verified at any given time; only if the current one fails is the next one acquired. In this embodiment, subsequent candidate protocol libraries are no longer selected simply by decreasing version number, but are determined by the verification result of the previous candidate protocol library. After verification fails, the reason for the failure is extracted, the candidate range is modified, and the next candidate protocol library is obtained, forming a continuous feedback process. In this embodiment, the home host does not need to download all candidate protocol libraries at once, nor does it need to repeatedly try versions with the same defects. Attached Figure Description
[0018] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1 This is a flowchart illustrating the steps of a method for determining a protocol library according to an embodiment of this application; Figure 2 This is a flowchart illustrating the steps of another method for determining a protocol library according to an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a home host according to an embodiment of this application; Figure 4This is a flowchart illustrating the steps of another method for determining a protocol library according to an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a protocol library determination system according to an embodiment of this application. Detailed Implementation
[0019] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0020] Reference Figure 1 The diagram illustrates a flowchart of a method for determining a protocol library according to an embodiment of this application, which may include the following steps: Step 101: Determine the device protocol requirements of the smart device, and based on the device protocol requirements, determine multiple first candidate protocol libraries from the preset protocol repository.
[0021] In some embodiments, the method for determining the protocol library can be applied to a home host; the home host can refer to the local central controller in a smart home system, which is equivalent to the brain of the smart devices in the home. The home host can communicate and connect with smart devices, which can be devices in the smart home system, such as lights, curtains, sensors, door locks, panels, air conditioners, underfloor heating, etc.
[0022] On the one hand, the home host can control various smart devices; on the other hand, the home host comes with multiple communication bus / wireless protocols (KNX, Modbus, RS485, Zigbee, Bluetooth Mesh, etc.), which can connect to smart devices with different protocols and send commands of the corresponding protocols to each smart device.
[0023] In this embodiment of the application, the home host can first read the device registration information and operating environment of its own machine to determine the device protocol requirement characteristics of the smart device. The device protocol requirement characteristics can be used to characterize the protocol requirements when the home host and the smart device communicate with each other.
[0024] After obtaining the device protocol requirement characteristics, multiple first candidate protocol libraries that can match these requirements can be identified from a pre-set protocol repository. This pre-set protocol repository can store different versions of multiple protocols of different categories.
[0025] The protocol library can be used to provide standardized conversion interfaces to home hosts. One type of interface converts the device's raw messages into a unified device state within the home host, while another type converts standard control requests into control messages that the device can recognize. It can also provide auxiliary conversion interfaces as needed by the protocol.
[0026] A standardized conversion interface is an interface used for protocol conversion. Simply put, the protocol library sits between the original protocol of the smart device and the unified data format used within the home host. On one side are the smart device's own raw communication messages, and on the other side are the device status and control requests used uniformly within the home host. It performs conversions in at least two directions: first, converting the smart device's raw messages into the standard device status within the home host; second, converting the standard control requests within the home host into control messages that the smart device can recognize.
[0027] The protocol library can be a dynamic link library or a standalone protocol service. The deployment process is the same for both implementations: the protocol component can be obtained and verified separately, and switched to only after its usability is confirmed, while retaining the conditions for reverting to the original version.
[0028] Step 102: Determine the second candidate protocol library from multiple first candidate protocol libraries, and verify the second candidate protocol library.
[0029] After obtaining multiple first-candidate protocol libraries, a second-candidate protocol library can be determined from among them according to the release time of each first-candidate protocol library or the recommended order of the protocol repositories.
[0030] After obtaining a second candidate protocol library, the second candidate protocol library can be verified. For example, the second candidate protocol library can be verified from multiple dimensions, such as: file and identity verification, operation interface verification, device capability coverage verification, status message operation verification, control transition operation verification, etc. This application embodiment does not limit this.
[0031] In some embodiments, when verifying the second candidate protocol library, the main focus can be on verifying whether the protocol library can achieve protocol conversion between smart devices and home hosts.
[0032] Step 103: When the verification of the second candidate protocol library fails, generate protocol incompatibility evidence information for the second candidate protocol library.
[0033] If the second candidate protocol library passes the verification, it can be directly used as the target protocol library and downloaded locally to maintain the operation of the home host and smart devices.
[0034] Conversely, if the currently determined second candidate protocol library fails the verification, error information, failure information, etc. generated during the verification process can be obtained, and evidence information of protocol incompatibility against the second candidate protocol library can be generated.
[0035] In some embodiments, the verification process of the currently determined second candidate protocol library can be recorded so that protocol incompatibility evidence information can be generated based on these records later.
[0036] Step 104: Based on the evidence of protocol incompatibility, determine a new second candidate protocol library from the remaining first candidate protocol library until the new second candidate protocol library is verified and the verified second candidate protocol library is used as the target protocol library.
[0037] After obtaining the evidence of protocol incompatibility, a new second candidate protocol library can be selected from the remaining first candidate protocol library (i.e., the first candidate protocol library other than the second candidate protocol library that failed verification) that does not match the evidence of protocol incompatibility.
[0038] Next, the new second candidate protocol library can be re-verified. If the new second candidate protocol library still fails verification, new protocol incompatibility evidence information can be regenerated, and a new second candidate protocol library can be selected based on the new protocol incompatibility evidence information, until the determined second candidate protocol library passes verification.
[0039] Once a second candidate protocol library passes verification, it can be used as the target protocol library and downloaded to the home host. The home host can then use this target protocol library to interact with smart devices.
[0040] In this embodiment, the home host determines the device protocol requirement characteristics of the smart device and, based on these characteristics, identifies multiple first candidate protocol libraries from a pre-set protocol repository. From these first candidate protocol libraries, a second candidate protocol library is selected and verified. If the second candidate protocol library fails verification, protocol incompatibility evidence information is generated. Based on this incompatibility evidence information, a new second candidate protocol library is selected from the remaining first candidate protocol libraries until the new second candidate protocol library passes verification. The verified second candidate protocol library is then used as the target protocol library. Through this embodiment, the home host can compile the results of failed candidate protocol library verifications into a set of incompatibility evidence information. The home host can then reorganize the candidate protocol libraries based on this incompatibility evidence information, eliminating those with the same incompatibility conditions and selecting the next candidate protocol library. Only one candidate protocol library is acquired and verified at any given time; only if the current one fails is the next one acquired. In this embodiment, subsequent candidate protocol libraries are no longer selected simply by decreasing version number, but are determined by the verification result of the previous candidate protocol library. After verification fails, the reason for the failure is extracted, the candidate range is modified, and the next candidate protocol library is obtained, forming a continuous feedback process. In this embodiment, the home host does not need to download all candidate protocol libraries at once, nor does it need to repeatedly try versions with the same defects.
[0041] Reference Figure 2 The flowchart illustrates another method for determining a protocol library according to an embodiment of this application, which may include the following steps: Step 201: Determine the device protocol requirements of the smart device.
[0042] In some embodiments, the method for determining the protocol library can be applied to a home host; the home host can refer to the local central controller in a smart home system, which is equivalent to the brain of the smart devices in the home. The home host can communicate and connect with smart devices, which can be devices in the smart home system, such as lights, curtains, sensors, door locks, panels, air conditioners, underfloor heating, etc.
[0043] On the one hand, the home host can control various smart devices; on the other hand, the home host comes with multiple communication bus / wireless protocols (KNX, Modbus, RS485, Zigbee, Bluetooth Mesh, etc.), which can connect to smart devices with different protocols and send commands of the corresponding protocols to each smart device.
[0044] In this embodiment, the home host can first read the device registration information and operating environment of its own machine to determine the device protocol requirements of the smart device.
[0045] In some embodiments of this application, the device protocol requirement characteristics can be determined through the following sub-steps: Sub-step 11: Determine the protocol identity characteristics of the smart device.
[0046] In some embodiments, the home host can first determine which device communication protocol the currently connected smart device is using; based on the device communication protocol, the protocol identity characteristics of the smart device can be determined.
[0047] Protocol identity features are the identity characteristics of the protocols to which the smart device needs to be adapted belongs. Protocol identity features are used to determine which protocol set a smart device belongs to. Their main function is to distinguish different protocol families or branches, allowing the home host to know which candidate protocol library to look in. Protocol identity features refer to protocol identification information that identifies the protocol family or branch used by the smart device and is used to associate it with the corresponding candidate protocol library.
[0048] Sub-step 12: Determine the runtime environment information required by the home host operating protocol library.
[0049] In some embodiments, the home host can determine runtime environment information such as the processor architecture, interface specifications, and loading environment required to run the protocol library.
[0050] Sub-step 13: Determine the communication method between the home host and smart devices.
[0051] In some embodiments, the communication method between the home host and the smart device can also be determined, such as Bluetooth, Zigbee, etc.
[0052] Sub-step 14: Determine the firmware feature set corresponding to the smart device.
[0053] In some embodiments, the firmware feature set corresponding to the smart devices or device sets currently included in the protocol library adaptation and verification scope of the home host can also be determined, such as protocol variants.
[0054] Sub-step 15: Determine the set of conversion interfaces based on the functional requirements of the home host.
[0055] In some embodiments, the set of conversion interfaces that the home host requires the protocol library to provide can be determined based on the functional requirements of the home host; that is, which protocol conversion capabilities the candidate protocol library must provide, and the standard call interfaces corresponding to these capabilities.
[0056] For example, a home host needs a corresponding state transition interface to allow the protocol library to convert device messages into standard states; similarly, a home host needs a control transition interface to issue control commands. In addition, it may also require supporting interfaces such as initialization and resource release interfaces.
[0057] Sub-step 16: Determine the standard device attributes of smart devices in the home host system.
[0058] In some embodiments, standard device attributes of smart devices in the home host can also be determined; for example, the standard device attributes are not the original fields in the protocol message, but standardized state, capability or control data items used in the unified device model inside the home host after the smart device has undergone protocol conversion. These attributes are data that the upper-layer functions actually recognize and use.
[0059] Sub-step 17: Determine the message type of the smart device as determined by the home host during the operation of the smart device.
[0060] In some embodiments, the home host can also determine the message categories of the smart device that have been observed and identified during the operation of the smart device.
[0061] Sub-step 18: Generate device protocol requirement features based on protocol identity characteristics, operating environment information, communication method, firmware feature set, conversion interface set, standard device attributes, and message type.
[0062] After obtaining the protocol identity characteristics, operating environment information, communication method, firmware feature set, conversion interface set, standard device attributes, and message type, this information can be combined into the device protocol requirement characteristics.
[0063] For example, D=<M,H,T,V,I,A,F> Where D represents the device protocol requirement characteristics, M represents the protocol identity characteristics, H represents the operating environment information, T represents the communication method, V represents the firmware feature set, I represents the conversion interface set, A represents the standard device attribute, and F represents the message type.
[0064] Step 202: Determine the requirement feature summary based on the equipment protocol requirement characteristics.
[0065] In some embodiments, after obtaining the device protocol requirement features, the device protocol requirement features can be preprocessed, and a requirement feature summary can be generated based on the preprocessed device protocol requirement features.
[0066] There is a one-to-one correspondence between the device protocol requirement features and the requirement feature summary; if the same requirement feature summary exists later, the target protocol library determined based on the requirement feature summary can be directly reused.
[0067] In some embodiments of this application, the requirement feature summary can be determined through the following sub-steps: Sub-step 21: Organize the device protocol requirement features according to the preset field format.
[0068] In some embodiments, after obtaining the device protocol requirement features, they can be organized according to the prescribed field format to achieve feature standardization and avoid generating different requirement feature summaries for the same feature due to different formats caused by feature non-standardization.
[0069] Sub-step 22: Sort the sorted device protocol requirement features according to preset rules.
[0070] After organizing the device protocol requirement features according to the preset field format, the organized device protocol requirement features can be sorted according to fixed rules (i.e. preset rules) to avoid generating different results for the same content just because of different order.
[0071] Sub-step 23: Serialize the sorted device protocol requirement features and perform a digest operation on the serialized device protocol requirement features to obtain a requirement feature digest.
[0072] After sorting the organized device protocol requirement features according to preset rules, they can be uniformly serialized, and a summary operation can be performed on the serialized device protocol requirement features to obtain a requirement feature summary. The purpose of uniform serialization is to ensure that the same requirement content will generate consistent data and summaries regardless of the reading order.
[0073] Specifically, this can be handled as follows: The home host organizes the device protocol requirement characteristics in a fixed order: M→H→T→V→I→A→F. For structured fields such as M, H, and T, they are encoded according to a predetermined subfield order; for set fields such as V, I, A, and F, each element is first converted into a uniform format and then sorted according to fixed rules.
[0074] If multiple devices are involved, they can be sorted by device identifier first, and then the corresponding protocol variants, attributes and message types can be arranged.
[0075] To avoid ambiguity between fields, each field can also include a field identifier, field length, and field content, which are then converted into a continuous byte sequence before digestion is performed.
[0076] The overall process can be summarized as follows: fixed field order → field normalization → set sorting → adding field identifiers and lengths → forming a continuous sequence → generating a digest. This ensures that even if the order in which attributes or devices are read changes, the generated digest remains consistent as long as the actual requirements remain the same; if a new device is added, a protocol variant is introduced, or necessary attributes change, the digest will change accordingly.
[0077] Step 203: Determine the description information of each protocol library in the protocol repository, and determine multiple first candidate protocol libraries from the protocol repository based on the requirement feature summary and description information.
[0078] In some embodiments, each protocol library in the protocol repository may correspond to a description information, which at least records the protocol library's identity and version relationship, the type of home host environment it can run on, which protocol variants it supports, which conversion interfaces it provides, which device attributes and message types it supports, file verification and digital signature information, and the location where the protocol library file is obtained.
[0079] Protocol library identity is primarily used to identify which protocol library component a candidate protocol library belongs to, and which device protocol family or branch it belongs to. It can be understood as a unique or distinguishable identifier for the candidate protocol library itself. Version relationships refer to the version order, version branches, and replacement relationships among different candidate versions under the same protocol identity.
[0080] After determining the description information and the requirement feature summary, it can be determined whether the requirement feature summary matches each description information. Based on the matching results, multiple first candidate protocol libraries can be determined from the protocol repository. For example, based on the requirement feature summary and description information, candidate protocol libraries in the protocol repository that do not match the processor architecture or loading environment can be eliminated first, and then the required interfaces, device attributes, protocol variants and message types can be checked.
[0081] Step 204: Determine the second candidate protocol library from multiple first candidate protocol libraries.
[0082] After obtaining multiple first-candidate protocol libraries, a second-candidate protocol library can be determined from among them according to the release time of each first-candidate protocol library or the recommended order of the protocol repositories.
[0083] Step 205: Download the second candidate protocol library to the preset isolation verification area.
[0084] In some embodiments, after determining the second candidate protocol library, the second candidate protocol library can be downloaded to a preset isolation verification area instead of directly overwriting the currently working protocol library.
[0085] The isolation verification zone can be set up as a separate verification process. This process only receives verification input from the main control process and does not hold write permissions to the actual device communication interface. Control messages generated by the second candidate protocol library are not sent to the smart device; if the second candidate protocol library fails to load or malfunctions, the current protocol library and the main control process continue to operate.
[0086] Step 206: Verify the second candidate protocol library in the isolation verification area, and after the verification is passed, test the second candidate protocol library based on the information actually output by the smart device.
[0087] In some embodiments, the second candidate protocol library can be verified in the isolated verification area; if the verification fails, step 207 is executed directly.
[0088] If the verification is successful, it can be enabled in stages; specifically, the second candidate protocol library can be put into actual use to test the second candidate protocol library based on the information actually output by the smart device.
[0089] If the test fails, proceed to step 207; if the test passes, the second candidate protocol library is directly adopted as the target protocol library.
[0090] Step 207: When the verification of the second candidate protocol library fails, generate protocol incompatibility evidence information for the second candidate protocol library.
[0091] If the verification of the second candidate protocol library fails, evidence of protocol incompatibility against the second candidate protocol library can be generated based on the information recorded during the verification process.
[0092] In some embodiments of this application, the evidence of protocol incompatibility can be determined through the following sub-steps: Sub-step 31: Determine the failure stage where the second candidate protocol library verification fails.
[0093] In some embodiments, the failure stage in which the second candidate protocol library fails verification can be determined, for example, whether it occurs in the file, loading, interface, capability, state resolution, or control transition stage.
[0094] Sub-step 32: Determine the set of devices affected by the failure of the second candidate protocol library verification.
[0095] In some embodiments, the set of devices affected by the failure of the second candidate protocol library verification can also be determined, i.e., the set of affected devices.
[0096] Sub-step 33: Determine the requirement dimensions of the device protocol requirement features that are not met in the second candidate protocol library.
[0097] In some embodiments, the requirement dimension of the device protocol requirement feature that the second candidate protocol library does not meet can also be determined, that is, at which specific requirement dimension of the device protocol requirement feature the failure occurred. For example, the runtime environment H is not met, the protocol variant V is not supported, the necessary conversion interface I is missing, the necessary device attribute A is not covered, or a certain type of message F cannot be processed.
[0098] Sub-step 34: Determine the root cause information for the failure of the second candidate protocol library verification.
[0099] In some embodiments, the root cause information for the failure of the second candidate protocol library verification can also be determined; for example, the root cause information is a level more specific than the requirement dimension, which only indicates which type of requirement was not met.
[0100] Root cause information records the specific error results that occurred in the candidate protocol library under what verification conditions. Root cause information can refer to reproducible failure reasons; reproducibility means that when re-executed with the same verification inputs and conditions, the same or equivalent error results can be observed again. This avoids incorrectly recording a single network jitter, message timeout, or occasional device malfunction as protocol library incompatibility.
[0101] Sub-step 35: Determine the filtering conditions based on the demand dimensions and root cause information.
[0102] In some embodiments, after obtaining the demand dimension and root cause information, filtering conditions can be further transformed. For example, based on the demand dimension, it can be first determined which demand dimension the second candidate protocol library fails in; then it can be determined which capability field in the candidate description corresponds to this failure; finally, this field is transformed into a filtering condition that must be met or excluded when screening candidate protocol libraries in the next round.
[0103] For example: if the failure is due to incompatibility of the running interface version, then the next round of screening will require the candidate protocol library to meet the interface version requirements of the current home host; if the failure is due to the lack of necessary device attributes, then the next round will only retain candidate protocol libraries that explicitly declare support for this necessary attribute; if the failure is due to the inability to parse a certain type of message under a certain protocol variant, then the next round will prioritize retaining candidate protocol libraries that explicitly cover that protocol variant and message type.
[0104] Generation process: Failure phenomenon → Find the corresponding requirement dimension → Find the corresponding capability item in the candidate description → Convert into the candidate screening conditions for the next round.
[0105] Another crucial boundary is that if the candidate description lacks sufficient information to prove that other candidate protocol libraries also have the same problem, then the scope of exclusion cannot be expanded; only candidate protocol libraries that have already failed actual verification should be excluded. This avoids mistakenly deleting candidate protocol libraries that might otherwise be compatible.
[0106] Sub-step 36: Generate protocol incompatibility evidence information based on the failure stage, device set, requirement dimension, root cause information, and filtering conditions.
[0107] After obtaining the failure stage, device set, requirement dimension, root cause information, and filtering conditions, these can be combined to form evidence of protocol incompatibility.
[0108] For example, the protocol incompatibility evidence information C can be represented as: E=<C,Stage,DeviceSet,Dimension,Reason,Constraint> Stage represents the failure stage, DeviceSet represents the set of devices, Dimension represents the requirement dimension, Reason represents the root cause information, and Constraint represents the filtering conditions.
[0109] Step 208: Based on the protocol incompatibility evidence information, filter the first candidate protocol library except for the second candidate protocol library that failed verification.
[0110] After obtaining evidence of protocol incompatibility, the first candidate protocol library, excluding the second candidate protocol library that failed verification, can be filtered out based on this evidence. This will filter out the first candidate protocol library that has the same problem as the second candidate protocol library, thus avoiding unnecessary verification work.
[0111] Step 209: Determine a new second candidate protocol library from the filtered first candidate protocol library until the new second candidate protocol library passes verification, and use the verified second candidate protocol library as the target protocol library.
[0112] After filtering the first candidate protocol library, a new second candidate protocol library can be determined from the remaining first candidate protocol libraries. The method for determining the new second candidate protocol library is the same as the method for determining the second candidate protocol library in the previous stage, and will not be repeated here.
[0113] Next, the new second candidate protocol library can be re-verified. If the new second candidate protocol library still fails verification, new protocol incompatibility evidence information can be regenerated, and a new second candidate protocol library can be selected based on the new protocol incompatibility evidence information, until the determined second candidate protocol library passes verification.
[0114] Once a second candidate protocol library passes verification, it can be used as the target protocol library and downloaded to the home host. The home host can then use this target protocol library to interact with smart devices.
[0115] In this embodiment, the device protocol requirement characteristics of the smart device are determined; a requirement characteristic summary is determined based on the device protocol requirement characteristics; the description information of each protocol library in the protocol repository is determined, and multiple first candidate protocol libraries are determined from the protocol repository based on the requirement characteristic summary and description information; a second candidate protocol library is determined from the multiple first candidate protocol libraries; the second candidate protocol library is downloaded to a preset isolation verification area; the second candidate protocol library in the isolation verification area is verified, and after the verification is passed, the second candidate protocol library is tested based on the information actually output by the smart device; when the verification of the second candidate protocol library fails, protocol incompatibility evidence information is generated for the second candidate protocol library; based on the protocol incompatibility evidence information, the first candidate protocol libraries other than the second candidate protocol library that failed verification are filtered; a new second candidate protocol library is determined from the filtered first candidate protocol libraries until the new second candidate protocol library passes verification, and the verified second candidate protocol library is used as the target protocol library. Through this embodiment, the home host can organize the results of the candidate protocol library verification failures into a set of incompatibility evidence information. The home host can then reorganize the candidate protocol library based on this incompatibility evidence, eliminating those with the same incompatibility conditions and selecting the next candidate protocol library. Only one candidate protocol library is acquired and verified at any given time; only if the current one is confirmed to be unsuitable is the next one acquired. In this embodiment, subsequent candidate protocol libraries are no longer selected simply by decreasing version number, but are determined by the verification result of the previous candidate protocol library. After verification failure, the reason for failure is extracted, the candidate range is modified, and the next candidate protocol library is acquired, forming a continuous feedback process. In this embodiment, the home host does not need to download all candidate protocol libraries at once, nor does it need to repeatedly try versions with the same defects.
[0116] Additionally, the home host can generate a set of device protocol requirement characteristics based on its current device environment. This set of characteristics must include at least the following: the protocol identity of the current device, the processor architecture and loading environment required for the home host to run the protocol library, the device communication method, protocol variants, the conversion interfaces that the protocol library must provide, the device attributes that the current device and upper-layer functions actually depend on, and the types of device messages observed by the home host. After the candidate protocol library is verified, it is not immediately activated but is first placed in a verification environment; this environment cannot directly control the real smart device. The home host uses the current device requirements and running message samples to check the interface, capability coverage, and protocol processing semantics of the candidate protocol library. This application integrates the extraction of the current home's device protocol requirements, the acquisition of individual candidate protocol libraries, isolated operation verification, and the processing of verification results into a single deployment process. The verification content is not a fixed, general test set but is extracted from the actual device composition, actual functional reference relationships, and on-site device messages of this home host. Therefore, the same candidate protocol library deployed on home hosts with different device compositions may yield completely different verification results. Before the protocol library officially takes over device communication, the home host can determine whether the protocol library can cover the actual protocol needs of the current home. It will not directly replace the protocol library that is currently in use just because the version is newer or can be dynamically loaded.
[0117] In some embodiments of this application, any of the above embodiments may further include the following steps: When generating new device protocol requirement features, change requirement information is determined based on the new and old device protocol requirement features; the target protocol library is then verified based on the change requirement information.
[0118] In some embodiments, when a new smart device is connected or upgraded, new device protocol requirement characteristics can be generated based on the current smart devices and home host.
[0119] Then, the new device protocol requirements can be compared with the old device protocol requirements to determine the change requirements information, i.e., what changes have occurred in the interface, what changes have occurred in the device, etc.
[0120] After determining the changes in requirements, the target protocol library can be further validated based on these changes to determine whether it can continue to adapt to new scenarios.
[0121] In some embodiments of this application, after determining the target protocol library, any of the above embodiments may further include the following steps: The newly received protocol processing request is appended with the protocol library generation identifier of the target protocol library; previously received protocol processing requests are appended with the protocol library generation identifier of the old protocol library; based on the protocol library generation identifier, the corresponding protocol library is invoked to process the protocol processing request.
[0122] In some embodiments, after the target protocol library is determined, a running instance of the target protocol library can be created; the original protocol library is not uninstalled temporarily.
[0123] The home host appends a protocol library generation identifier to each protocol processing request: requests that have already entered the original protocol library continue to be processed in the original instance, and new protocol processing requests arriving after the switch point are appended with the protocol library generation identifier of the target protocol library and handed over to the new running instance for processing.
[0124] The instance only enters the garbage collection state after all pending requests have been resolved. This prevents dynamic link libraries from being unloaded while they are still running and also prevents the same request from being processed across two different protocol library versions.
[0125] After the new protocol library starts working, the home host continues to observe protocol call anomalies, device state transition results, and control feedback. When a reproducible protocol semantic anomaly is detected, the protocol mapping switches back to the original protocol library, and the new instance stops receiving requests; requests currently being executed in the new instance are completed or aborted according to the predetermined safe termination policy. The home host adds this anomaly to the incompatibility evidence in the candidate protocol library and then selects the next object from the remaining candidate set, without needing to return to the first candidate version and start over.
[0126] The following, combined with Figures 3-4 The following, along with some specific examples, further illustrate the method for determining the aforementioned protocol library: First, let me reiterate the existing technology and the technical problems it presents: Currently, for home consoles to support new devices or new protocol versions, the cloud typically maintains protocol libraries based on protocol identifiers, device models, or version numbers. If a home console finds that it doesn't have the corresponding protocol library locally, or that the existing version is too old, it downloads the specified or latest version from the cloud. After the file integrity, signature, and dynamic loading interface checks have all passed, the downloaded protocol library replaces the currently running version.
[0127] Some solutions also store several historical versions in the cloud. When the latest version becomes unusable, the home host downloads the next newest version and tries until it can be loaded. This approach is basically a rollback from newest to oldest version, without considering which devices are actually connected to the home host, what device attributes the upper-layer services are using, or utilizing the specific information generated when the candidate protocol library fails.
[0128] In the field of software dependency management, there are also solutions that analyze software compatibility based on source code, binary interfaces, or dependencies. However, such analyses mainly deal with static dependencies between software packages and cannot directly determine whether a protocol library can correctly handle device messages that are appearing in a home environment.
[0129] The above-mentioned technical solutions have the following problems: Question 1: The fact that the protocol library can be loaded does not mean that it can meet the current device protocol requirements of the household.
[0130] Under the same protocol identifier, different device firmware branches, message extension fields, and device attribute sets may exist simultaneously. Even if a candidate protocol library passes file verification and can be loaded normally, it may still fail to correctly parse the status messages of some devices in the current home, or fail to generate control messages that these devices can execute.
[0131] The problem arises because existing solutions primarily rely on protocol identifiers, version numbers, file integrity checks, and dynamic interface checks to update the protocol library. However, this information fails to reflect the types of devices currently connected to the home host, device firmware characteristics, types of messages encountered in the field, and which device attributes are actually referenced by scene control functions. As a result, the home host may enable a protocol library that appears legitimate but is actually incompatible with the current set of devices, making it difficult to guarantee the reliable deployment of the protocol library in a real home device environment.
[0132] Question 2: The failure results of the candidate protocol library cannot effectively guide the selection of subsequent versions.
[0133] Existing cascading downloads typically attempt versions sequentially from newest to oldest. If a candidate protocol library is unsuitable, the smart home system simply records the update failure and then attempts the next version in a fixed order.
[0134] The problem arises because existing solutions primarily rely on version order or fixed candidate lists for fallback, failing to further differentiate the root cause of failures—whether it's a mismatch in the runtime interface, missing necessary device attributes, inability to parse specific device messages, or inconsistent control semantics. Furthermore, subsequent selection cannot eliminate candidate protocol libraries with similar defects based on these reasons, potentially resulting in the continuous downloading of several versions known to be unsuitable for current requirements, wasting limited storage space and communication resources.
[0135] To address the aforementioned technical problem 1, the home host in this embodiment can generate a set of device protocol requirement characteristics based on its current device environment. This set of characteristics must include at least the following: the protocol identity characteristics corresponding to the current device, runtime environment information such as the processor architecture and loading environment required for the home host to run the protocol library, a set of firmware characteristics such as communication methods and protocol variants, a set of conversion interfaces that the protocol library must provide, the standard device attributes that the current device and upper-layer functions actually depend on, and the message types already observed by the home host.
[0136] After a candidate protocol library passes file verification, it is not immediately activated but is first placed in a verification environment. This environment cannot directly control the real devices. The home host uses the current device requirements and sample execution messages to check the interface, capability coverage, and protocol processing semantics of the candidate protocol library. The extraction of the current home's device protocol requirements, the acquisition of individual candidate protocol libraries, isolated execution verification, and the processing of verification results are all integrated into the same deployment process. The verification content is not a fixed, general test suite but is extracted from the real device composition, actual functional reference relationships, and field device messages of this home host. Therefore, the same candidate protocol library deployed on home hosts with different device compositions may yield completely different verification results. Before the protocol library officially takes over device communication, the home host can determine whether the protocol library can cover the actual protocol requirements of the current home, and will not directly replace the currently used protocol library simply because it is a newer version or can be dynamically loaded.
[0137] To address the aforementioned technical problem 2, the home host in this application compiles the results of failed verification of candidate protocol libraries into a structured incompatibility evidence (i.e., protocol incompatibility evidence information). This evidence must at least record: which candidate protocol library was verified, at what stage the failure occurred (i.e., the failure stage), which devices or subsets of devices were affected (i.e., the device set), which requirement features were not met (i.e., requirement dimensions), root cause information, and filtering conditions that can be used when subsequently screening candidate protocol libraries.
[0138] Then, the candidate control module on the home host or in the cloud reorganizes the candidate protocol library set based on this evidence, eliminating candidate protocol libraries with the same incompatibility conditions, and then selecting the next candidate protocol library. Only one candidate protocol library is acquired and verified at any given time; only if the current one is confirmed to be unsuitable is the next one acquired. Subsequent candidate protocol libraries are no longer selected simply by decreasing version number, but are determined by the verification results of the previous candidate protocol library in the current home device environment. After verification failure, the reason for the failure is extracted, the candidate range is modified, and the next candidate protocol library is acquired, forming a continuous feedback process. The home host does not need to download all candidate protocol libraries at once, nor does it need to repeatedly try versions with the same defects. When no suitable protocol library is found, the original protocol library continues to work; once a candidate protocol library meets the requirements, subsequent subscriptions and downloads are stopped.
[0139] Reference Figure 3 The diagram shows a structural schematic of a home host according to an embodiment of this application; refer to Figure 4 The following is a flowchart illustrating the steps of another method for determining a protocol library according to an embodiment of this application: The home console can be configured with: a device communication module, a protocol requirement feature generation module, a candidate control and progressive acquisition module, an isolation verification module, an incompatibility evidence generation module, a compatibility credential management module, and a protocol library atomic switching and rollback module.
[0140] The cloud-based system includes a candidate directory and protocol repository. The device communication module is responsible for receiving device messages and sending device control messages, and can connect to home fieldbus, serial communication links, wireless networks, or other device communication channels.
[0141] The protocol library provides a standardized conversion interface for home consoles. The protocol library can be a dynamic link library or a standalone protocol service. The deployment process is the same for both implementations: the protocol component can be obtained and verified independently, and switching is only allowed after confirming its usability, while retaining the conditions for reverting to the original version. The following explanation uses a dynamic link library as an example, but does not consider dynamic linking as a limiting factor.
[0142] 1. Characteristics of generation device protocol requirements: After the home host starts up, it first reads the device registration information and operating environment of the local machine. If any devices are added, removed, firmware information changes, or upper-layer function references change, the corresponding requirements are updated. Device protocol requirements are denoted as: D=<M,H,T,V,I,A,F> Where D represents the device protocol requirement characteristics, M represents the protocol identity characteristics, H represents the operating environment information, T represents the communication method, V represents the firmware feature set, I represents the conversion interface set, A represents the standard device attribute, and F represents the message type.
[0143] Instead of directly copying all optional attributes from the protocol document, A is organized from actual usage relationships. For example, if an attribute is already referenced by automatic scenes, voice control, or status display functions, then that attribute is something that the current deployment must cover. Even if a candidate protocol library can handle the basic status of the device, if it cannot provide this attribute, it cannot be determined that it is suitable for the current home host.
[0144] F comes from the communication logs during normal device operation. Home hosts don't need to store all original messages long-term; they can retain anonymized message samples, or only message structure summaries, message type identifiers, and the previously confirmed standard status results. During verification, retrieve the corresponding samples according to the device, protocol variant, and message category to avoid using data unrelated to the current device for invalid tests.
[0145] After the requirement characteristics are compiled, the home host can determine the requirement characteristic summary based on the device protocol requirement characteristics.
[0146] The compatibility credentials generated later are tied to this digest. When a new device is connected, the device firmware changes, or a new feature is added, the home host recalculates the digest; the original credentials can only continue to overwrite the unchanged parts, and new requirements need to be verified.
[0147] 2. Obtain description information of the candidate protocol library: The cloud stores multiple candidate protocol libraries under the same protocol identity, and each candidate protocol library is equipped with a description.
[0148] The description information should at least include the protocol library's identity and version relationship, the type of home console environment it can run on, which protocol variants it supports, which conversion interfaces it provides, which device attributes and message types it supports, file verification and digital signature information, and the location where the protocol library file is obtained.
[0149] Description information and protocol library files are acquired separately. For home hosts, the smaller description information is retrieved first, and initial matching is performed using a requirement feature summary. The candidate control and progressive acquisition module first eliminates candidate protocol libraries that do not match the processor architecture or loading environment, and then checks the required interfaces, device attributes, protocol variants, and message types. Candidate protocol libraries that are clearly not satisfied with the requirements in the description information will not proceed to the file download stage.
[0150] After initial screening, a candidate set is formed (including multiple first-candidate protocol libraries): the first candidate protocol library (i.e., the second-candidate protocol library) can be selected based on release time, cloud recommendation order, or the local machine's past compatibility records, but this order only determines which one to verify first. If there is no first-candidate protocol library, the original protocol library is retained, and a report of no compatible protocol library is submitted to the cloud.
[0151] The cloud-based recommendation order is generated based on a combination of the characteristics of the requirements submitted by the current home host and the compatibility information of candidate protocol libraries already available in the cloud. Specifically, the cloud may prioritize: candidate protocol libraries that are more compatible with the current home host's operating environment; those that provide more complete coverage of current protocol variants, necessary interfaces, device attributes, and message types; those that have already been successfully verified under the same or similar requirements; and candidate protocol libraries that have no known incompatibility records. When these conditions are similar, the release time or version priority is then considered for further ranking.
[0152] The following is a basic verification: When matching with the current home console's operating environment, the necessary conditions are first determined. The cloud reads H and compares the processor architecture, interface specifications, and loading environment required by the home console with the operating conditions declared by the candidate protocol libraries item by item. If any necessary condition is clearly incompatible, that candidate protocol library is directly excluded and no longer participates in the ranking.
[0153] Then, the capability coverage of the candidate protocol libraries that meet the necessary conditions can be calculated. The coverage of V, I, A, and F by the candidate protocol libraries can then be compared separately. For example, the following can be calculated: Interface coverage = Number of necessary interfaces already supported / Total number of currently required interfaces.
[0154] Attributes, protocol variants, and message types are calculated in a similar manner.
[0155] Then, a comprehensive matching value is obtained according to preset weights: MatchScore = wV×SV + wI×SI + wA×SA + wF×SF. Where SV, SI, SA, and SF represent the coverage of various requirements, respectively. A high matching degree can be understood as: first, all necessary operating conditions and capabilities are met, and then we consider whether the coverage of the current actual requirements is more complete.
[0156] In some embodiments, the home host can store records of previous successful or failed protocol library verifications. After generating requirement features in the current round, the current requirement features are compared with the requirement features in the historical records. If a candidate protocol library has previously passed verification under the same requirement features, and the candidate protocol library file itself has not changed, then its priority can be increased. If the requirements are not exactly the same, but the previous verification record clearly covers the current devices, protocol variants, and necessary attributes, it can also be used as a basis for priority selection. Conversely, if a candidate protocol library has previously failed under the same conditions due to deterministic issues, and the file has not changed, then there is no need to prioritize downloading and verifying it again.
[0157] In some embodiments, it can be determined first whether the requirements are completely consistent. Specifically, the current requirement feature summary can be compared with the requirement feature summaries in the historical records. If the summaries are consistent, and the candidate protocol library file summary has also not changed, it indicates that the requirements and protocol library files have not changed. If historical verification was successful, the priority of the candidate protocol library is increased; if historical deterministic verification has failed, the priority can be decreased or it can be directly excluded.
[0158] Next, we can determine whether the historical success records fully cover the current requirements. If the summaries differ, we further compare the V, I, A, and F in the historical records with the current requirements. For example, we check if Vcurrent is contained within Vhistory, Icurrent is contained within Ihistory, Acurrent is contained within Ahistory, and Fcurrent is contained within Fhistory. If all of these are true, it means that the scope of historical validation can fully cover the current requirements, and this candidate protocol library can still obtain higher priority.
[0159] If complete coverage is not possible, partial coverage is calculated. For example: attribute coverage = |Acurrent∩Ahistory| / |Acurrent|. Protocol variants, interfaces, and message types are calculated similarly. Higher coverage indicates greater reference value of historical success records for the current environment, and a higher priority for candidate protocol libraries. However, partial coverage can only be used for sorting; new requirements not covered by historical records still need to be re-validated.
[0160] Completely identical historical success records have the highest priority; those whose historical verification scope fully covers the current requirement are ranked second; those that can only partially cover the requirement are ranked according to the degree of coverage; if the current requirement hits a historical deterministic failure condition, the priority is reduced or the requirement is excluded. This can also be summarized as: Priority (C) = Degree of matching current requirement + Degree of historical success coverage - Degree of impact of historical failures.
[0161] 3. Single-candidate cascade acquisition: The home host selects only one candidate protocol library from multiple first-choice protocol libraries at a time, and only subscribes to or requests the detailed information and files of this one candidate protocol library.
[0162] If a message subscription approach is used, different candidate protocol libraries can correspond to different information subjects. After receiving the candidate directory, the home host first subscribes to the topic of the current candidate protocol library; if the current candidate protocol library is verified to be unsuitable, the current subscription ends, and the host subscribes to the topic of the next candidate protocol library selected through a new round of filtering. Once the current candidate protocol library is verified, subsequent candidate protocol libraries are no longer subscribed to or downloaded. A topic refers to the message topic in the message subscription mechanism, which is the logical message channel used by the home host to subscribe to information related to a specific candidate protocol library. Different candidate protocol libraries can correspond to different topics. If the home host is currently preparing to verify candidate protocol library A, it only subscribes to the topic corresponding to A; after A fails, the subscription is canceled, and the host subscribes to the topic of candidate protocol library B based on the new filtering results.
[0163] When the protocol library file is unavailable, the nature of the failure can be determined first. Network interruptions, message timeouts, and temporary unavailability of cloud services are temporary retrieval anomalies. These anomalies only trigger retries or waiting and do not change the compatibility assessment of candidate protocol libraries. File signature errors, incompatible interfaces, missing capabilities, or failed protocol semantic verification are deterministic problems. The incompatibility evidence generation module can record these as incompatibility evidence. This approach prevents a usable candidate protocol library from being removed from the collection due to a single network fluctuation.
[0164] 4. Isolation verification candidate protocol library: After the candidate protocol library is downloaded, it first enters the isolation verification area and will not directly overwrite the currently running protocol library. The isolation verification area can be set up as a separate verification process. This process only receives verification input provided by the master control process and does not hold write permissions to the actual device communication interface. Control messages generated by the candidate protocol library can only be returned to the isolation verification module and cannot be sent directly to the device; if the candidate protocol library fails to load or malfunctions, the current protocol library and the master control process will continue to work.
[0165] 4.1 Files and authentication; The home host first verifies the file digest, digital signature, protocol identity, and file type of the candidate protocol library to confirm that the transmitted file matches the content published in the cloud and indeed belongs to the protocol family currently awaiting update. If the file is replaced, the content is corrupted, the signature is invalid, or the protocol identity is inconsistent, the verification ends at this step, and the candidate protocol library cannot be loaded. Simultaneously, evidence of file identity incompatibility or security anomalies is recorded for use in this round of candidate selection and cloud-based investigation.
[0166] 4.2 Run the interface verification; After file verification and authentication are successful, the isolated verification process loads the candidate protocol library. The verification process searches for the state transition entry point, control transition entry point, initialization entry point, and resource release entry point required by the home host, while simultaneously verifying the calling convention, input / output data structure versions, and runtime environment requirements. If the interface name exists but the parameter structure version does not match, it is treated as an incompatible runtime interface. The entire loading and call checking process remains within the verification process, ensuring that even if the candidate protocol library crashes, it will not crash the home host's main control process.
[0167] 4.3 Equipment capability coverage verification; Once the interface is operational, the home host uses the I, A, and V features from the requirement characteristics to verify the capability range described in the candidate protocol library item by item. If the candidate protocol library lacks the device attributes currently used by the service, or only supports another message variant within the same protocol family, subsequent operational sample verification will not proceed, and evidence of capability incompatibility will be generated directly.
[0168] This check examines the capabilities that the current household actually needs, and does not require the candidate protocol library to cover all theoretical functions in the protocol family. A candidate protocol library with a limited scope of functionality can remain in the candidate set as long as it fully covers the content required by the current device and current business; conversely, a candidate protocol library that claims to support many devices cannot enter the activation stage if it omits the attributes that the current household must use.
[0169] 4.4 Status message execution verification; After the capability coverage check passes, the home host retrieves samples from the packet sample set that match the current device, protocol variant, and packet type, and inputs these samples one by one into the candidate protocol library. The candidate protocol library returns the standardized device status, and the isolation verification module then checks the output data structure, device identity and endpoint mapping, attribute names, and attribute value types, while confirming that no necessary attributes in A are missing. This can be confirmed by comparing A with the actual output of the candidate protocol library item by item. When the home host generates A, it already knows which standard device attributes the current device and upper-layer functions must use. During verification, after inputting the actual packet samples into the candidate protocol library, the standardized device status is obtained. The isolation verification module then compares the attribute set actually output by the candidate protocol library with the set of necessary attributes corresponding to that device in A item by item. If a required attribute in A does not appear in the output of the candidate protocol library after parsing the corresponding packet sample, or if it appears but the data type or device correspondence does not meet the requirements, it is considered that the necessary attribute has not been correctly covered.
[0170] The same message can be entered repeatedly to check whether the candidate protocol library will give contradictory results without external state changes. For protocol messages with contextual relationships, the isolation verification module enters the relevant messages in the original order of reception, while providing the candidate protocol library with initialization information consistent with the actual operation, avoiding misjudging normal results that depend on previous states as abnormal.
[0171] The output of the candidate protocol library also needs to be checked against the constraints in the device capability model. If the home host already has a protocol library in use, the confirmed results of the existing protocol library for the same message can be used as a reference, but a simple difference between the two cannot be used to conclude that the candidate protocol library is wrong. The isolation verification module also needs to check the device registration information, protocol variant descriptions, and message structure constraints to determine whether the differences come from allowed protocol version changes. When the home host did not have a usable protocol library, the protocol samples and expected standard states provided by the cloud along with the candidate description are used for verification.
[0172] This process can be divided into several steps. First, the home host processes the same device message through both the original protocol library and the candidate protocol library, obtaining two standardized results. If the two results are exactly the same, there is no problem. If the two results are different, it cannot be immediately concluded that there is a problem with the candidate protocol library. At this point, the isolation verification module first determines the specific attributes or data structures that cause the difference, and then queries the current device's registration information to determine the actual protocol variant or firmware characteristics corresponding to the current device. Then, based on the message structure constraints and attribute mapping rules corresponding to this protocol variant, it judges whether the difference output by the candidate protocol library is a change allowed by the protocol variant. At least three aspects are considered during the judgment: First, whether the data structure and attribute types output by the candidate protocol library still conform to the standard device model of the home host; second, whether any attributes currently required in the requirement set A are missing or have undergone semantic changes; third, whether the candidate protocol library's interpretation of the original message conforms to the protocol variant and message structure actually used by the current device. If the difference is only a change in expression allowed by the protocol version, and it is still correct after being converted into the home host's internal standard semantics, then the difference is considered allowed. If it causes the missing of necessary attributes, changes in meaning, or violates the message rules of the current protocol variant, then the candidate protocol library is considered incompatible.
[0173] 4.5 Control conversion operation verification; After the status message verification is complete, the home host compiles the standard control requests that may actually occur from the current device and service configurations, such as control intentions generated by manual control, automatic scenarios, or voice control, and then inputs these requests into the candidate protocol library. The device control messages generated by the candidate protocol library are still only returned to the isolation verification module and do not directly enter the actual communication link.
[0174] The isolation verification module first checks the target device address in the control message to confirm that it matches the device specified in the control request. It then checks whether the control attributes fall within the registered capabilities of the target device, and whether the message structure, length relationships, and verification relationships conform to the rules of the corresponding protocol variant. If the candidate protocol library provides a control semantic description, it also verifies whether this description is consistent with the original standard control intent, and checks whether the candidate protocol library has incidentally modified any irrelevant attributes outside the control request.
[0175] In implementations allowing phased deployment, after completing the aforementioned isolation verifications, the candidate protocol library can take over communication from only a selected subset of devices. The home host maps the feedback messages from these devices to the original control intent, confirming that the device feedback can close the current control. The preceding isolation verifications only prove that the control messages generated by the candidate protocol library are formatted correctly, but they do not fully prove that the devices will actually execute as expected after receiving them. Therefore, in situations allowing for small-scale trial operation, the candidate protocol library can take over only a subset of devices. After the home host issues a control intent, the candidate protocol library generates the actual control message and sends it to the device. Subsequently, the home host observes the status feedback returned by the device and then determines whether the actual status returned by the device matches the previous control intent. Figure 1 If they match, it means that the following link is working: standard control request → candidate protocol library conversion → device execution → device status feedback.
[0176] During trial operation, if a recurring semantic anomaly occurs, the device subset is immediately returned to the original protocol library for processing. Simultaneously, the device involved, control attributes, protocol variants, and feedback message types are recorded. This is primarily to rule out occasional network problems or temporary device state changes. A recurring semantic anomaly is defined as one that, under the same or equivalent initial conditions, produces the same error result again when given the same input or the same control process to the candidate protocol library. For example, if after the first anomaly and re-verification, after ruling out temporary issues such as communication timeouts and occasional packet loss, the same input consistently produces the same type of error, then it can be considered a deterministic semantic problem inherent in the candidate protocol library itself.
[0177] 5. Generate structured incompatible evidence: When a candidate protocol library fails verification, the home host will not simply display a general update failure status, but will generate structured incompatibility evidence (i.e., protocol incompatibility evidence information). This evidence can be represented as: E=<C,Stage,DeviceSet,Dimension,Reason,Constraint> Stage represents the failure stage, DeviceSet represents the set of devices, Dimension represents the requirement dimension, Reason represents the root cause information, and Constraint represents the filtering conditions.
[0178] If a candidate protocol library fails to load due to a mismatch between the home host's operating interface version and the actual interface version, the Constraint will write the incompatible interface characteristics. The candidate control and progressive acquisition module can then exclude candidate protocol libraries that declare the use of the same interface.
[0179] If a candidate protocol library can be loaded normally, but lacks the device attribute currently being used in the scenario, the necessary attribute will be written into the Constraint, and only candidate protocol libraries that explicitly override this attribute will be retained in the future.
[0180] If the candidate protocol library cannot handle the extended messages that appear on the current device, the Constraint will record both the device protocol variant and the message type. The candidate control and progressive acquisition module will then search for candidate branches that cover the variant, without having to backtrack one by one according to adjacent versions.
[0181] During filtering, the first candidate protocol library is updated according to the following relationship: CandidateSet(k+1) = {C | C belongs to CandidateSet(k), and Match(C, D) is true, and Excluded(C, E(k)) is false} "Match" indicates that the first candidate protocol library still meets the current requirements, while "Excluded" indicates whether the first candidate protocol library met the exclusion criteria in this round of incompatibility evidence. If the description information does not provide sufficient information, it cannot be assumed that other candidate protocol libraries have the same problem. In this case, only the current candidate protocol library that has failed verification is excluded, and the remaining first candidate protocol libraries can still proceed to subsequent verification.
[0182] 6. Select the next candidate protocol library: After the first candidate protocol library is updated, the home host selects the next candidate protocol library from the remaining first candidate protocol library.
[0183] When selecting a protocol library, first check if it fully covers the current requirement characteristics, then exclude candidate libraries that have already hit incompatibility constraints. If compatibility records for the same requirement characteristics are stored locally or in the cloud, prioritize candidate libraries with existing records and unchanged file content. Candidate libraries that have failed verification in this round will not be added to the download queue again. This means that previously successfully verified results can be used to increase the priority of candidate libraries, and even reuse some verification results when conditions are met. For example, a home host has previously successfully verified candidate library C under a certain set of device requirements D. If the requirement characteristics generated later are the same as before, and the file digest of candidate library C has not changed, it means that the device requirements have not changed, and the actual file of the protocol library has not changed either. In this case, the previous compatibility records still have reference value, so this candidate library can be prioritized. The emphasis on unchanged file content is because even if the protocol library name and version number have not changed, as long as the actual file content has changed, the original verification conclusion cannot be directly considered still valid.
[0184] Once the next candidate protocol library is determined, the home host will subscribe to its details and download the files. The verification results of the current candidate protocol library will directly change the objects to be subscribed to and downloaded next. When the entire candidate set is emptied, the home host retains the original protocol library without forced replacement, and simultaneously reports the requirement feature summary and incompatibility evidence to the cloud. If new candidate protocol libraries are added to the cloud later, the home host can continue verification using the established exclusion criteria without needing to re-download previously confirmed incompatible versions.
[0185] 7. Generate compatibility credentials: After all candidate protocol libraries pass verification, the compatibility credential management module generates a compatibility credential. The credential records a summary of the current device protocol requirement characteristics, a summary of the candidate protocol library files, the completed verification phases, the set of devices and message types covered, the protocol library operating environment, the original protocol library identity, and the identifier of this requirement generation.
[0186] This credential indicates that the candidate protocol library has been validated for this set of device requirements, not that the protocol library is applicable to all home hosts. When the description information and requirement feature summary in the protocol repository remain unchanged, the home host can reuse the credential without having to perform a full validation again. If a new device is added, device firmware features change, or new device attributes are referenced by the business logic, the home host recalculates the requirement summary; if the change only affects some devices, the results related to other devices in the credential are retained, and validation is only performed on the newly added or changed requirements.
[0187] 8. Protocol library atomic switching and rollback: After the compatibility certificate is generated, the protocol library atomic switching and rollback module first establishes a new running instance of the candidate protocol library, while the original protocol library is not unloaded temporarily. The home host attaches a protocol library generation identifier to each protocol processing request: requests already in the original protocol library continue to be processed in the original instance; new requests arriving after the switch point are handed over to the new instance; and the original instance only enters the pending recycling state after all pending requests are resolved. This avoids unloading dynamic link libraries while they are still running and prevents the same request from spanning two protocol library versions during processing.
[0188] After the new protocol library starts working, the home host continues to monitor protocol call anomalies, device state transition results, and control feedback. If a reproducible protocol semantic anomaly is detected, the protocol mapping switches back to the original protocol library, and the new instance stops receiving requests; requests currently being executed in the new instance are completed or aborted according to the predetermined safe termination policy. The home host adds this anomaly to the protocol incompatibility evidence information in the candidate protocol library and then selects the next candidate protocol library, without needing to return to the first candidate version to start over. If no anomalies occur, this round of incremental deployment ends.
[0189] Here is a specific example: Suppose a home console connects to several devices belonging to the same protocol family. Some of these devices use the basic message format, while others have extended status fields in their firmware. The home console's contextual functions already reference the standard device attributes corresponding to these extended fields. The home console reads device registration information, firmware characteristics, contextual messages, and function reference relationships to form the current device's protocol requirement characteristics, and then retrieves a list of candidate descriptions for that protocol family from the cloud.
[0190] The candidate control and progressive acquisition module first selects the candidate protocol library with the newest release order. This candidate protocol library can load normally and parse the basic state, but its description information does not declare the scenario-dependent extended attributes, and it cannot output this attribute when actually inputting extended messages. The home host records evidence of device attribute overriding class incompatibility. The affected objects are a subset of devices using extended messages, and the exclusion condition is that the required extended attributes are not supported.
[0191] The candidate control and progressive acquisition module re-examines the remaining candidate descriptions based on this evidence. Instead of downloading other candidate protocol libraries that also lack this extended attribute, it selects the candidate branch that covers the corresponding protocol variant. The home host only downloads the newly selected candidate protocol library and sequentially inputs real packet samples and actual control requests that might occur from the current device in the isolation verification area.
[0192] After the new candidate protocol library is verified through interface testing, capability coverage, status messages, and control transitions, the home host generates a compatibility credential bound to the current requirements. Then, a new protocol library instance is created, and the new protocol request is switched. The original protocol library continues to be retained for a period of observation, allowing for immediate reverting to the previous library in case of deterministic anomalies. Throughout the deployment process, the next candidate protocol library is determined jointly by the current home's protocol requirements and the results of the previous candidate protocol library's execution, not simply by downloading versions sequentially.
[0193] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of this application.
[0194] Reference Figure 5 The diagram illustrates the structure of a protocol library determination system according to an embodiment of this application, which may include the following modules: The protocol requirement feature generation module 510 is used to determine the device protocol requirement features of the smart device, and to determine multiple first candidate protocol libraries from a preset protocol library based on the device protocol requirement features. The isolation verification module 520 is used to determine a second candidate protocol library from multiple first candidate protocol libraries and to verify the second candidate protocol library; The incompatibility evidence generation module 530 is used to generate protocol incompatibility evidence information for the second candidate protocol library when the verification of the second candidate protocol library fails. The candidate control and progressive acquisition module 540 is used to determine a new second candidate protocol library from the remaining first candidate protocol library based on the protocol incompatibility evidence information, until the new second candidate protocol library is verified and the verified second candidate protocol library is used as the target protocol library.
[0195] In some embodiments, the incompatibility evidence generation module 530 is used to determine the failure stage of the second candidate protocol library verification; determine the set of devices affected by the failure of the second candidate protocol library verification; determine the requirement dimension of the device protocol requirement feature not met by the second candidate protocol library; determine the root cause information of the failure of the second candidate protocol library verification; determine the filtering conditions based on the requirement dimension and the root cause information; and generate protocol incompatibility evidence information based on the failure stage, the set of devices, the requirement dimension, the root cause information and the filtering conditions.
[0196] In some embodiments, the candidate control and progressive acquisition 540 is used to filter the first candidate protocol library, excluding the second candidate protocol library that fails verification, based on protocol incompatibility evidence information; and to determine a new second candidate protocol library from the filtered first candidate protocol library.
[0197] In some embodiments, the protocol requirement feature generation module 510 is used to determine the protocol identity features of the smart device; determine the operating environment information required by the home host's protocol library; determine the communication method between the home host and the smart device; determine the firmware feature set corresponding to the smart device; determine the conversion interface set according to the functional requirements of the home host; determine the standard device attributes of the smart device in the home host; determine the message type of the smart device determined by the home host during the operation of the smart device; and generate device protocol requirement features based on the protocol identity features, operating environment information, communication method, firmware feature set, conversion interface set, standard device attributes, and message type.
[0198] In some embodiments, the protocol requirement feature generation module 510 is used to determine a requirement feature summary based on the device protocol requirement features; determine the description information of each protocol library in the protocol repository; and determine a plurality of first candidate protocol libraries from the protocol repository based on the requirement feature summary and the description information.
[0199] In some embodiments, the protocol requirement feature generation module 510 is used to organize the device protocol requirement features according to a preset field format; sort the organized device protocol requirement features according to preset rules; serialize the sorted device protocol requirement features; and perform a summary operation on the serialized device protocol requirement features to obtain a requirement feature summary.
[0200] In some embodiments, the isolation verification module 520 is used to download the second candidate protocol library to a preset isolation verification area; verify the second candidate protocol library in the isolation verification area; and after the verification is passed, test the second candidate protocol library according to the information actually output by the smart device.
[0201] In some embodiments, the isolation verification module 520 is further configured to determine change requirement information based on the new device protocol requirement characteristics and the old device protocol requirement characteristics when generating new device protocol requirement characteristics; and to verify the target protocol library based on the change requirement information.
[0202] In some embodiments, the calling module is configured to, after determining the target protocol library, append a protocol library generation identifier of the target protocol library to the newly received protocol processing request; append a protocol library generation identifier of the old protocol library to the previously received protocol processing request; and, based on the protocol library generation identifier, call the corresponding protocol library to process the protocol processing request.
[0203] In this embodiment, the home host determines the device protocol requirement characteristics of the smart device and, based on these characteristics, identifies multiple first candidate protocol libraries from a pre-set protocol repository. From these first candidate protocol libraries, a second candidate protocol library is selected and verified. If the second candidate protocol library fails verification, protocol incompatibility evidence information is generated. Based on this incompatibility evidence information, a new second candidate protocol library is selected from the remaining first candidate protocol libraries until the new second candidate protocol library passes verification. The verified second candidate protocol library is then used as the target protocol library. Through this embodiment, the home host can compile the results of failed candidate protocol library verifications into a set of incompatibility evidence information. The home host can then reorganize the candidate protocol libraries based on this incompatibility evidence information, eliminating those with the same incompatibility conditions and selecting the next candidate protocol library. Only one candidate protocol library is acquired and verified at any given time; only if the current one fails is the next one acquired. In this embodiment, subsequent candidate protocol libraries are no longer selected simply by decreasing version number, but are determined by the verification result of the previous candidate protocol library. After verification fails, the reason for the failure is extracted, the candidate range is modified, and the next candidate protocol library is obtained, forming a continuous feedback process. In this embodiment, the home host does not need to download all candidate protocol libraries at once, nor does it need to repeatedly try versions with the same defects.
[0204] This application also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the above-described method for determining the protocol library.
[0205] This application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, it implements the above-described method for determining the protocol library.
[0206] As the system implementation is basically similar to the method implementation, it is described in a relatively simple way. For relevant details, please refer to the description of the method implementation.
[0207] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0208] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0209] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A system that specifies functions in one or more boxes.
[0210] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including an instruction set implemented in a process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0211] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0212] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0213] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the statement "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0214] The above provides a detailed description of the method, system, electronic device, and storage medium for determining a protocol library. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for determining a protocol library, characterized in that, Applied to a home console, wherein the home console is communicatively connected to smart devices, the method includes: Determine the device protocol requirement characteristics of the smart device, and based on the device protocol requirement characteristics, determine multiple first candidate protocol libraries from a preset protocol repository; From multiple first candidate protocol libraries, a second candidate protocol library is determined, and the second candidate protocol library is verified. When the verification of the second candidate protocol library fails, evidence of protocol incompatibility against the second candidate protocol library is generated. Based on the evidence of protocol incompatibility, a new second candidate protocol library is determined from the remaining first candidate protocol library until the new second candidate protocol library is verified and the verified second candidate protocol library is used as the target protocol library.
2. The method according to claim 1, characterized in that, The generation of protocol incompatibility evidence information for the second candidate protocol library includes: Determine the failure stage where the second candidate protocol library verification fails; Determine the set of devices affected by the failure of the second candidate protocol library verification; Determine the requirement dimensions of the device protocol requirement features that are not met by the second candidate protocol library; Determine the root cause information of the second candidate protocol library verification failure; Based on the aforementioned demand dimensions and the root cause information, the filtering conditions are determined; Based on the failure stage, the set of devices, the demand dimension, the root cause information, and the filtering conditions, the protocol incompatibility evidence information is generated.
3. The method according to claim 1, characterized in that, The step of determining a new second candidate protocol library from the remaining first candidate protocol library based on the protocol incompatibility evidence information includes: Based on the evidence of protocol incompatibility, the first candidate protocol library, excluding the second candidate protocol library that failed verification, is filtered. From the filtered first candidate protocol library, a new second candidate protocol library is determined.
4. The method according to claim 1, characterized in that, The process of determining the device protocol requirement characteristics of the smart device includes: Determine the protocol identity characteristics of the smart device; Determine the operating environment information required by the home host operating protocol library; Determine the communication method between the home host and the smart device; Determine the firmware feature set corresponding to the smart device; Based on the functional requirements of the home host, determine the set of conversion interfaces; Determine the standard device attributes of the smart device in the home host system; The home host determines the message type of the smart device during the operation of the smart device; The device protocol requirement features are generated based on the protocol identity features, the operating environment information, the communication method, the firmware feature set, the conversion interface set, the standard device attributes, and the message type.
5. The method according to claim 1, characterized in that, The step of determining multiple first candidate protocol libraries from a preset protocol repository based on the device protocol requirement characteristics includes: Based on the device protocol requirement characteristics, a requirement characteristic summary is determined; The description information of each protocol library in the protocol repository is determined, and multiple first candidate protocol libraries are determined from the protocol repository based on the requirement feature summary and the description information.
6. The method according to claim 5, characterized in that, The step of determining the requirement feature summary based on the device protocol requirement characteristics includes: The device protocol requirement features are organized according to the preset field format; The device protocol requirement features are sorted according to preset rules; The sorted device protocol requirement features are serialized, and a digest operation is performed on the serialized device protocol requirement features to obtain the requirement feature digest.
7. The method according to claim 1, characterized in that, The verification of the second candidate protocol library includes: Download the second candidate protocol library to the preset isolation verification area; The second candidate protocol library in the isolation verification area is verified, and after the verification is passed, the second candidate protocol library is tested based on the information actually output by the smart device.
8. The method according to claim 1, characterized in that, The method further includes: When generating new device protocol requirement characteristics, change requirement information is determined based on the new device protocol requirement characteristics and the old device protocol requirement characteristics. The target protocol library is verified based on the changed requirements information.
9. The method according to claim 1, characterized in that, After determining the target protocol library, the method further includes: The newly received protocol processing request is appended with the protocol library generation identifier of the target protocol library; the previously received protocol processing request is appended with the protocol library generation identifier of the old protocol library. Based on the protocol library generation identifier, the corresponding protocol library is invoked to process the protocol processing request.
10. A system for determining a protocol library, characterized in that, The system is applied to a home host system, which communicates with smart devices, and includes: The protocol requirement feature generation module is used to determine the device protocol requirement features of the smart device, and to determine multiple first candidate protocol libraries from a preset protocol repository based on the device protocol requirement features. The isolation verification module is used to determine a second candidate protocol library from multiple first candidate protocol libraries and to verify the second candidate protocol library; The incompatibility evidence generation module is used to generate protocol incompatibility evidence information for the second candidate protocol library when the verification of the second candidate protocol library fails. The candidate control and progressive acquisition module is used to determine a new second candidate protocol library from the remaining first candidate protocol library based on the protocol incompatibility evidence information, until the new second candidate protocol library is verified and the verified second candidate protocol library is used as the target protocol library.
11. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the method for determining the protocol library as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the method for determining the protocol library as described in any one of claims 1 to 9.
