Method, device, system, apparatus and medium for determining protocol mapping relationship

CN122933776APending Publication Date: 2026-10-16GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611086227.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-21
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0004]在实际应用中,如果有多个协议映射关系与设备的相似度较高的话,可能出现多个协议映射关系都与设备的通信数据相匹配的情况,进而出现难以确定与设备确定性匹配的协议映射关系

Benefits of technology

本申请实施例中,在确定存在多个与通信样本模糊匹配的协议映射关系库时,可以基于预期响应结果来生成具备区分能力的探测描述,基于该探测描述,可以触发待识别设备执行对应的操作,并输出该操作对应的目标响应结果。基于目标响应结果和预期响应结果,可以确定与通信样本确定性匹配的协议映射关系库。基于该协议映射关系库,可以确定与待识别设备确定性匹配的目标协议映射关系。通过本申请实施例,可以在出现模糊匹配、无法准确确定待识别设备的协议映射关系时,基于对待识别设备的探测,确定待识别设备实际的反应;基于该反应与各个期望反应的对比,可以确定待识别设备实际使用的协议,进而确定与待识别设备存在确定性匹配关系的目标协议映射关系。相比于仅基于相似度来确定协议映射关系的方法,本申请可以基于待识别设备实际的反应,确定更准确的协议映射关系。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122933776A_ABST
    Figure CN122933776A_ABST
Patent Text Reader

Abstract

The application provides a protocol mapping relationship determination method, device, system, equipment and medium. The method comprises: determining a communication sample of a to-be-identified device, determining a plurality of first protocol mapping relationship libraries that are fuzzy matched with the communication sample; the first protocol mapping relationship library comprises a protocol mapping relationship between an original protocol and a target protocol and an expected response result corresponding to an instruction of the original protocol; determining a target detection description for the to-be-identified device according to the expected response result in each first protocol mapping relationship library; triggering the to-be-identified device to output a target response result according to the target detection description; and determining a target protocol mapping relationship of the to-be-identified device according to the target response result. When fuzzy matching occurs and the protocol mapping relationship of the to-be-identified device cannot be accurately determined, the actual reaction of the to-be-identified device is determined based on detection of the to-be-identified device; and the protocol actually used by the to-be-identified device can be determined based on comparison between the reaction and each expected reaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of smart home, specifically relating to a method, apparatus, system, device, and medium for determining protocol mapping relationships. Background Technology

[0002] In related technologies, a device library can be deployed in the cloud or locally; the device library can pre-configure device models, communication characteristics, and protocol mapping relationships.

[0003] After collecting the communication data of the device, it can be compared with the device library and the similarity can be calculated. Then, based on the protocol mapping relationship with the highest similarity, the protocol mapping relationship of the device can be determined. The protocol mapping relationship can be used to convert the original protocol (the device's protocol) to the target protocol (the platform or system's protocol).

[0004] In practical applications, if multiple protocol mapping relationships are highly similar to the device, multiple protocol mapping relationships may match the device's communication data, making it difficult to determine the protocol mapping relationship that definitively matches the device. Summary of the Invention

[0005] In view of the above problems, a method, apparatus, system, device, and medium for determining protocol mapping relationships are proposed to overcome or at least partially solve the above problems, including: A method for determining a protocol mapping relationship, the method comprising: A communication sample of the device to be identified is determined, and multiple first protocol mapping relationship libraries that are fuzzily matched with the communication sample are determined; the first protocol mapping relationship library includes the protocol mapping relationship between the original protocol and the target protocol, as well as the expected response result corresponding to the instruction of the original protocol; Based on the expected response results in each of the first protocol mapping relationship libraries, determine the target detection description for the device to be identified; Based on the target detection description, the device to be identified is triggered to output the target response result; Based on the target response result, the target protocol mapping relationship of the device to be identified is determined.

[0006] In some embodiments, determining the target detection description for the device to be identified based on the expected response results in each of the first protocol mapping relationship libraries includes: Determine the differences between the first expected response results in the first protocol mapping relationship library, and determine the probe description corresponding to each first expected response result; Determine the detection differentiation effectiveness and security risk costs of each detection description; Based on the detection differentiation effect and the security risk cost, a second expected response result is determined from the first expected response result; Based on the second expected response result, the target detection description is generated.

[0007] In some embodiments, determining the detection differentiation effect of each detection description includes: Before executing the detection description, determine the first number of multiple first protocol mapping relationship libraries that are fuzzily matched with the communication sample, and the first confidence level of each first protocol mapping relationship library; After the detection description is executed, the second number of the remaining multiple first protocol mapping relationship libraries that fuzzily match the communication sample, and the second confidence level of the remaining multiple multiple first protocol mapping relationship libraries that fuzzily match the communication sample are predicted. The detection differentiation effect is determined based on the first quantity, the first confidence level, the second quantity, and the second confidence level.

[0008] In some embodiments, determining the target protocol mapping relationship of the device to be identified based on the target response result includes: Based on the target response result, the protocol mapping relationship to be pruned is determined from multiple first protocol mapping relationship libraries; Based on the protocol mapping relationship to be pruned, the capability verification of the device to be identified is performed; Based on the verified capabilities, the protocol mapping relationship to be pruned is adjusted to obtain the target protocol mapping relationship.

[0009] This application also provides a method for determining protocol mapping relationships, applied to an edge device that is connected to the cloud for communication. The method includes: Collect communication samples of the device to be identified and determine whether there is a target protocol mapping relationship that definitively matches the communication samples; When no target protocol mapping relationship definitively matches the communication sample, the communication sample is sent to the cloud. The cloud is used to determine multiple first protocol mapping relationship libraries that fuzzily match the communication sample. The first protocol mapping relationship library includes the protocol mapping relationship between the original protocol and the target protocol, as well as the expected response result corresponding to the instruction of the original protocol. Based on the expected response results in each first protocol mapping relationship library, a target detection description for the device to be identified is determined. Based on the target detection description, the device to be identified is triggered to output a target response result. Based on the target response result, the target protocol mapping relationship of the device to be identified is determined. Receive the target protocol mapping relationship sent by the cloud.

[0010] In some embodiments, the communication samples include multiple samples, and sending the communication samples to the cloud includes: Multiple communication samples are compared longitudinally to determine the target relationship fingerprint of the communication samples; The target relationship fingerprint is sent to the cloud; the cloud is used to determine multiple first protocol mapping relationship libraries that fuzzily match the communication sample based on the target relationship fingerprint.

[0011] In some embodiments, the method further includes: Receive the target detection description sent by the cloud and determine the detection purpose of the target detection description; Based on the stated detection objective, the target response results output by the device to be identified are collected.

[0012] In some embodiments, the communication samples include multiple samples, and determining whether there is a target protocol mapping relationship that definitively matches the communication samples includes: Determine multiple second protocol mapping relationship libraries that fuzzily match the communication sample, and determine the similarity between the communication sample and each second protocol mapping relationship library; Identify the two highest similarity scores and determine the target second protocol mapping relationship library corresponding to the highest similarity scores; Determine the matching degree between the existing functional fields of the device to be identified and the functional fields in the target second protocol mapping relationship library; Determine the third quantity of the second protocol mapping relationship library and determine the consistency score of multiple communication samples; The discriminative sufficiency of the target second protocol mapping relation library is determined based on the two largest similarity scores, the consistency score, the matching degree, and the third quantity. When the discrimination sufficiency is less than a preset threshold, it is determined that the target protocol mapping relationship that can be deterministically matched with the communication sample cannot be determined. When the discrimination sufficiency is not less than the preset threshold, a target protocol mapping relationship that is deterministically matched with the communication sample is determined.

[0013] This application embodiment also provides a device for determining protocol mapping relationships, the device comprising: The first determining module is used to determine the communication sample of the device to be identified, and to determine a plurality of first protocol mapping relationship libraries that are fuzzily matched with the communication sample; the first protocol mapping relationship library includes the protocol mapping relationship between the original protocol and the target protocol, and the expected response result corresponding to the instruction of the original protocol; The second determining module is used to determine the target detection description for the device to be identified based on the expected response results in each of the first protocol mapping relationship libraries; The detection module is used to trigger the device to be identified to output a target response result based on the target detection description; The third determining module is used to determine the target protocol mapping relationship of the device to be identified based on the target response result.

[0014] This application embodiment also provides a protocol mapping relationship determination device, applied at an edge terminal, the edge terminal being communicatively connected to the cloud, the device comprising: The judgment module is used to collect communication samples of the device to be identified and determine whether there is a target protocol mapping relationship that definitively matches the communication samples; A sending module is configured to send the communication sample to the cloud when no target protocol mapping relationship definitively matches the communication sample; the cloud is configured to determine multiple first protocol mapping relationship libraries that fuzzily match the communication sample; the first protocol mapping relationship library includes the protocol mapping relationship between the original protocol and the target protocol, and the expected response result corresponding to the instruction of the original protocol; based on the expected response results in each first protocol mapping relationship library, a target detection description for the device to be identified is determined; based on the target detection description, the device to be identified is triggered to output a target response result; based on the target response result, the target protocol mapping relationship of the device to be identified is determined; The receiving module is used to receive the target protocol mapping relationship sent by the cloud.

[0015] This application also provides a cross-protocol device adaptive bridging system, which is used to perform the method for determining the protocol mapping relationship as described above.

[0016] 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 method for determining the protocol mapping relationship as described above.

[0017] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for determining the protocol mapping relationship as described above.

[0018] The embodiments of this application have the following advantages: In this embodiment, when multiple protocol mapping relationship libraries that fuzzily match the communication sample are determined, a discriminative detection description can be generated based on the expected response result. Based on this detection description, the device to be identified can be triggered to perform a corresponding operation and output the target response result corresponding to the operation. Based on the target response result and the expected response result, a protocol mapping relationship library that definitively matches the communication sample can be determined. Based on this protocol mapping relationship library, a target protocol mapping relationship that definitively matches the device to be identified can be determined. Through this embodiment, when fuzzy matching occurs and the protocol mapping relationship of the device to be identified cannot be accurately determined, the actual response of the device to be identified can be determined based on the detection of the device to be identified. Based on the comparison between this response and each expected response, the protocol actually used by the device to be identified can be determined, thereby determining the target protocol mapping relationship that definitively matches the device to be identified. Compared with methods that determine protocol mapping relationships based solely on similarity, this application can determine a more accurate protocol mapping relationship based on the actual response of the device to be identified. Attached Figure Description

[0019] 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 mapping relationship according to an embodiment of this application; Figure 2 This is a flowchart illustrating the steps of another method for determining a protocol mapping relationship according to an embodiment of this application. Figure 3 This is a schematic diagram illustrating a scenario for determining a protocol mapping relationship according to an embodiment of this application; Figure 4 This is a flowchart illustrating the steps for determining target order parameters according to an embodiment of this application; Figure 5 This is a schematic diagram illustrating the process of determining a protocol mapping relationship according to an embodiment of this application; Figure 6 This is a structural block diagram of a protocol mapping relationship determination device according to an embodiment of this application; Figure 7 This is an embodiment of the present application based on Figure 6 The flowchart shows the steps involved in determining the protocol mapping relationship of the system shown. Detailed Implementation

[0020] 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.

[0021] In related technologies, similarity matching is generally based on passively collected features. When multiple candidate devices have similar features, if the differences in device responses to specific security operations are not observed, the candidate device with the highest similarity value may be blindly used as the device's protocol mapping relationship, leading to control failure or even security issues. To address this, this application provides a method for determining protocol mapping relationships. When multiple protocol mapping relationships with fuzzy matches to a device are found, further judgment of the device can be made based on probe description, thereby ensuring that the determined target protocol mapping relationship is a deterministic match.

[0022] Reference Figure 1 The diagram illustrates a flowchart of a method for determining a protocol mapping relationship according to an embodiment of this application, which may include the following steps: Step 101: Determine the communication sample of the device to be identified, and determine multiple first protocol mapping relationship libraries that are fuzzily matched with the communication sample; the first protocol mapping relationship library includes the protocol mapping relationship between the original protocol and the target protocol, as well as the expected response result corresponding to the instruction of the original protocol.

[0023] Among them, the device to be identified can refer to the device whose protocol mapping relationship between the original protocol and the target protocol needs to be determined, which can be a smart home device.

[0024] Each device to be identified has its own proprietary protocol. To unify devices with different proprietary protocols, a platform or system can be set up, which can be the target protocol, such as Matter.

[0025] To connect devices using proprietary / native protocols (e.g., infrared, Bluetooth, Zigbee, Sub-1GHz devices) to a system using the target protocol, it is necessary to first determine the protocol mapping relationship between the native and target protocols. This mapping relationship can include the mapping relationship between the data of the native protocol and the data of the target protocol.

[0026] In this embodiment of the application, in order to determine the target protocol mapping relationship between the original protocol and the target protocol of the device to be identified, a communication sample of the device to be identified can be determined first. The communication sample may include data information of the interaction between the device to be identified and other devices and platforms.

[0027] For example, communication samples of the device to be identified can be obtained through an infrared receiver, Bluetooth, Zigbee, or a Sub-1GHz radio frequency front-end. These communication samples can include multiple interaction data points from the device to be identified, or they can include a single frame of data.

[0028] For example, if the device to be identified is an infrared air conditioner remote control, the user can be guided to perform operations such as turning on / off, increasing the temperature, and switching modes; through the infrared receiver, communication samples of the device to be identified can be collected.

[0029] For example, if the device to be identified is a radio frequency device with status reporting capability, then data packets of the device to be identified in different states can be collected through the radio frequency front end.

[0030] In some embodiments, if the determination of the protocol mapping relationship is performed at the edge (e.g., gateway, smart central control host, independent bridge, etc.), the collected raw data can be used as a communication sample to perform subsequent steps.

[0031] In other embodiments, if the determination of the protocol mapping relationship is performed in the cloud, in order to protect data security, after the edge device collects the original data, it can first perform desensitization and other processing on the original data to obtain a communication sample, and then send the communication sample to the cloud for subsequent steps.

[0032] After determining the communication sample, multiple first protocol mapping relationship libraries that fuzzily match the communication sample can be identified from the local database. The local database can store multiple protocol mapping relationship libraries, each corresponding to a different original protocol.

[0033] The protocol mapping relationship library may include the protocol mapping relationship between the original protocol and the target protocol; in some embodiments, the protocol mapping relationship library may also include the expected response result corresponding to the instruction of the original protocol.

[0034] The expected response result is used to characterize the reaction that the device to be identified will make in response to the instructions of the original protocol. The reaction may include characteristics of the information issued by the device in response to the instructions, such as modified fields, demonstrated capabilities, and adjustment relationships between fields.

[0035] In practical applications, different source protocols may have the same functional instructions. For example, protocol A may have a function instruction to turn on the air conditioner, and protocol B may also have a function instruction to turn on the air conditioner. However, the functional instructions of different source protocols may correspond to different expected response results.

[0036] For example: Protocol A has a function command to turn on the air conditioner. In response to this command, the device will send a message to the platform. Based on the characteristics of Protocol A, the message will modify the Mth field of the message. Protocol B also has a function command to turn on the air conditioner. In response to this command, the device will send a message to the platform. Based on the characteristics of Protocol B, the message will modify the Nth field of the message. N and M are positive integers, and N≠M.

[0037] For Protocol A, in response to the function command to turn on the air conditioner, modifying the Mth field of the information is an expected response result in its corresponding protocol mapping relationship library; for Protocol B, in response to the function command to turn on the air conditioner, modifying the Nth field of the information is an expected response result in its corresponding protocol mapping relationship library; based on the difference in the modified fields, the two protocols can be distinguished.

[0038] In some embodiments, after obtaining a communication sample, the protocol features of the communication sample can be extracted and compared with the protocol features of the protocol mapping relationships in various protocol mapping relationship libraries to determine multiple first protocol mapping relationship libraries that fuzzily match the communication sample. These multiple first protocol mapping relationship libraries have a fuzzy matching relationship with the original protocol of the device to be identified, that is, the protocol mapping relationships included in these first protocol mapping relationship libraries may all be the target protocol mapping relationships of the device to be identified.

[0039] Step 102: Determine the target detection description for the device to be identified based on the expected response results in each of the first protocol mapping relationship libraries.

[0040] After determining multiple first protocol mapping relationship libraries that fuzzily match the communication samples, in order to further determine the target protocol mapping relationship that deterministically matches the device to be identified, the expected response results in the first protocol mapping relationship library can be determined, and based on these expected response results, the target detection description for the device to be identified can be determined.

[0041] The target detection description can be a distinguishing action plan, which can be a structured task description; the target detection description can include the operation that the device to be identified needs to perform, and the multiple response results that the device to be identified may have after performing the operation, i.e. multiple expected response results.

[0042] For example: Protocol A has a function command to turn on the air conditioner. In response to this command, the device will send a message to the platform. Based on the characteristics of Protocol A, this message will modify the Mth field of the message. Protocol B also has a function command to turn on the air conditioner. In response to this command, the device will send a message to the platform. Based on the characteristics of Protocol B, this message will modify the Nth field of the message. N and M are both positive integers, and N ≠ M. Then the following target detection description can be generated: Trigger the device to be identified to turn on the air conditioner and receive information sent by the device to identify whether the Nth field or the Mth field was modified.

[0043] In some embodiments, after determining the expected response results in the first protocol mapping relation library, all first protocol mapping relation libraries can be analyzed to identify the different expected response results, and a target detection description can be generated based on these different expected response results.

[0044] For example: Protocol A has a function command to turn on the air conditioner. In response to this command, the device will send a message to the platform. Based on the characteristics of Protocol A, this message will modify the Mth field of the message. Protocol B also has a function command to turn on the air conditioner. In response to this command, the device will send a message to the platform. Based on the characteristics of Protocol B, this message will modify the Nth field of the message. N and M are both positive integers, and N≠M. Then, a target detection description can be generated based on this expected response result.

[0045] For example: Protocol A has a function command to turn off the air conditioner. In response to this command, the device will send a message to the platform. Based on the characteristics of Protocol A, this message will modify the Q-th field of the message. Protocol B also has a function command to turn off the air conditioner. In response to this command, the device will send a message to the platform. Based on the characteristics of Protocol B, this message will modify the Q-th field of the message. Q is a positive integer, and N≠M. Since the two expected responses are the same and indistinguishable, a target detection description is not generated based on this expected response.

[0046] Step 103: Based on the target detection description, trigger the device to be identified to output the target response result.

[0047] After obtaining the target detection description, the device to be identified can be triggered to perform a corresponding operation based on this description. When performing the corresponding operation, the device to be identified will output the corresponding target response result. The target response result can be a capability performed by the device to be identified, or it can be information returned by the device to be identified, or fields modified by the returned information, etc.

[0048] Step 104: Determine the target protocol mapping relationship of the device to be identified based on the target response result.

[0049] After obtaining the target response result, it can be determined which first protocol mapping relationship library corresponds to the expected response result in which the target response result corresponds; then, the first protocol mapping relationship library that is deterministically matched with the device to be identified can be determined, and the protocol mapping relationship in the first protocol mapping relationship library is used as the target protocol mapping relationship that is deterministically matched with the communication sample, that is, the target protocol mapping relationship of the device to be identified is determined.

[0050] In some embodiments, after determining the target protocol mapping relationship, a virtual endpoint can be registered for the device to be identified for protocol conversion of subsequent interactive data.

[0051] In this embodiment, when multiple protocol mapping relationship libraries that fuzzily match the communication sample are determined, a discriminative detection description can be generated based on the expected response result. Based on this detection description, the device to be identified can be triggered to perform a corresponding operation and output the target response result corresponding to the operation. Based on the target response result and the expected response result, a protocol mapping relationship library that definitively matches the communication sample can be determined; based on this protocol mapping relationship library, a target protocol mapping relationship that definitively matches the device to be identified can be determined. Through this embodiment, when fuzzy matching occurs and the protocol mapping relationship of the device to be identified cannot be accurately determined, the actual response of the device to be identified can be determined based on the detection of the device to be identified; based on the comparison of this response with each expected response, the protocol actually used by the device to be identified can be determined, and thus the target protocol mapping relationship that definitively matches the device to be identified can be determined. Compared with the method of determining the protocol mapping relationship based solely on similarity, this application can determine a more accurate protocol mapping relationship based on the actual response of the device to be identified.

[0052] Reference Figure 2 The flowchart illustrates another method for determining protocol mapping relationships according to an embodiment of this application, which may include the following steps: Step 201: Determine the communication sample of the device to be identified, and determine multiple first protocol mapping relationship libraries that are fuzzily matched with the communication sample.

[0053] In some embodiments, if the determination of the protocol mapping relationship is implemented by the edge terminal, the edge terminal can first collect communication samples of the device to be identified; then, the edge terminal can determine multiple first protocol mapping relationship libraries that are fuzzily matched with the communication samples from the local database.

[0054] In other embodiments, if the determination of the protocol mapping relationship is implemented by the cloud, the edge device can first collect communication samples of the device to be identified; then, the edge device can directly send the communication samples to the cloud to perform subsequent steps; or, the edge device can first desensitize the communication samples before sending them to the cloud to perform subsequent steps, so as to avoid the leakage of users' personal privacy information.

[0055] Step 202: Determine the first expected response results that differ between the first protocol mapping relationship libraries, and determine the probe description corresponding to each first expected response result.

[0056] After determining the first protocol mapping relationship library, the expected response result corresponding to each first protocol mapping relationship library can be determined first; then, the expected response results that are different from each other can be taken as the first expected response result.

[0057] For example, different models of air conditioners can all perform temperature adjustment operations; different models of air conditioners will modify different fields in the output information after temperature adjustment. The response result of modifying different fields in the output information after adjusting the air conditioner temperature can be taken as the first expected response result. During the detection process, based on the modified field positions in the output information of the device to be identified, the model of the air conditioner can be determined, and thus the corresponding target protocol mapping relationship can be determined.

[0058] In some embodiments, after initially screening and determining the first expected response results, the detection descriptions corresponding to each first expected response result can be further determined, and these candidate detection descriptions can be evaluated, thereby ultimately selecting target detection descriptions with discriminative capabilities.

[0059] For example, the detection description may include the operation that the device needs to perform and the expected response that the device will output under that operation.

[0060] In another example, the probe description may also include the modified field that needs to be distinguished, or the response relationship that needs to be distinguished, or a capability of the device that needs to be triggered, which can be determined based on the actual first expected response result. This application embodiment does not limit this.

[0061] For example, if the probe description is used to perform a read-only query on the status of the air conditioner, then the air conditioner will output status information as the expected response result.

[0062] For example, the detection description used for air conditioner status control can prompt the user to operate on the infrared remote control to adjust the air conditioner's status. At this time, the data of the interaction between the air conditioner and the infrared remote control can be collected as the expected response result.

[0063] Step 203: Determine the detection differentiation effect and security risk cost of each detection description.

[0064] After determining the detection description corresponding to each first expected response result, the detection differentiation effect of each first expected response result and the security risk cost of each first expected response result can be determined.

[0065] In some embodiments, the number of first protocol mapping relation libraries that are fuzzy-matched with communication samples before and after performing a probe description can be predicted; based on this number, the detection discrimination effect can be determined; the larger the difference in the number before and after, the better the detection discrimination effect.

[0066] In other embodiments, the security risk cost can be determined based on the detection method required by the detection description; for example, the security risk cost of the status query detection method is lower than that of the device control detection method.

[0067] In one embodiment of this application, step 203 can determine the detection and differentiation effect through the following sub-steps: Sub-step 11: Determine the first number of multiple first protocol mapping relationship libraries that are fuzzily matched with the communication sample before executing the detection description, and the first confidence level of each first protocol mapping relationship library.

[0068] In some embodiments, a first number of multiple first protocol mapping relationship libraries that fuzzily match the communication sample can be determined first. Additionally, a first confidence level for each first protocol mapping relationship library can be determined based on the similarity between each first protocol mapping relationship library and the communication sample; the higher the similarity, the higher the first confidence level.

[0069] The first quantity and the first confidence level can be determined when identifying multiple first protocol mapping relationship libraries that fuzzily match the communication samples.

[0070] Sub-step 12: Predict the second number of the remaining multiple first protocol mapping relationship libraries that fuzzily match the communication sample after the detection description is executed, and the second confidence level of the remaining multiple first protocol mapping relationship libraries that fuzzily match the communication sample.

[0071] In some embodiments, the distinguishing capability of the probe description can be used to perform secondary filtering on multiple first protocol mapping relationship libraries; for example, it can be based on the distinguishable response results output by the device to be identified after the probe description triggers the device to be identified.

[0072] For example: the first number of multiple first protocol mapping relationship libraries that are fuzzy matched with the communication sample is determined to be 3, and these three first protocol mapping relationship libraries correspond to protocol A, protocol B and protocol C respectively; The device to be identified is triggered to return device status information. Protocol A modifies the first field of the returned device status information, Protocol B modifies the second field, and Protocol C modifies the third field. If the probe description is used to trigger the device to be identified to return device status information, based on the position of the modified fields in the returned device status information, a unique remaining set of multiple first protocol mapping relationships that fuzzily match the communication sample can be determined; therefore, the second quantity is 1.

[0073] After the detection description is predicted and the remaining multiple first protocol mapping relationship libraries that are fuzzily matched with the communication sample are obtained, the similarity between these remaining first protocol mapping relationship libraries and the communication sample can be determined, and then the second confidence level can be determined; the higher the similarity, the higher the second confidence level.

[0074] Sub-step 13: Determine the detection differentiation effect based on the first quantity, the first confidence level, the second quantity, and the second confidence level.

[0075] After determining the first quantity, the second quantity, the first confidence level, and the second confidence level, the detection discrimination effect of the detection description can be calculated based on the first quantity, the first confidence level, the second quantity, and the second confidence level.

[0076] Step 204: Based on the detection differentiation effect and the security risk cost, determine the second expected response result from the first expected response result.

[0077] After determining the detection differentiation effect and security risk cost, a detection score can be calculated for each detection description based on the detection differentiation effect and the security risk cost. Based on this detection score, a second expected response result corresponding to the detection description with high differentiation ability and low security cost can be selected from multiple first expected response results.

[0078] Step 205: Generate the target detection description based on the second expected response result.

[0079] After determining the second expected response results, a target detection description for the device to be identified can be generated based on these second expected response results.

[0080] Step 206: Based on the target detection description, trigger the device to be identified to output the target response result.

[0081] After obtaining the target detection description, the device to be identified can be triggered to perform a corresponding operation based on this description. When performing the corresponding operation, the device to be identified will output the corresponding target response result. The target response result can be a capability performed by the device to be identified, or it can be information returned by the device to be identified, or fields modified by the returned information, etc.

[0082] Step 207: Based on the target response result, determine the protocol mapping relationship to be pruned from multiple first protocol mapping relationship libraries.

[0083] After obtaining the target response result, it can be determined which expected response result in the first protocol mapping relationship library corresponds to the target response result; then, the first protocol mapping relationship library that is deterministically matched with the device to be identified can be determined, and the protocol mapping relationship in the first protocol mapping relationship library is used as the protocol mapping relationship that is deterministically matched with the communication sample.

[0084] In some embodiments, the same model may support different functions due to differences in firmware version, regional version, or sub-model. Simply determining the model number does not prove that the device actually supports a particular command or status feedback. To address this, in this application embodiment, after determining the protocol mapping relationship that deterministically matches the communication sample, it can first be used as a protocol mapping relationship to be pruned; then, its actual capabilities can be verified and the mapping pruned to determine the target protocol mapping relationship adapted to the device to be identified.

[0085] Step 208: Verify the capability of the device to be identified according to the protocol mapping relationship to be pruned.

[0086] In some embodiments, after determining the protocol mapping relationship to be pruned, the platform or system can issue a test command, and the bridge can switch to the original protocol operation of the device to be identified in order to realize the capability verification of the device to be identified; during verification, the validity of the mapping can be determined based on the response of the device to be identified or the environmental feedback.

[0087] For example, if the protocol mapping relationship to be pruned includes a temperature adjustment setting, but the ambient temperature is not detected to have changed during capability verification, it can be determined that the mapping relationship for temperature adjustment capability in the protocol mapping relationship to be pruned is invalid for the device to be identified, and the mapping relationship corresponding to this capability can be deleted from the protocol mapping relationship to be pruned.

[0088] Step 209: Based on the verified capabilities, adjust the protocol mapping relationship to be pruned to obtain the target protocol mapping relationship.

[0089] In some embodiments, after verifying each capability in the protocol mapping relationship to be pruned, the protocol mapping relationship to be pruned can be adjusted based on the verified capabilities and the unverified capabilities, thereby obtaining the target protocol mapping relationship.

[0090] For example, unverified capabilities can be removed from the protocol mapping to be pruned, while verified capabilities can be retained, thus obtaining the target protocol mapping.

[0091] In this embodiment, when multiple protocol mapping relationship libraries that fuzzily match the communication sample are determined, a discriminative detection description can be generated based on the expected response result. Based on this detection description, the device to be identified can be triggered to perform a corresponding operation and output the target response result corresponding to the operation. Based on the target response result and the expected response result, a protocol mapping relationship library that definitively matches the communication sample can be determined; based on this protocol mapping relationship library, a target protocol mapping relationship that definitively matches the device to be identified can be determined. Through this embodiment, when fuzzy matching occurs and the protocol mapping relationship of the device to be identified cannot be accurately determined, the actual response of the device to be identified can be determined based on the detection of the device to be identified; based on the comparison of this response with each expected response, the protocol actually used by the device to be identified can be determined, and thus the target protocol mapping relationship that definitively matches the device to be identified can be determined. Compared with the method of determining the protocol mapping relationship based solely on similarity, this application can determine a more accurate protocol mapping relationship based on the actual response of the device to be identified.

[0092] In addition, the final target protocol mapping relationship in this application embodiment is generated based on actual test capabilities rather than directly using a general mapping table, thereby avoiding the exposure of erroneous functions caused by differences in firmware versions, regional models or sub-models, and improving the reliability and security of Matter virtual device control.

[0093] The above mainly explains the method of protocol mapping relationship from the perspective of the cloud; however, it does not limit the above method of determining the protocol mapping relationship to only the cloud; it can also be applied to the edge.

[0094] The following section explains another method for determining protocol mapping relationships from the perspective of combining edge computing and cloud computing: Reference Figure 3 The flowchart illustrates another method for determining protocol mapping relationships according to an embodiment of this application, which may include the following steps: Step 301: Collect communication samples of the device to be identified and determine whether there is a target protocol mapping relationship that definitively matches the communication samples.

[0095] The embodiments of this application can be applied to edge devices, which can be used for preliminary identification, data anonymization, detection capabilities, etc. For example, the edge device can acquire communication samples of the device to be identified through an infrared receiver, Bluetooth, Zigbee, or a Sub-1GHz radio frequency front-end.

[0096] After obtaining the communication sample, the edge device can first query the information stored locally to determine whether there is a target protocol mapping relationship that definitively matches the communication sample.

[0097] If the edge device directly determines the target protocol mapping relationship that definitively matches the communication sample locally, it can directly perform protocol conversion on the interaction between the platform or system and the device to be identified based on the target protocol mapping relationship.

[0098] In one embodiment of this application, the communication samples include multiple ones. Based on this, step 301 can determine whether there is a target protocol mapping relationship that definitively matches the communication samples by the following sub-steps: Sub-step 21: Determine multiple second protocol mapping relationship libraries that are fuzzily matched with the communication sample, and determine the similarity between the communication sample and each second protocol mapping relationship library.

[0099] In some embodiments, when determining whether a target protocol mapping relationship that definitively matches the communication sample exists locally, the edge device can first calculate the discrimination sufficiency for each protocol mapping relationship in the protocol mapping relationship library. The discrimination sufficiency can be used to determine whether the protocol mapping relationship library that matches the communication sample is a deterministic match.

[0100] For example, the edge device can first determine multiple protocol mapping relationship libraries that fuzzily match the communication samples in a local library, i.e., a second protocol mapping relationship library. The local library can store protocol mapping relationship libraries corresponding to different protocols, different versions, and different signal devices.

[0101] When determining the second protocol mapping database, the similarity between the communication sample and the second protocol mapping database can also be calculated.

[0102] For example, the edge device can extract lightweight features such as wave frequency category, preamble type, frame length, pulse interval ratio, public manufacturer field, and response delay interval from the communication sample, and match them with various protocol mapping relationship libraries in the local library to determine the similarity between the communication sample and each protocol mapping relationship library.

[0103] Based on this similarity, filtering can be performed to determine multiple second protocol mapping relationship libraries that fuzzily match the communication sample. For example, protocol mapping relationship libraries with a similarity exceeding a preset threshold can be used as the second. As another example, the P protocol mapping relationship libraries with the highest similarity can be used as the second protocol mapping relationship libraries; this application embodiment does not impose any limitations on this.

[0104] After determining the second protocol mapping relationship library, the similarity between the corresponding second protocol mapping relationship library and the communication sample can be determined.

[0105] Sub-step 22: Determine the two similarities with the largest values, and determine the target second protocol mapping relationship library corresponding to the largest similarity value.

[0106] After identifying multiple second protocol mapping relationship libraries, the two with the highest similarity values ​​can be determined, along with the second protocol mapping relationship library corresponding to the highest similarity value. The second protocol mapping relationship library corresponding to the highest similarity value is then used as the target second protocol mapping relationship library.

[0107] Sub-step 23: Determine the matching degree between the existing functional fields of the device to be identified and the functional fields in the target second protocol mapping relationship library.

[0108] In some embodiments, after determining the target second protocol mapping relationship library, the functional fields in the target second protocol mapping relationship library can be determined. These functional fields can refer to fields in the protocol message used to identify specific operational functions, and are one of the fingerprint characteristics of the protocol.

[0109] After obtaining the communication samples of the device to be identified, the functional fields in the determined target second protocol mapping relationship library can be used to perform matching analysis with the communication samples. This determines whether there are fields in the communication samples that correspond to functional fields in the target second protocol mapping relationship library, and then predicts the functional fields in the communication samples that are consistent with functional fields in the target second protocol mapping relationship library. Based on the number of consistent functional fields, the matching degree between the existing functional fields of the device to be identified and the functional fields in the target second protocol mapping relationship library can be determined.

[0110] Sub-step 24: Determine the third number of the second protocol mapping relationship library and determine the consistency score of multiple communication samples.

[0111] In some embodiments, after determining the second protocol mapping relationship library, the number of these second protocol mapping relationship libraries can be calculated, i.e., the third number.

[0112] In other embodiments, after determining the second protocol mapping relationship library, the consistency score between these second protocol mapping relationship libraries and each communication sample can also be calculated. For example, the similarity between each communication sample and the protocol mapping relationship in the second protocol mapping relationship library can be calculated first, and then the similarity of the highest value and the similarity of the lowest value can be removed. Next, the difference between the average value and the median can be taken, the difference value can be subtracted by 1, and then multiplied by 100% to obtain the consistency score.

[0113] Sub-step 25: Determine the discriminative sufficiency of the target second protocol mapping relation library based on the two largest similarity values, the consistency score, the matching degree, and the third quantity.

[0114] After obtaining the two highest similarity scores, the consistency score, the matching degree, and the third quantity, the discrimination sufficiency of the target second protocol mapping relation library can be obtained through weighted calculation.

[0115] Among them, the third quantity can be used as a candidate quantity penalty term. The more the second protocol mapping relationship library of fuzzy matching has, the larger the value of the candidate quantity penalty term will be.

[0116] Sub-step 26: When the discrimination sufficiency is less than a preset threshold, it is determined that the target protocol mapping relationship that is deterministically matched with the communication sample cannot be determined.

[0117] After obtaining the discrimination sufficiency, the relationship between the discrimination sufficiency and a preset threshold can be determined. If the discrimination sufficiency is less than the preset threshold, the edge end can determine that the existing observations are insufficient to exclude similar candidates. Even if the local library has already hit the target, it is determined that cloud collaborative verification is required. That is, the edge end determines that it cannot determine the target protocol mapping relationship that is deterministically matched with the communication sample and needs cloud assistance.

[0118] Sub-step 27: When the discrimination sufficiency is not less than the preset threshold, determine the target protocol mapping relationship that is deterministically matched with the communication sample.

[0119] If the discrimination sufficiency is not less than the preset threshold, the edge endpoint can determine that the existing observations are sufficient to exclude similar candidates. In this case, the edge endpoint can use the protocol mapping relationship in the protocol mapping relationship library that is determined in the local library and definitively matches the communication sample as the target protocol mapping relationship. For example, the protocol mapping relationship corresponding to the second protocol mapping relationship library with the largest discrimination sufficiency value can be used as the target protocol mapping relationship.

[0120] Step 302: When no target protocol mapping relationship definitively matches the communication sample, the communication sample is sent to the cloud. The cloud is used to determine multiple first protocol mapping relationship libraries that fuzzily match the communication sample. The first protocol mapping relationship library includes the protocol mapping relationship between the original protocol and the target protocol, as well as the expected response result corresponding to the instruction of the original protocol. Based on the expected response results in each first protocol mapping relationship library, a target detection description for the device to be identified is determined. Based on the target detection description, the device to be identified is triggered to output a target response result. Based on the target response result, the target protocol mapping relationship of the device to be identified is determined.

[0121] In some embodiments, if the edge device cannot determine the target protocol mapping relationship that definitively matches the communication sample locally, the target protocol mapping relationship of the device to be identified can be determined through the cloud.

[0122] For example, when the edge device cannot determine the target protocol mapping relationship that definitively matches the communication sample locally, the cloud can send the communication sample to the cloud for processing.

[0123] After receiving the communication sample, the cloud can first determine multiple first protocol mapping relationship libraries that are fuzzy matches with the communication sample from the local database.

[0124] In some embodiments, after obtaining a communication sample, the cloud can extract the protocol features of the communication sample and compare them with the protocol features of the protocol mapping relationships in various protocol mapping relationship libraries, thereby determining multiple first protocol mapping relationship libraries that are fuzzily matched with the communication sample.

[0125] After determining multiple first protocol mapping relationship libraries that fuzzily match the communication samples, in order to further determine the target protocol mapping relationship that definitively matches the device to be identified, the cloud can determine the expected response results in the first protocol mapping relationship library, and based on these expected response results, determine the target detection description for the device to be identified.

[0126] In some embodiments, after determining the expected response results in the first protocol mapping relationship library, the cloud can analyze all the first protocol mapping relationship libraries to identify the different expected response results, and generate a target detection description based on these different expected response results.

[0127] After obtaining the target detection description, the cloud can trigger the device to be identified to perform the corresponding operation based on the target detection description; specifically, the cloud can send the target detection description to the edge device.

[0128] After receiving the target detection description, the edge device can analyze it to determine the operation that needs to be triggered on the device to be identified. After triggering the corresponding operation, the edge device can detect the target response output by the device to be identified and send it directly to the cloud, or send it to the cloud after anonymization.

[0129] After receiving the target response result, the cloud can determine which expected response result in the first protocol mapping relationship library corresponds to the target response result; then, it can determine the first protocol mapping relationship library that is deterministically matched with the device to be identified, and use the protocol mapping relationship in the first protocol mapping relationship library as the target protocol mapping relationship that is deterministically matched with the communication sample, that is, determine the target protocol mapping relationship of the device to be identified.

[0130] In one embodiment of this application, the communication samples include multiple samples. Based on this, step 302 can send the communication samples to the cloud through the following sub-steps: Sub-step 31: Perform a longitudinal comparison of multiple communication samples to determine the target relationship fingerprint of the communication samples.

[0131] In related technologies, cloud-edge collaboration can be used to enable smart home devices to access a unified ecosystem. Specifically, the edge device can upload collected data or processed features to the cloud; the cloud then uses a large-scale device library or recognition model to determine the device model and return protocol mapping rules. This solution can utilize cloud computing power and a complete device library, but it has drawbacks such as leaking user operation behavior through uploaded data and generating incorrect bridging rules when a single cloud matching result is incorrect. Although MAC (Media Access Control) addresses can be removed, timestamps removed, normalized, and hashed from the original waveform, bitstream, or data packets, these desensitization methods only perform static transformations on existing data. If the uploaded content still retains the complete field order, command code, or continuous operation samples, the cloud may still infer that the user performed specific operations such as switching on / off, adjusting the temperature, or controlling the door lock.

[0132] To address this, embodiments of this application can perform relational processing on multiple interaction samples of the same device to form an irreversible target relation fingerprint. The target relation fingerprint may include a set of stable field positions, the linkage relationship between changing fields, the pulse interval ratio range, the response sequence relationship, and the frame length category, but does not include the original field values, the complete pulse sequence, the device unique identifier, and the absolute operation time.

[0133] In some embodiments, the edge device can generate random session identifiers according to the current identification task, preventing the target relationship fingerprints of different tasks from being directly linked into user behavior trajectories by the cloud. This application does not mask sensitive fields identified in the original data, but rather extracts which positions remain unchanged, which positions change synchronously, and what relationships exist between the changes from multiple device interactions. The uploaded object transforms from anonymized original data into a discriminative relationship that does not contain the original control values. Through the embodiments of this application, the data uploaded to the cloud can retain the device protocol distinguishability while reducing the possibility of the cloud reconstructing specific control commands and continuous operational behaviors from the uploaded data.

[0134] For example, after collecting multiple communication samples, the edge device can first perform a longitudinal comparison of multiple communication samples from the same device to be identified. That is, instead of just analyzing what fields are inside a single sample, it aligns the communication samples generated by the same device in multiple interactions according to field positions, pulse positions, or frame structures, and compares which positions remain unchanged, which positions change, and which positions change together. Based on this analysis, the target relationship fingerprint of the interaction data of the device to be identified can be determined.

[0135] Sub-step 32: Send the target relationship fingerprint to the cloud; the cloud is used to determine multiple first protocol mapping relationship libraries that are fuzzily matched with the communication sample based on the target relationship fingerprint.

[0136] After obtaining the target relationship fingerprint, the edge device can directly send the target relationship fingerprint to the cloud. The cloud can then determine multiple first protocol mapping relationship libraries that fuzzily match the communication sample based on the target relationship fingerprint.

[0137] For example, after receiving the target relationship fingerprint, the cloud can first determine whether there is a target protocol mapping relationship that definitively matches the communication sample; if so, it can directly return the target protocol mapping relationship to the edge.

[0138] If a target protocol mapping relationship that definitively matches the communication sample cannot be determined, then a library of multiple first protocol mapping relationships that fuzzily match the communication sample can be determined, and subsequent steps can be performed.

[0139] In some embodiments, after obtaining the target relationship fingerprint, the cloud can calculate the matching degree between each protocol mapping relationship library and the target relationship fingerprint, thereby selecting one or more protocol mapping relationship libraries from multiple protocol mapping relationship libraries.

[0140] For example, it can be determined whether the set of stable field positions, the linkage relationship between changing fields, the pulse interval ratio range, the response sequence relationship, and the frame length category in the protocol mapping relationship in each protocol mapping relationship library match the target relationship fingerprint.

[0141] In some embodiments, if these protocol mapping databases meet any of the following conditions, the cloud determines that it cannot determine a target protocol mapping that definitively matches the communication sample: 1. The cloud-based system selects at least two protocol mapping databases that match the communication sample from multiple databases. 2. The similarity difference between the two protocol mapping relationship libraries with the highest similarity is less than the threshold; 3. The stable field position set, the linkage relationship between changing fields, the pulse interval ratio range, the response sequence relationship, and the frame length category in the protocol mapping relationship of multiple matching protocol mapping relationship libraries all match the target relationship fingerprint; 4. Insufficient distinguishing fields in the target relationship fingerprint coverage; 5. Key capability fields were not observed; 6. Among the protocol mapping relationships of multiple matching protocol mapping relationship libraries, there are significant differences in the subsequent Matter mappings.

[0142] Step 303: Receive the target protocol mapping relationship sent by the cloud.

[0143] After determining the target protocol mapping relationship, the cloud can send the target protocol mapping relationship to the edge terminal; after receiving the target protocol mapping relationship, the edge terminal can register a virtual endpoint for the device to be identified for subsequent protocol conversion of interactive data.

[0144] In one embodiment of this application, the above method may further include the following steps: Receive the target detection description sent by the cloud and determine the detection purpose of the target detection description; collect the target response result output by the device to be identified according to the detection purpose.

[0145] In some embodiments, the cloud can send the generated target detection description to the edge device; after receiving the target detection description, the edge device can determine the detection purpose of the target detection description, that is, what operation needs to be triggered to be performed by the device to be identified, or what information needs to be detected.

[0146] Based on the detection objective, the edge device can determine a trigger command for the device to be identified, which can be used to trigger the device to be identified to perform a corresponding operation.

[0147] For example, the edge device's protocol is not yet known, therefore it cannot generate triggering instructions for the original protocol of the device being identified. Based on this, embodiments of this application can be divided into two cases: The first scenario includes infrared remote controls, door locks, gas valves, security equipment, etc. The edge device does not generate trigger commands, but only collects communication samples triggered by the user using the controller; for example, the cloud returns a target detection description to the edge device: Please collect a temperature increase operation and a mode switch operation, and compare the positions of the changed fields.

[0148] The edge device doesn't need to know the original infrared protocol, nor does it need to generate control codes for increasing the temperature. It simply prompts the user on the interface: Please press the temperature+ button on the original remote control.

[0149] After the user presses the button, the edge device captures an infrared frame to obtain the target response result output by the device to be identified; based on the target response result, a relationship fingerprint can be generated again and uploaded to the cloud.

[0150] The second type is that the edge devices already have secure general query capabilities.

[0151] For example, some Zigbee, BLE (Bluetooth Low Energy), Matter Bridge, or vendor LAN devices support read-only status queries. In this case, the edge device can perform a generic read-only query within the protocol family, rather than executing unknown control codes for the candidate model.

[0152] 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.

[0153] Reference Figure 4 The diagram illustrates the structure of a protocol mapping relationship determination device according to an embodiment of this application, which may include the following modules: The first determining module 401 is used to determine the communication sample of the device to be identified, and to determine a plurality of first protocol mapping relationship libraries that are fuzzily matched with the communication sample; the first protocol mapping relationship library includes the protocol mapping relationship between the original protocol and the target protocol, and the expected response result corresponding to the instruction of the original protocol; The second determining module 402 is used to determine the target detection description for the device to be identified based on the expected response results in each of the first protocol mapping relationship libraries; The detection module 403 is used to trigger the device to be identified to output a target response result based on the target detection description; The third determining module 404 is used to determine the target protocol mapping relationship of the device to be identified based on the target response result.

[0154] In some embodiments, the second determining module 402 is configured to determine that there are different first expected response results between the first protocol mapping relationship library, and determine the detection description corresponding to each first expected response result; determine the detection differentiation effect and security risk cost of each detection description; determine a second expected response result from the first expected response results based on the detection differentiation effect and the security risk cost; and generate the target detection description based on the second expected response result.

[0155] In some embodiments, the second determining module 402 is configured to determine a first number of multiple first protocol mapping relationship libraries that fuzzily match the communication sample before executing the detection description, and a first confidence level of each first protocol mapping relationship library; predict a second number of remaining multiple first protocol mapping relationship libraries that fuzzily match the communication sample after executing the detection description, and a second confidence level of the remaining multiple first protocol mapping relationship libraries that fuzzily match the communication sample; and determine the detection differentiation effect based on the first number, the first confidence level, the second number, and the second confidence level.

[0156] In some embodiments, the third determining module 404 is configured to determine, based on the target response result, a protocol mapping relationship to be pruned from a plurality of first protocol mapping relationship libraries; perform capability verification on the device to be identified based on the protocol mapping relationship to be pruned; and adjust the protocol mapping relationship to be pruned based on the verified capability to obtain the target protocol mapping relationship.

[0157] Reference Figure 5 This diagram illustrates the structure of another protocol mapping relationship determination device according to an embodiment of this application. This device can be applied to an edge device that communicates with the cloud. The device may include the following modules: The judgment module 501 is used to collect communication samples of the device to be identified and to determine whether there is a target protocol mapping relationship that definitively matches the communication samples; The sending module 502 is configured to send the communication sample to the cloud when there is no target protocol mapping relationship that definitively matches the communication sample; the cloud is configured to determine multiple first protocol mapping relationship libraries that fuzzily match the communication sample; the first protocol mapping relationship library includes the protocol mapping relationship between the original protocol and the target protocol, and the expected response result corresponding to the instruction of the original protocol; based on the expected response results in each first protocol mapping relationship library, a target detection description for the device to be identified is determined; based on the target detection description, the device to be identified is triggered to output a target response result; based on the target response result, the target protocol mapping relationship of the device to be identified is determined; The receiving module 503 is used to receive the target protocol mapping relationship sent by the cloud.

[0158] In some embodiments, the communication samples include multiple ones, and the sending module 502 is used to perform a longitudinal comparison of the multiple communication samples to determine the target relationship fingerprint of the communication samples; send the target relationship fingerprint to the cloud; the cloud is used to determine multiple first protocol mapping relationship libraries that are fuzzily matched with the communication samples based on the target relationship fingerprint.

[0159] In some embodiments, the apparatus further includes: The acquisition module is used to receive the target detection description sent by the cloud and determine the detection purpose of the target detection description; and to acquire the target response result output by the device to be identified according to the detection purpose.

[0160] In some embodiments, the communication samples include multiple types. The judgment module 501 is configured to determine multiple second protocol mapping relationship libraries that are fuzzily matched with the communication samples, and determine the similarity between the communication samples and each second protocol mapping relationship library; determine the two largest similarity values, and determine the target second protocol mapping relationship library corresponding to the largest similarity value; determine the matching degree between the existing functional fields of the device to be identified and the functional fields in the target second protocol mapping relationship library; determine the third quantity of the second protocol mapping relationship libraries, and determine the consistency score of the multiple communication samples; determine the discrimination sufficiency of the target second protocol mapping relationship library based on the two largest similarity values, the consistency score, the matching degree, and the third quantity; when the discrimination sufficiency is less than a preset threshold, it is determined that a target protocol mapping relationship that definitively matches the communication samples cannot be determined; when the discrimination sufficiency is not less than the preset threshold, a target protocol mapping relationship that definitively matches the communication samples is determined.

[0161] This application also provides a cross-protocol device adaptive bridging system, which can be used to perform the above-described method for determining protocol mapping relationships.

[0162] For example, refer to Figure 6 This diagram illustrates the structure of a cross-protocol device adaptive bridging system 60 according to an embodiment of this application. The system 60 may include a multi-protocol acquisition module 601, a local candidate identification module 602, a discrimination sufficiency evaluation module 603, a relationship fingerprint generation module 604, a cloud candidate retrieval module 605, a distinguishing detection generation module 606, an edge detection execution module 607, a capability verification module 608, and a Matter mapping generation module 609. (Refer to...) Figure 7 This illustrates an embodiment of the present application based on... Figure 6 The flowchart shows the steps involved in determining the protocol mapping relationship of system 60.

[0163] System 60 can run in a home gateway, smart central control host or independent bridge, and the edge hardware can be a microcontroller without neural network accelerator or a lightweight SoC (System on Chip).

[0164] The multi-protocol acquisition module 601 can be deployed at the edge; the multi-protocol acquisition module 601 can acquire communication samples of the device to be identified through an infrared receiver, Bluetooth, Zigbee, or Sub-1GHz radio frequency front-end. The system 60 prioritizes acquiring multiple interaction data from the same device to be identified, and may also include single frame data.

[0165] The raw waveforms and bitstreams acquired at the edge are stored only in a temporary buffer at the edge and are not uploaded to the cloud.

[0166] The local candidate identification module 602 can be deployed at the edge. The local candidate identification module 602 can extract lightweight features such as carrier frequency category, preamble type, frame length, pulse interval ratio, public manufacturer field and response delay interval from each communication sample and match them with the local library.

[0167] For example, the local candidate identification module 602 can extract the values ​​of different attributes from the communication samples and match them with the values ​​of different attributes in the protocol mapping relationships in the local library. A score is awarded for a match.

[0168] In addition, when calculating the matching score, the importance of different attributes can be considered to adjust the score. For example, if the attribute is important, the matching score is multiplied by 1.5; if the attribute is not important, the matching score is multiplied by 0.8. This application embodiment does not limit this.

[0169] After obtaining the matching scores for each attribute, the total score can be calculated. For example, the edge device extracts a set of lightweight features from the communication samples and compares them item by item with each protocol mapping relation in the local library.

[0170] For example: A communication sample from an infrared air conditioner is collected, and the local database contains protocol mapping database A and protocol mapping database B; as shown in Table 1: Table 1:

[0171] When matching, a weighted approach can be used for each item: Total score = Carrier frequency matching score + Preamble matching score + Frame length matching score + Pulse ratio matching score + Manufacturer field matching score + Response delay matching score.

[0172] Different features can be scored differently, for example: Category-based features: such as carrier frequency category, preamble type, and public manufacturer field.

[0173] Full marks are awarded for complete consistency; partial marks are awarded for belonging to adjacent or compatible categories; and zero marks are awarded for complete inconsistency.

[0174] Numerical features: such as frame length and response delay.

[0175] The smaller the difference, the higher the score; if it exceeds the allowable range, the score is 0.

[0176] Proportional characteristics: such as the ratio of long to short pulses, and the ratio of the guide segment to the data segment.

[0177] A perfect score is awarded if the candidate template range is filled; the greater the deviation, the lower the score. For example: Carrier frequency consistency: 20 points; Preamble matches: 20 points; Frame lengths are exactly the same: 20 points; Pulse ratio falls within the range: 15 points; Manufacturer field matches: 15 points; Overlapping response delay intervals: 10 points.

[0178] In one example, protocol mapping database A has a total score of 95 points, while protocol mapping database B has a total score of 45 points. The large difference in their total scores indicates that edge detection is sufficient, and the protocol mapping relationship corresponding to protocol mapping database A can be used as the target protocol mapping relationship.

[0179] In another example, protocol mapping database A scored 80 points, while protocol mapping database B scored 76 points. The small difference in their total scores indicates that edge identification is insufficient and requires cloud-edge collaborative verification.

[0180] The discrimination sufficiency assessment module 603 can be deployed at the edge; the discrimination sufficiency assessment module 603 can calculate the discrimination sufficiency of each second protocol mapping relation library that is fuzzy-matched with the communication sample.

[0181] The sufficiency of discrimination S can be calculated using the following formula: S=w1*(d2-d1) / (d2+e)+w2*Cs+w3*Cf-w4*Cn; Wherein, d1 is the maximum similarity value when calculating the similarity between the communication sample and each of the second protocol mapping relationship libraries; d2 is the second maximum similarity value when calculating the similarity between the communication sample and each of the second protocol mapping relationship libraries. Only when the difference between d1 and d2 reaches the minimum threshold can the matching accuracy be considered sufficiently high. Cs is the consistency score, Cf is the existing functional fields of the device to be identified, and the matching degree between them and the functional fields in the target second protocol mapping relationship library (i.e., the second protocol mapping relationship library for which the discrimination sufficiency needs to be calculated). Cn is the candidate quantity penalty term, e is a constant to prevent the denominator from being zero, and w1 to w4 are weights.

[0182] When S is below the first threshold, it indicates that existing observations are insufficient to exclude similar candidates. Therefore, even if the local library has already matched, it is determined that cloud collaborative verification is required. When S is not below the first threshold, the verification capability steps are executed.

[0183] The relationship fingerprint generation module 604 performs a longitudinal comparison of multiple communication samples: For communication samples in the form of digital data frames, the relation fingerprint generation module 604 records the relationships of each field in multiple samples as to whether they are constant, independently changing, or linked, as well as the frame length category and the position of the verification field, but does not record the actual values ​​of each field.

[0184] "Constant" here means that a certain field remains unchanged across multiple samples. For example, remote control brand codes, device category codes, and fixed header fields usually remain consistent.

[0185] Independent change means that a certain field may change, but its change does not necessarily lead to synchronous changes in other business fields. For example, if the temperature field changes from 24 to 25 to 26, the field itself changes, but the mode field and the wind speed field do not change accordingly.

[0186] Linked changes refer to situations where two or more fields always change together, or where a change in one field causes another field to change according to a fixed relationship. For example, a validation field. If the temperature field changes, the validation field also changes; if the pattern field changes, the validation field also changes. Therefore, System 60 can infer a linked relationship between the validation field and the business field.

[0187] For infrared pulses, the relational fingerprint generation module 604 records the duration ratio range of the guide segment and the data segment, the arrangement relationship of long and short pulses, the common prefix length and variation range in multiple key samples, but does not record the complete pulse sequence.

[0188] The target relationship fingerprint can be sent to the cloud along with a random session identifier used to mark a single identification task, the protocol category, and the edge-executable detection security level. The protocol category can be initially determined by the edge's acquisition channel and low-level physical characteristics, while the detection security level can be used to inform the cloud of the maximum risk level of detection allowed at the edge, based on the current device and home status.

[0189] The cloud-based candidate retrieval module 605 can be deployed in the cloud; the cloud-based candidate retrieval module 605 can use a complete library to retrieve device models that match the target relationship fingerprint. If there is still ambiguity between candidates, the distinguishing detection generation module 606 can determine the target detection description based on multiple first protocol mapping relationship libraries.

[0190] For example, the distinguishable detection generation module 606 can be deployed in the cloud; the distinguishable detection generation module 606 can determine the target detection description that can distinguish candidates to the greatest extent and meets the security level according to multiple first protocol mapping relationship libraries; the target detection description is not the original control code, but a structured task description that tells the edge terminal "what relationship to observe".

[0191] Target detection descriptions may include: Detection types: for example, read-only queries, user-triggered data collection, and low-risk controls; Detection targets: For example, distinguishing between temperature fields, pattern fields, status response fields, etc.; Execution conditions: For example, whether user confirmation is required, and whether automatic execution is allowed; Expected response results: For example, what field changes should occur in candidate A (i.e., a first protocol mapping relation library), and what field changes should occur in candidate B (i.e., another first protocol mapping relation library); timeout period; Security level.

[0192] When determining the target detection description, the cloud candidate retrieval module 605 can first obtain multiple first protocol mapping relationship libraries based on the target relationship fingerprint search, which serve as candidate set C.

[0193] Then, the distinguishing detection generation module 606 can identify the fields, responses, or capabilities that differ between these candidates (i.e., the first protocol mapping relation library) from the candidate set C; Next, the distinguishing detection generation module 606 can enumerate the available detection descriptions p; the detection description p is not simply equivalent to the complete original control process of "instruction → execution → response", but is a candidate distinguishing action scheme, which may include the following: Target of detection: Which field, which response relationship, or which capability needs to be distinguished; Detection methods: read-only query, user-triggered collection, low-risk control, passive observation; Allowing conditions: Whether user confirmation is required, and whether automatic execution is allowed; Expected Relationship: The differences in the relationships that different candidates should exhibit under this probe; Security level: Whether the detection could alter the device's state.

[0194] The detection description p can be expressed as: For queryable devices: Send a read-only status request at the edge and observe the response frame length or field relationships; For infrared air conditioners: prompt the user to press "increase temperature", and collect the infrared frame change relationship at the edge; For low-risk lighting fixtures: the edge end briefly performs switching or brightness changes after user confirmation; For door locks and gas valves: the operation is not automatic; the user is only prompted to trigger the operation using the original controller, and the data is passively collected at the edge.

[0195] Then, we can estimate the different response relationships that different candidates will produce after each probe description p is executed; select the probe description p that best separates the candidates, while ensuring that the probe description p does not exceed the edge-allowed security level.

[0196] For a candidate detection description p, the detection score can be calculated by subtracting the security risk cost from the expected reduction in information entropy before and after detection from the candidate set C, i.e.: Gp=H(C)-sum(Pr(r)*H(C|r))-k*Risk(p); Here, Gp refers to the detection score of candidate detector p. The higher the score, the higher the priority for selection.

[0197] p: A description of a candidate probe, such as collecting two temperature increase operations and comparing the positions of the changed fields.

[0198] C: The current set of candidate devices. For example, C = {candidate A, candidate B, candidate C}.

[0199] H(C): The uncertainty of the candidate set C before probing. The more candidates there are and the closer their confidence levels are, the larger this value becomes. Before probing, it means that there are still multiple possible models in the current candidate set C. For example, C={A,B,C}, with confidence levels of 0.4, 0.35, and 0.25 respectively.

[0200] r: A possible response result after performing the probe, such as "Fields 3 and 8 change in tandem". "After probe" refers to the process where the edge device collects the response results according to the probe description, and then removes or reduces the confidence of some candidates based on the results. For example, if response result r1 appears and only matches candidate A, but not B or C, then the candidate set becomes C'={A} or the confidence of A is significantly increased.

[0201] Pr(r): The expected probability of a certain response relationship result r. This probability comes from the expected performance of different candidates in the cloud-based library for describing the probe.

[0202] H(C|r): After the response relationship result r has been observed, the remaining uncertainty of the candidate set can be determined based on the second number of the remaining multiple first protocol mapping relationship libraries that fuzzily match the communication sample after the prediction is executed, and the second confidence of the remaining multiple multiple first protocol mapping relationship libraries that fuzzily match the communication sample.

[0203] sum(Pr(r)*H(C|r)): The average residual uncertainty under all possible outcomes after performing the probe description.

[0204] H(C)-sum(Pr(r)*H(C|r)): The uncertainty that this detection is expected to reduce, that is, the expected distinguishing effect.

[0205] Risk(p): The security risk cost of detecting p, such as whether it changes the device status, involves door locks / gas / security, or requires user confirmation. The security risk cost is a quantified deduction for the potential adverse effects of detection. For example: Read-only status query: low risk, Risk close to 0; brief light switching: low risk; air conditioner temperature increase by 1 degree: low to medium risk; door lock unlocking, gas valve switching, security disarming: high risk; performing actions at night or in an unoccupied state: increased risk.

[0206] k: Risk weighting coefficient. The larger the k, the more conservative the system is, and the less willing it is to choose risky probes.

[0207] Information entropy can be used to measure the uncertainty of a candidate set. The more candidates there are and the closer their confidence levels are, the higher the uncertainty.

[0208] The detection generation module 606 can prioritize the detection with the highest Gp and a risk level that does not exceed the edge allowable level.

[0209] To avoid sending raw control codes from the cloud, the probe description does not contain any raw control codes that require direct execution at the edge. Instead, it describes the probe target and the expected relationship, thereby preventing the cloud from actually controlling the real device and also preventing the leakage of device protocols and user operation content.

[0210] In one example, the target detection description may include: Collect two temperature increase operations; compare the positions of the changed fields; determine the response frame length category; and determine whether a certain type of linked field appears.

[0211] Although different models may appear to use the same protocol and frame length, their specific field designs may differ. Therefore, for two infrared air conditioner candidates, the user could be asked to press the temperature increase and mode buttons sequentially, and the positions of the changed fields in the two response frames could be compared.

[0212] When making comparisons, the main focus is on comparing the positions of the changing fields between samples corresponding to different user operations within the same set of probe descriptions.

[0213] For example, a set of detections is described as follows: "Please press the 'Temperature Increase' and 'Mode' buttons in sequence, and compare the positions of the changed fields in the two response frames." The edge device collected sample S1: the response frame corresponding to the temperature increase; sample S2: the response frame corresponding to the mode switch.

[0214] Then compare S1 and S2 with the existing benchmark sample to see which fields have changed.

[0215] For example: Temperature increase: Field 3 changes, Field 8 validation changes; Mode switching: Field 5 changes, Field 8 validation changes.

[0216] Then the following relationship can be obtained: Field 3 may be related to temperature; Field 5 may be related to the schema; Field 8 changes with the business fields and is suspected to be a validation field.

[0217] If candidate A expects "temperature increase only changes field 3 and the validation field", and candidate B expects "temperature increase will also change the pattern field", then candidates that do not meet the requirements can be eliminated by comparing the positions of the changed fields.

[0218] The distinguishing probe generation module 606 does not compare the differences between two completely independent probe descriptions, but rather typically compares the position and linkage of different operation samples within a set of probe descriptions.

[0219] For devices that support status queries, the edge can be required to execute read-only status requests and determine the response frame length category; for door locks, gas valves, and security devices, automatic execution of detections that change the security status is prohibited, and only passive data collection or operations after user confirmation are allowed.

[0220] The edge detection execution module 607 can be deployed at the edge. After receiving the target detection description, the edge detection execution module 607 first checks the device category, security level, current home status, and detection permission list.

[0221] Eligible read-only probes are automatically performed at the edge. Low-risk probes that require changes to device status are executed only after user confirmation. High-risk detection is then converted into a data collection prompt triggered by the user using the original controller.

[0222] At the edge, the target response obtained from the probe is used to generate a relation fingerprint again. Only the target response is returned to the cloud to determine if it matches the expected relationships of each candidate; the original response content is not returned. System 60 then eliminates candidates that do not meet the relationship requirements based on this result. If multiple candidates remain, the next probe can be performed within the maximum number of attempts; if the maximum number of attempts is exceeded, user-assisted selection is initiated.

[0223] For example, the cloud can first obtain candidate A, B, and C based on the target relationship fingerprint. The cloud then provides a target detection description, such as "collecting temperature increase operation".

[0224] The edge device collects the detection response; next, the edge device does not upload the original frame, the complete pulse, or the specific command value; the edge device extracts the relationship fingerprint again, such as "field 3 and field 8 have changed in a linked manner"; the edge device determines whether the relationship meets the expectations of candidates A, B, and C respectively, and only returns the matching result to the cloud.

[0225] For example, the system returns whether each candidate matches the expected relationship: Candidate A matches the expected relationship, i.e., the expected response result in the target detection description; Candidate B and Candidate C do not match the expected relationship. Based on the matching results, the cloud or edge can eliminate B and C, increasing the confidence of A. By only returning the matching results to the cloud, the original control code and user operation privacy can be protected, allowing the cloud to still utilize the complete device knowledge base to disambiguate, and preventing erroneous candidates from directly entering the Matter mapping.

[0226] Take two candidate air conditioner remote controls using the same carrier frequency and the same frame length as an example: A single communication sample from a single on / off switch is insufficient to distinguish between the two. The cloud-based library indicates that candidate A only changes the temperature and check fields in the data frame when the temperature changes, while candidate B also synchronously changes the mode state field. Therefore, the cloud generates a detection description of two consecutive temperature increase operations. The edge compares the field change relationships between the two samples; if three sets of linked field changes are detected, candidate A is excluded. Throughout the process, the actual temperature value, command code, and complete pulse sequence are not uploaded.

[0227] Once the number of candidates reaches the confirmation threshold, the capability verification module 608 verifies the actual capabilities supported by the device to be identified item by item according to the pruned protocol mapping relationship. If the number of candidates does not reach the confirmation threshold and exceeds the maximum number of attempts, the process switches to user-assisted selection.

[0228] For queryable devices, the edge terminal confirms the switch, gear position, temperature, or status reporting capability through read-only commands; status reporting capability refers to the device's ability to return its current status either proactively or after being queried.

[0229] For unidirectional infrared devices, the user can be guided to execute several function keys, and the capability can be verified by combining infrared response relationships, smart socket power changes, temperature changes, or user confirmation results. Some devices, especially unidirectional infrared devices, have no readable response. In this case, the control can only be verified through external physical feedback. Capabilities that fail to be verified or lack supporting evidence are not mapped to the Matter endpoint.

[0230] Matter mapping generation module 609 generates device type, function cluster, attribute and command conversion relationship, i.e. target protocol mapping relationship, according to the verified capability; for example, confirming that the device supports on / off, cooling mode and target temperature adjustment.

[0231] After the mapping is generated, system 60 can perform a local loopback test: The Matter side (i.e., the edge) issues a low-risk test command, the bridge switches to the original protocol operation, and determines whether the mapping is valid based on the device response or environmental feedback. After the test passes, the virtual endpoint is officially registered.

[0232] To reduce subsequent reliance on the cloud, the cloud can return a local discrimination rule package to the edge. The local discrimination rule package is a structured data set generated for the device to be identified, which may include the minimum distinguishing rule between the device and similar candidate devices, the verified Matter mapping, the rule version number, and the failure condition, but does not contain a complete cloud device library.

[0233] The rule package is cached at the edge. When a device with the same fingerprint relationship is discovered again, the minimum differentiation rule can be applied first to complete local identification. When the device firmware changes, the detection results conflict, or the rule package expires, the cloud-edge detection and verification is restarted.

[0234] Through the above process, this application forms a closed loop of local candidate identification, discrimination sufficiency assessment, relation fingerprint uploading, cloud-based differentiation detection, edge response verification, and actual capability tailoring; it can dynamically organize multiple rounds of discrimination processes on both the cloud and edge sides according to identification ambiguities, and make the final Matter mapping based on the current measured capabilities of the device.

[0235] On one hand, after local matching, the edge device not only outputs device candidates but also calculates the sufficiency of discrimination. The sufficiency of discrimination is determined based at least on the distance between the first and second candidates, the consistency of multiple sample collections, the coverage of identified functional fields, and the number of candidates. When the sufficiency of discrimination is higher than a first threshold, the local result is used; when it is lower than the first threshold, cloud-edge collaborative verification is initiated even if the local database has already matched the candidate. The triggering criterion for cloud queries changes from the existence of the local cache to whether existing observations are sufficient to exclude similar candidates. This mechanism can detect local false hits and low-confidence hits. Through the embodiments of this application, the probability of similar devices being misidentified can be reduced, while high-sufficiency devices can continue to complete bridging quickly locally.

[0236] On the other hand, the edge performs relational processing on multiple interaction samples of the same device, forming irreversible relational fingerprints. This application does not mask sensitive fields after identifying them in the original data; instead, it extracts which positions remain unchanged, which positions change synchronously, and what relationships exist between these changes from multiple device interactions. The uploaded object transforms from anonymized original data into a discriminative relationship that does not contain the original control values. This application, while retaining the ability to distinguish device protocols, reduces the possibility of the cloud reconstructing specific control commands and continuous operational behaviors from the uploaded data.

[0237] On the other hand, after receiving the relationship fingerprint, the cloud does not directly return a unique device model, but instead returns a set of candidate devices and a security probe description used to distinguish the candidate devices. The security probe description includes the probe type, allowed execution conditions, expected response relationship, timeout time, and security level. The edge only performs read-only queries, stateless queries, or operations triggered by the user, collects probe responses, and generates response relationship fingerprints. The cloud or edge updates the candidate confidence based on this until a unique candidate meets the confirmation threshold or reaches the maximum number of probes. The cloud-edge interaction changes from a one-way upload of features and return of categories to a two-way verification process of uploading relationship fingerprints, returning distinguishing probes, and the edge executing and returning the relationship results. The cloud uses large-scale device knowledge to select probes with high information gain, while the edge retains control over the real devices and the original responses. This application can proactively eliminate similar candidates without uploading the original response content, improve the accuracy of unknown device identification, and avoid the direct use of a single misjudgment by the cloud for device control.

[0238] On the other hand, after the candidate model is confirmed, the edge device performs local capability verification based on the capability candidate table returned by the cloud. For status query capabilities, the edge device sends read-only probes and checks the response relationships; for control capabilities, the user triggers the original remote control operation or performs the minimum control action in the low-risk allowed list, and verifies the results through device feedback or environmental sensors. The edge device only generates Matter function clusters and command mappings for verified capabilities and marks unverified capabilities as unavailable. This application sets model similarity identification and current device capability verification as two consecutive stages. The final bridging rules are generated by the edge device based on the measured capabilities, rather than directly using the cloud-based general mapping table. Through the embodiments of this application, the exposure of erroneous functions caused by differences in firmware versions, regional models, or sub-models can be avoided, improving the reliability and security of Matter virtual device control.

[0239] 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 method for determining the above-mentioned protocol mapping relationship.

[0240] This application also provides a computer-readable storage medium on which a computer program is stored, and a method for determining the above-mentioned protocol mapping relationship when the computer program is executed by a processor.

[0241] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0242] 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.

[0243] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, 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.

[0244] 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 device that provides the functions specified in one or more boxes.

[0245] 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 instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0246] 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.

[0247] 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.

[0248] 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 phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0249] The above provides a detailed description of the method, apparatus, system, device, and medium for determining a protocol mapping relationship. 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 protocol mapping relationships, characterized in that, The method includes: A communication sample of the device to be identified is determined, and multiple first protocol mapping relationship libraries that are fuzzily matched with the communication sample are determined; the first protocol mapping relationship library includes the protocol mapping relationship between the original protocol and the target protocol, as well as the expected response result corresponding to the instruction of the original protocol; Based on the expected response results in each of the first protocol mapping relationship libraries, determine the target detection description for the device to be identified; Based on the target detection description, the device to be identified is triggered to output the target response result; Based on the target response result, the target protocol mapping relationship of the device to be identified is determined.

2. The method according to claim 1, characterized in that, The step of determining the target detection description for the device to be identified based on the expected response results in each of the first protocol mapping relationship libraries includes: Determine the differences between the first expected response results in the first protocol mapping relationship library, and determine the probe description corresponding to each first expected response result; Determine the detection differentiation effectiveness and security risk costs of each detection description; Based on the detection differentiation effect and the security risk cost, a second expected response result is determined from the first expected response result; Based on the second expected response result, the target detection description is generated.

3. The method according to claim 2, characterized in that, The determination of the detection differentiation effect of each detection description includes: Before executing the detection description, determine the first number of multiple first protocol mapping relationship libraries that are fuzzily matched with the communication sample, and the first confidence level of each first protocol mapping relationship library; After the detection description is executed, the second number of the remaining multiple first protocol mapping relationship libraries that fuzzily match the communication sample, and the second confidence level of the remaining multiple multiple first protocol mapping relationship libraries that fuzzily match the communication sample are predicted. The detection differentiation effect is determined based on the first quantity, the first confidence level, the second quantity, and the second confidence level.

4. The method according to claim 1, characterized in that, The step of determining the target protocol mapping relationship of the device to be identified based on the target response result includes: Based on the target response result, the protocol mapping relationship to be pruned is determined from multiple first protocol mapping relationship libraries; Based on the protocol mapping relationship to be pruned, the capability verification of the device to be identified is performed; Based on the verified capabilities, the protocol mapping relationship to be pruned is adjusted to obtain the target protocol mapping relationship.

5. A method for determining protocol mapping relationships, characterized in that, Applied to an edge device that communicates with the cloud, the method includes: Collect communication samples of the device to be identified and determine whether there is a target protocol mapping relationship that definitively matches the communication samples; When no target protocol mapping relationship definitively matches the communication sample, the communication sample is sent to the cloud. The cloud is used to determine multiple first protocol mapping relationship libraries that fuzzily match the communication sample. The first protocol mapping relationship library includes the protocol mapping relationship between the original protocol and the target protocol, as well as the expected response result corresponding to the instruction of the original protocol. Based on the expected response results in each first protocol mapping relationship library, a target detection description for the device to be identified is determined. Based on the target detection description, the device to be identified is triggered to output a target response result. Based on the target response result, the target protocol mapping relationship of the device to be identified is determined. Receive the target protocol mapping relationship sent by the cloud.

6. The method according to claim 5, characterized in that, The communication samples include multiple components, and sending the communication samples to the cloud includes: Multiple communication samples are compared longitudinally to determine the target relationship fingerprint of the communication samples; The target relationship fingerprint is sent to the cloud; the cloud is used to determine multiple first protocol mapping relationship libraries that fuzzily match the communication sample based on the target relationship fingerprint.

7. The method according to claim 5, characterized in that, The method further includes: Receive the target detection description sent by the cloud and determine the detection purpose of the target detection description; Based on the stated detection objective, the target response results output by the device to be identified are collected.

8. The method according to claim 5, characterized in that, The communication samples include multiple samples, and determining whether there is a target protocol mapping relationship that definitively matches the communication samples includes: Determine multiple second protocol mapping relationship libraries that fuzzily match the communication sample, and determine the similarity between the communication sample and each second protocol mapping relationship library; Identify the two highest similarity scores and determine the target second protocol mapping relationship library corresponding to the highest similarity scores; Determine the matching degree between the existing functional fields of the device to be identified and the functional fields in the target second protocol mapping relationship library; Determine the third quantity of the second protocol mapping relationship library and determine the consistency score of multiple communication samples; The discriminative sufficiency of the target second protocol mapping relation library is determined based on the two largest similarity scores, the consistency score, the matching degree, and the third quantity. When the discrimination sufficiency is less than a preset threshold, it is determined that the target protocol mapping relationship that can be deterministically matched with the communication sample cannot be determined. When the discrimination sufficiency is not less than the preset threshold, a target protocol mapping relationship that is deterministically matched with the communication sample is determined.

9. A device for determining protocol mapping relationships, characterized in that, The device includes: The first determining module is used to determine the communication sample of the device to be identified, and to determine a plurality of first protocol mapping relationship libraries that are fuzzily matched with the communication sample; the first protocol mapping relationship library includes the protocol mapping relationship between the original protocol and the target protocol, and the expected response result corresponding to the instruction of the original protocol; The second determining module is used to determine the target detection description for the device to be identified based on the expected response results in each of the first protocol mapping relationship libraries; The detection module is used to trigger the device to be identified to output a target response result based on the target detection description; The third determining module is used to determine the target protocol mapping relationship of the device to be identified based on the target response result.

10. A device for determining protocol mapping relationships, characterized in that, The device is applied at an edge, which is connected to the cloud for communication, and includes: The judgment module is used to collect communication samples of the device to be identified and determine whether there is a target protocol mapping relationship that definitively matches the communication samples; A sending module is configured to send the communication sample to the cloud when no target protocol mapping relationship definitively matches the communication sample; the cloud is configured to determine multiple first protocol mapping relationship libraries that fuzzily match the communication sample; the first protocol mapping relationship library includes the protocol mapping relationship between the original protocol and the target protocol, and the expected response result corresponding to the instruction of the original protocol; based on the expected response results in each first protocol mapping relationship library, a target detection description for the device to be identified is determined; based on the target detection description, the device to be identified is triggered to output a target response result; based on the target response result, the target protocol mapping relationship of the device to be identified is determined; The receiving module is used to receive the target protocol mapping relationship sent by the cloud.

11. A cross-protocol device adaptive bridging system, characterized in that, The system is used to perform the method for determining the protocol mapping relationship as described in any one of claims 1-8.

12. 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 mapping relationship as described in any one of claims 1 to 8.

13. 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 mapping relationship as described in any one of claims 1 to 8.