Communication protocol automatic matching method and device based on built-in protocol aggregation resource, equipment, storage medium and computer program product

By acquiring device category identifiers, automatically locating protocol aggregation resources and loading relevant files, generating a set of candidate device identifiers, and driving protocol branch switching and data interaction, the problem of uncertain protocol selection during device access is solved, and an efficient automated matching process is achieved.

CN122340193APending Publication Date: 2026-07-03SHENZHEN ZTE NETVIEW TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610423872.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-01
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

In environmental monitoring, industrial data acquisition, and IoT access scenarios, the devices to be connected come from different manufacturers and different models and versions. Existing access methods lead to uncertain protocol selection, unclear switching paths, and a lack of unified constraints on verification criteria, resulting in a low degree of automation in the access process.

Method used

By acquiring the device category identifier, the corresponding protocol aggregation resource is determined, and the protocol dependency description file and feature parameter configuration file are loaded to generate a candidate device identifier set. This drives the protocol aggregation resource to automatically switch and call the protocol branch for data interaction. Based on the comparison between the collected values ​​and the feature parameter range, a matching judgment result is generated, and the matching status field is updated through the feedback channel. Finally, the target protocol branch is determined by the control side.

Benefits of technology

It improves the automation level of communication protocol matching for devices to be connected, achieves clarity in protocol selection and uniformity in verification, and simplifies the access process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122340193A_ABST
    Figure CN122340193A_ABST
Patent Text Reader

Abstract

This application relates to the field of interface communication protocol technology, and in particular to a method, apparatus, device, storage medium, and computer program product for automatic matching of communication protocols based on built-in protocol aggregation resources. The method acquires an access request and extracts a device category identifier, determines protocol aggregation resources based on the device category identifier, and acquires the associated protocol dependency description file and feature parameter configuration file. In the matching process, a set of candidate device identifiers is determined based on the feature parameter configuration file; the candidate device identifiers are traversed and the device identifier field is updated to drive the protocol aggregation resources to call the corresponding protocol branch and interact with the device to be accessed; the collected values ​​are acquired and compared with the valid range field of the feature parameters during the parsing process to generate a matching judgment result; the matching status field is updated and sent back to the control side; the control side determines the target protocol branch based on the matching status field and outputs the matching result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of interface communication protocol technology, and in particular to a method, apparatus, device, storage medium and computer program product for automatic matching of communication protocols based on built-in protocol aggregation resources. Background Technology

[0002] In scenarios such as environmental monitoring, industrial data acquisition, and IoT access, the devices to be connected typically come from different manufacturers and models, and there are multiple communication protocol implementations and data point tables within the same device category. Existing access methods often require pre-configuring specific protocol implementations on the access side, or for maintenance personnel to select and switch between multiple protocols based on device information, and determine the availability of the current protocol through multiple communication attempts and data comparisons. When device information is incomplete, protocol implementations differ significantly, or there are many protocols within a device category, the above methods are prone to problems such as uncertain protocol selection, unclear switching paths, and a lack of unified constraints on verification criteria, making it difficult to form a reusable automated process for the access process. Furthermore, to cover devices from multiple manufacturers, models, and versions within the same device category, engineering often employs a method of "aggregating protocol resources by device category and maintaining multiple protocol branches within the aggregated resources" for compatibility. However, in actual access processes, it is still necessary to determine the target protocol branch to be invoked and to have an executable and configurable judgment mechanism to constrain and verify the collected data when traversing different protocol branches, thereby forming a unified criterion for "matching." Simultaneously, the judgment result needs to be transmitted back to the control side in status form to drive subsequent branch selection and result output, making the smart device access process quite complex and with low automation. Therefore, how to improve the automation level of communication protocol matching for devices to be accessed has become an urgent technical problem to be solved. Summary of the Invention

[0003] The main objective of this application is to provide a method, apparatus, device, storage medium, and computer program product for automatic matching of communication protocols based on built-in protocol aggregation resources, aiming to solve the technical problem of how to improve the automation level of communication protocol matching of devices to be accessed.

[0004] To achieve the above objectives, this application provides a method for automatic matching of communication protocols based on built-in protocol aggregation resources, the method comprising the following steps: Obtain the access request from the device to be accessed, and extract the device category identifier from the access request; Based on the device category identifier, determine the protocol aggregation resource corresponding to the device category identifier, and obtain the protocol dependency description file and feature parameter configuration file associated with the protocol aggregation resource. The protocol dependency description file includes a matching status field, a device identifier field, and a feature parameter valid range field. In the matching process, a set of candidate device identifiers is determined based on the feature parameter configuration file, and the device identifier field in the protocol dependency description file is updated based on each candidate device identifier in the set of candidate device identifiers, so as to drive the protocol aggregation resource to call the protocol branch corresponding to the current candidate device identifier to interact with the device to be accessed. For each of the protocol branches, the collected values ​​obtained from the data interaction are acquired, and during the parsing process of the protocol aggregated resources, the collected values ​​are compared with the valid range field of the feature parameters in the protocol dependency description file to generate a matching judgment result. The matching status field is updated based on the matching judgment result, and the updated matching status field is sent back to the control side through a preset backhaul channel. The target protocol branch is determined based on the matching status field received by the control side, and the matching result corresponding to the target protocol branch is output.

[0005] In one embodiment, the step of obtaining the access request of the device to be accessed and extracting the device category identifier from the access request includes: Obtain access trigger information initiated by the control side and generated for the device to be accessed, and generate an access request including the identification information of the device to be accessed based on the access trigger information; The device description information related to the device to be accessed is parsed from the access request, and the category determination information used to characterize the device category is determined based on the device description information; The device category identifier is generated based on the category determination information.

[0006] In one embodiment, the step of determining the protocol aggregation resource corresponding to the device category identifier based on the device category identifier, and obtaining the protocol dependency description file and feature parameter configuration file associated with the protocol aggregation resource, includes: Based on the device category identifier, a target resource identifier that matches the device category identifier is retrieved from the preset protocol resource mapping relationship, and the protocol aggregation resource corresponding to the device category identifier is determined according to the target resource identifier; Based on the protocol aggregation resource, locate the protocol dependency description file associated with the protocol aggregation resource, and read the matching status field, device identifier field, and feature parameter valid range field from the protocol dependency description file; Based on the protocol aggregation resource, the feature parameter configuration file associated with the protocol aggregation resource is located, and the feature parameter configuration file is loaded to obtain the candidate device identifier related configuration, thereby obtaining the protocol dependency description file and feature parameter configuration file associated with the protocol aggregation resource.

[0007] In one embodiment, the step of determining a set of candidate device identifiers based on the feature parameter configuration file in the matching process, and updating the device identifier field in the protocol dependency description file based on each candidate device identifier in the set of candidate device identifiers, so as to drive the protocol aggregation resource to call the protocol branch corresponding to the current candidate device identifier to perform data interaction with the device to be accessed, includes: In the matching process, the device identifier-related configuration associated with the device category identifier is obtained by parsing the feature parameter configuration file, and a candidate device identifier set is generated based on the device identifier-related configuration; The current candidate device identifier is selected from the candidate device identifier set according to the preset traversal order, and the current candidate device identifier is written into the device identifier field of the protocol dependency description file to obtain the updated protocol dependency description file; Based on the updated protocol dependency description file, the protocol aggregation resource calls the protocol branch corresponding to the current candidate device identifier, and performs data interaction with the device to be accessed based on the protocol branch, so as to drive the protocol aggregation resource to call the protocol branch corresponding to the current candidate device identifier to perform data interaction with the device to be accessed.

[0008] In one embodiment, the steps of acquiring the collected values ​​obtained from the data interaction for each protocol branch, comparing the collected values ​​with the valid range field of the feature parameters in the protocol dependency description file to generate a matching judgment result during the parsing process of the protocol aggregation resources, updating the matching status field based on the matching judgment result, and sending the updated matching status field back to the control side through a preset backhaul channel include: For the protocol branch corresponding to the candidate device identifier, the data interaction is performed with the device to be accessed based on the protocol branch, the collected value output by the data interaction is obtained, and the collected value is input into the parsing process of the protocol aggregation resource; During the parsing process of the protocol aggregated resources, based on the valid range field of the feature parameters in the protocol dependency description file, the collected values ​​are subjected to range consistency comparison processing to generate a matching judgment result corresponding to the protocol branch; The matching status field in the protocol dependency description file is updated based on the matching determination result, and the updated matching status field is sent back to the control side through a preset backhaul channel.

[0009] In one embodiment, the step of determining the target protocol branch based on the matching status field received by the control side and outputting the matching result corresponding to the target protocol branch includes: The matching status field received by the control side via the preset backhaul channel is obtained, and the protocol branch status corresponding to the candidate device identifier currently being traversed is determined based on the matching status field. When the protocol branch status indication meets the target matching condition, the candidate device identifier corresponding to the matching status field is determined as the target device identifier, and the protocol branch corresponding to the target device identifier is determined as the target protocol branch; Based on the target protocol branch, matching result data is generated and output to the control side to output the matching result corresponding to the target protocol branch.

[0010] Furthermore, to achieve the above objectives, this application also proposes an automatic communication protocol matching device based on built-in protocol aggregation resources, the automatic communication protocol matching device based on built-in protocol aggregation resources comprising: The category identification module is used to obtain the access request from the device to be accessed and extract the device category identifier from the access request. The protocol aggregation module is used to determine the protocol aggregation resource corresponding to the device category identifier based on the device category identifier, and to obtain the protocol dependency description file and feature parameter configuration file associated with the protocol aggregation resource. The protocol dependency description file includes a matching status field, a device identifier field, and a feature parameter valid range field. The data interaction module is used to determine a set of candidate device identifiers based on the feature parameter configuration file during the matching process, and update the device identifier field in the protocol dependency description file based on each candidate device identifier in the set of candidate device identifiers, so as to drive the protocol aggregation resource to call the protocol branch corresponding to the current candidate device identifier and interact with the device to be accessed. The field feedback module is used to obtain the collected value obtained from the data interaction for each of the protocol branches, and compare the collected value with the valid range field of the feature parameters in the protocol dependency description file during the parsing process of the protocol aggregated resources to generate a matching judgment result. Based on the matching judgment result, the matching status field is updated, and the updated matching status field is fed back to the control side through a preset feedback channel. The target module is used to determine the target protocol branch based on the matching status field received by the control side, and output the matching result corresponding to the target protocol branch.

[0011] Furthermore, to achieve the above objectives, this application also proposes an automatic communication protocol matching device based on built-in protocol aggregation resources. The device includes: a memory, a processor, and an automatic communication protocol matching program based on built-in protocol aggregation resources stored in the memory and executable on the processor. The automatic communication protocol matching program based on built-in protocol aggregation resources is configured to implement the steps of the automatic communication protocol matching method based on built-in protocol aggregation resources as described in any of the above embodiments.

[0012] In addition, to achieve the above objectives, this application also proposes a storage medium storing an automatic communication protocol matching program based on built-in protocol aggregation resources. When the automatic communication protocol matching program based on built-in protocol aggregation resources is executed by a processor, it implements the steps of the automatic communication protocol matching method based on built-in protocol aggregation resources as described above.

[0013] In addition, to achieve the above objectives, this application also proposes a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the communication protocol automatic matching method based on built-in protocol aggregation resources as described above.

[0014] This application obtains the access request from the device to be accessed and extracts the device category identifier from the access request; determines the protocol aggregation resource corresponding to the device category identifier based on the device category identifier, and obtains the protocol dependency description file and feature parameter configuration file associated with the protocol aggregation resource. The protocol dependency description file includes a matching status field, a device identifier field, and a feature parameter valid range field; in the matching process, a set of candidate device identifiers is determined based on the feature parameter configuration file, and the device identifier field in the protocol dependency description file is updated based on each candidate device identifier in the candidate device identifier set to drive the protocol aggregation resource to call the protocol branch corresponding to the current candidate device identifier to interact with the device to be accessed; for each protocol branch, the collected value obtained from the data interaction is obtained, and during the parsing process of the protocol aggregation resource, the collected value is compared with the feature parameter valid range field in the protocol dependency description file to generate a matching judgment result. The matching status field is updated based on the matching judgment result, and the updated matching status field is sent back to the control side through a preset backhaul channel; the target protocol branch is determined based on the matching status field received by the control side, and the matching result corresponding to the target protocol branch is output. This application automatically locates the corresponding protocol aggregation resource by extracting the device category identifier from the access request, and loads a protocol dependency description file and a feature parameter configuration file containing a matching status field, a device identifier field, and a feature parameter valid range field. In the matching process, a candidate device identifier set is first generated based on the feature parameter configuration file, and then the device identifier field is updated one by one to drive the automatic switching of the protocol aggregation resource and call the corresponding protocol branch to interact with the device to be accessed. At the same time, during the parsing process, the collected value is compared with the feature parameter valid range field to generate a matching judgment result, and the matching status field is updated accordingly and sent back to the control side through a preset backhaul channel. Finally, the control side determines the target protocol branch based on the matching status field and outputs the matching result, thereby improving the automation level of communication protocol matching for the device to be accessed. Attached Figure Description

[0015] Figure 1 This is a flowchart illustrating the first embodiment of the communication protocol automatic matching method for resource aggregation based on built-in protocols in this application. Figure 2 This is a schematic diagram of a sub-process in the second embodiment of the automatic communication protocol matching method for aggregating resources based on built-in protocols in this application; Figure 3 This is a schematic diagram of a sub-process in the third embodiment of the automatic communication protocol matching method for aggregating resources based on built-in protocols in this application; Figure 4 This is a schematic diagram of the automatic matching service software framework design in one embodiment of the communication protocol automatic matching method for aggregating resources based on built-in protocols in this application; Figure 5This is a schematic diagram of a feature configuration file in one embodiment of the automatic matching method for communication protocols based on built-in protocol aggregation resources in this application; Figure 6 This is a schematic diagram of the web automatic matching interface design in one embodiment of the communication protocol automatic matching method for resource aggregation based on built-in protocols in this application; Figure 7 This is a schematic diagram of the module structure of the communication protocol automatic matching device based on built-in protocol aggregation resources according to an embodiment of this application; Figure 8 This is a schematic diagram of the device structure of the hardware operating environment involved in the automatic matching method of communication protocol based on built-in protocol aggregation resources in the embodiments of this application.

[0016] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0017] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application.

[0018] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0019] It should be noted that in scenarios such as environmental monitoring, industrial data acquisition, and IoT access, the devices to be connected typically come from different manufacturers and models, and there are multiple communication protocol implementations and data point tables within the same device category. Existing access methods often require pre-configuring specific protocol implementations on the access side, or for maintenance personnel to select and switch between multiple protocols based on device information, and determine the availability of the current protocol through multiple communication attempts and data comparisons. When device information is incomplete, protocol implementations differ significantly, or there are many protocols within a device category, the above methods are prone to problems such as uncertain protocol selection, unclear switching paths, and a lack of unified constraints on verification criteria, making it difficult to form a reusable automated process for the access process. Furthermore, to cover devices from multiple manufacturers, models, and versions within the same device category, engineering often employs a method of "aggregating protocol resources by device category and maintaining multiple protocol branches within the aggregated resources" for compatibility. However, in actual access processes, it is still necessary to determine the target protocol branch to be invoked and to have an executable and configurable judgment mechanism to constrain and verify the collected data when traversing different protocol branches, thereby forming a unified criterion for "matching." Simultaneously, the judgment result needs to be transmitted back to the control side in status form to drive subsequent branch selection and result output, making the smart device access process quite complex and with low automation. Therefore, how to improve the automation level of communication protocol matching for devices to be accessed has become an urgent technical problem to be solved.

[0020] The main solution of this application is as follows: First, obtain the access request from the device to be accessed and extract the device category identifier from the access request. Second, determine the protocol aggregation resource corresponding to the device category identifier based on the device category identifier, and obtain the protocol dependency description file and feature parameter configuration file associated with the protocol aggregation resource. The protocol dependency description file includes a matching status field, a device identifier field, and a feature parameter valid range field. Third, in the matching process, determine a set of candidate device identifiers based on the feature parameter configuration file, and update the device identifier field in the protocol dependency description file based on each candidate device identifier in the candidate device identifier set, thereby driving the protocol aggregation resource to call the protocol branch corresponding to the current candidate device identifier and interact with the device to be accessed. Fourth, for each protocol branch, obtain the collected value obtained from the data interaction, and during the parsing process of the protocol aggregation resource, compare the collected value with the feature parameter valid range field in the protocol dependency description file to generate a matching judgment result. Update the matching status field based on the matching judgment result, and send the updated matching status field back to the control side through a preset backhaul channel. Fifth, determine the target protocol branch based on the matching status field received by the control side, and output the matching result corresponding to the target protocol branch.

[0021] This application automatically locates the corresponding protocol aggregation resource by extracting the device category identifier from the access request, and loads a protocol dependency description file and a feature parameter configuration file containing a matching status field, a device identifier field, and a feature parameter valid range field. In the matching process, a candidate device identifier set is first generated based on the feature parameter configuration file, and then the device identifier field is updated one by one to drive the automatic switching of the protocol aggregation resource and call the corresponding protocol branch to interact with the device to be accessed. At the same time, during the parsing process, the collected value is compared with the feature parameter valid range field to generate a matching judgment result, and the matching status field is updated accordingly and sent back to the control side through a preset backhaul channel. Finally, the control side determines the target protocol branch based on the matching status field and outputs the matching result, thereby improving the automation level of communication protocol matching for the device to be accessed.

[0022] It should be noted that the executing entity of the method in this embodiment can be a computing service device with data processing, network communication, and program execution functions, or it can be the aforementioned communication protocol automatic matching device based on built-in protocol aggregation resources with the same or similar functions. This embodiment and the following embodiments will be described using a communication protocol automatic matching device based on built-in protocol aggregation resources as an example.

[0023] Based on this, a first embodiment of the communication protocol automatic matching method based on built-in protocol aggregation resources in this application is proposed. Please refer to... Figure 1 , Figure 1This is a flowchart illustrating the first embodiment of the automatic communication protocol matching method for aggregating resources based on built-in protocols in this application.

[0024] In this embodiment, the automatic communication protocol matching method based on built-in protocol aggregation resources includes the following steps: S1: Obtain the access request from the device to be accessed, and extract the device category identifier from the access request; S2: Based on the device category identifier, determine the protocol aggregation resource corresponding to the device category identifier, and obtain the protocol dependency description file and feature parameter configuration file associated with the protocol aggregation resource. The protocol dependency description file includes a matching status field, a device identifier field, and a feature parameter valid range field. It should be noted that an access request refers to the request information carrier generated to initiate the access and matching process for the device to be accessed. The device category identifier is used to characterize the device category to which the device to be accessed belongs. The protocol dependency description file is a configuration / description file bound to the protocol aggregation resource. The feature parameter configuration file describes the configuration related to candidate device identifiers available for matching within the same device category (e.g., candidate identifier entries and their associated available signals / features). The matching status field is a status field in the protocol dependency description file. The device identifier field is an identifier field in the protocol dependency description file. The feature parameter validity range field is a constraint field in the protocol dependency description file.

[0025] Specifically, upon receiving an access request from a device to be accessed, the access request is first parsed to obtain a device category identifier that characterizes the type of device to be accessed. This device category identifier can come from the category field carried in the access request, or it can be mapped from the device description information in the access request. Subsequently, using the device category identifier as an index, the protocol aggregation resource corresponding to the device category identifier is located in a preset category-resource correspondence, thereby completing the "selection of library by category" protocol resource determination.

[0026] Furthermore, after determining the protocol aggregation resource, the protocol dependency description file and feature parameter configuration file associated with the protocol aggregation resource are obtained. The protocol dependency description file includes at least a matching status field, a device identifier field, and a feature parameter valid range field, used to provide status carrying, branch selection carrying, and decision constraint carrying for the subsequent matching process. The feature parameter configuration file provides configuration input for generating a candidate device identifier set in subsequent steps. Through the above acquisition actions, the subsequent matching process can traverse candidate identifiers under the same device category, and the valid range constraint can be referenced during the parsing phase to perform consistency judgment.

[0027] By extracting the device category identifier from the access request, the corresponding protocol aggregation resource can be automatically determined using this device category identifier as an index, avoiding indiscriminate selection of all protocol resources at the initial access stage. Furthermore, by obtaining the protocol dependency description file and feature parameter configuration file associated with the protocol aggregation resource, and ensuring that the protocol dependency description file contains at least a matching status field, a device identifier field, and a valid range field for feature parameters, a writeable / updateable branch selection carrier and a referenceable decision constraint carrier are provided for the subsequent matching process. This structures and prepares the key inputs of "which protocol branch to select" and "what range constraint to use for judgment", thereby supporting the automated execution of the subsequent matching process by category, file field-driven, and range constraint-based judgment.

[0028] S3: In the matching process, a set of candidate device identifiers is determined based on the feature parameter configuration file, and the device identifier field in the protocol dependency description file is updated based on each candidate device identifier in the set of candidate device identifiers, so as to drive the protocol aggregation resource to call the protocol branch corresponding to the current candidate device identifier and interact with the device to be accessed for data. It should be noted that the matching process refers to the stages of the process executed around the automatic matching of protocols. A candidate device identifier is a single identifier entry in the set of candidate device identifiers. A protocol aggregation resource is a collection of protocol resources organized by device category. A protocol branch is the protocol implementation path / processing branch within the protocol aggregation resource corresponding to a specific candidate device identifier.

[0029] Specifically, after entering the matching process, the feature parameter configuration file is first loaded and parsed to obtain a set of device identifier entries related to the current device category. Based on the parsing result, the device identifier entries are structured and organized to form the candidate device identifier set. To ensure the controllability of subsequent switching, the candidate device identifier set can be sorted or grouped according to the organization method in the configuration file during generation, so that the subsequent traversal of candidate device identifiers can be executed according to deterministic rules, thereby avoiding the unreproducible matching process caused by unclear candidate range or unstable traversal order.

[0030] Furthermore, a current candidate device identifier is selected from the candidate device identifier set, and written into the device identifier field of the protocol dependency description file to obtain an updated protocol dependency description file. The protocol aggregation resource reads the device identifier field at runtime and selects the protocol branch corresponding to the current candidate device identifier accordingly. Based on the protocol branch, the system performs data interaction with the device to be accessed to complete the interaction attempt with the protocol branch corresponding to the current candidate device identifier. After this interaction is completed, the matching process can continue to select the next candidate device identifier and repeat the above "write-call-interaction" process to cover all candidate device identifiers in the candidate set.

[0031] By determining the candidate device identifier set based on the feature parameter configuration file, the matching process obtains a clear candidate range as soon as it enters the execution phase, transforming the subsequent protocol selection from "manual probing" to "traversal within the set". Furthermore, by writing the current candidate device identifier into the device identifier field of the protocol dependency description file to drive the protocol aggregation resource to call the corresponding protocol branch, the protocol branch switching is transformed from a manual configuration operation into a repeatable field update operation. After each field update, the corresponding protocol branch can be automatically triggered to interact with the device to be accessed, thus forming an automated matching execution path of "candidate set generation - field-driven switching - branch interaction verification", improving the process flow and controllability of the matching process.

[0032] S4: For each of the protocol branches, obtain the collected value obtained from the data interaction, and during the parsing process of the protocol aggregated resources, compare the collected value with the valid range field of the feature parameters in the protocol dependency description file to generate a matching judgment result, update the matching status field based on the matching judgment result, and send the updated matching status field back to the control side through a preset backhaul channel. It should be noted that the matching determination result is the information obtained from the comparison, used to indicate whether the current protocol branch meets the matching conditions. The matching status field is a field in the protocol dependency description file used to carry the matching status, and it is updated based on the matching determination result. The preset backhaul channel is a pre-set communication channel used to send the updated matching status field back from the protocol side to the control side. The control side is the control terminal that receives the matching status and uses it to determine the subsequent target branch and output the result.

[0033] Specifically, for each protocol branch, after the protocol branch completes the data interaction with the device to be accessed, the system obtains the collected value obtained from the data interaction and inputs the collected value into the parsing process of the protocol aggregation resource. During the parsing process, the protocol aggregation resource reads the valid range field of the feature parameters in the protocol dependency description file, compares the collected value with the range constraint indicated by the valid range field of the feature parameters according to the corresponding collection item, to determine whether the collected value meets the range constraint, and generates a matching judgment result corresponding to the current protocol branch accordingly.

[0034] Furthermore, after obtaining the matching determination result, the protocol aggregation resource updates the matching status field in the protocol dependency description file based on the matching determination result, so that the matching status field can represent the matching status of the current protocol branch; subsequently, the updated matching status field is sent back to the control side through the preset backhaul channel, so that the control side can receive and record the matching status of the protocol branch based on the matching status field in subsequent processes, thereby completing the matching status backhaul for each protocol branch.

[0035] By introducing a comparison mechanism of "collected value - valid range field" during the parsing process of protocol aggregation resources, the matching determination of the current protocol branch is jointly determined by the collected value obtained from data interaction and the configurable range constraints in the protocol dependency description file, thus providing a unified and reusable basis for matching determination. Furthermore, the matching status field is updated based on the matching determination result and sent back to the control side through a preset feedback channel, so that the matching status of each protocol branch is automatically output in the form of a status field and can be directly used by the control side. This transforms the process of "manually checking the collected data and determining whether it matches" into a process of "automatic determination and status feedback by the parsing side", enhancing the automation and controllability of the matching process.

[0036] S5: Determine the target protocol branch based on the matching status field received by the control side, and output the matching result corresponding to the target protocol branch.

[0037] It should be noted that the target protocol branch is the one that is determined to match the device to be accessed among multiple protocol branches. The matching result is the output information corresponding to the target protocol branch.

[0038] Specifically, the control side continuously or periodically receives the matching status field transmitted from the preset backhaul channel, and establishes a correspondence between the matching status field and the currently traversed candidate device identifier or the current protocol branch to form a record of the matching status of each protocol branch; on this basis, the control side determines the status value corresponding to the target matching condition based on the matching status field, thereby transforming the matching status field into a judgment criterion that can be used for branch selection.

[0039] Furthermore, when the control side detects that the matching status field in the recorded information meets the target matching condition, the control side determines the protocol branch corresponding to the matching status field as the target protocol branch and generates a matching result corresponding to the target protocol branch; the matching result includes at least the identification information and matching conclusion information of the target protocol branch, and is output by the control side.

[0040] By receiving the matching status field from the control side and using it as the basis for determining the target matching condition, the determination of the target protocol branch no longer relies on manual verification of the collected data or protocol configuration. Instead, the control side directly completes the branch selection based on the status field. Furthermore, once the control side detects that the matching status field meets the target matching condition, it can determine the target protocol branch and output the matching result. This makes the matching process form an executable termination and output closed loop on the control side, thereby transforming "branch selection and result output" from manual decision-making to automatic decision-making and automatic output based on the status field, improving the process flow and automation of the matching process.

[0041] This embodiment obtains the access request from the device to be accessed and extracts the device category identifier from the access request; determines the protocol aggregation resource corresponding to the device category identifier based on the device category identifier, and obtains the protocol dependency description file and feature parameter configuration file associated with the protocol aggregation resource. The protocol dependency description file includes a matching status field, a device identifier field, and a feature parameter valid range field; in the matching process, a set of candidate device identifiers is determined based on the feature parameter configuration file, and the device identifier field in the protocol dependency description file is updated based on each candidate device identifier in the candidate device identifier set to drive the protocol aggregation resource to call the protocol branch corresponding to the current candidate device identifier to interact with the device to be accessed; for each protocol branch, the collected value obtained from the data interaction is obtained, and during the parsing process of the protocol aggregation resource, the collected value is compared with the feature parameter valid range field in the protocol dependency description file to generate a matching judgment result. The matching status field is updated based on the matching judgment result, and the updated matching status field is sent back to the control side through a preset backhaul channel; the target protocol branch is determined based on the matching status field received by the control side, and the matching result corresponding to the target protocol branch is output. This embodiment extracts the device category identifier from the access request to automatically locate the corresponding protocol aggregation resource, and loads a protocol dependency description file and a feature parameter configuration file containing a matching status field, a device identifier field, and a feature parameter valid range field. In the matching process, a set of candidate device identifiers is first generated based on the feature parameter configuration file, and then the device identifier field is updated one by one to drive the automatic switching of the protocol aggregation resource and call the corresponding protocol branch to interact with the device to be accessed. At the same time, during the parsing process, the collected value is compared with the feature parameter valid range field to generate a matching judgment result, and the matching status field is updated accordingly and sent back to the control side through a preset backhaul channel. Finally, the control side determines the target protocol branch based on the matching status field and outputs the matching result, thereby improving the automation level of communication protocol matching for the device to be accessed.

[0042] Based on the first embodiment described above, a second embodiment of the communication protocol automatic matching method based on built-in protocol aggregation resources is proposed in this application. Please refer to... Figure 2 , Figure 2 This is a schematic diagram of a sub-process in the second embodiment of the automatic matching method for communication protocols based on built-in protocol aggregation resources in this application.

[0043] like Figure 2 As shown, in this embodiment, step S1 includes: S11: Obtain access trigger information initiated by the control side and generated for the device to be accessed, and generate an access request including the identification information of the device to be accessed based on the access trigger information; S12: Parse the device description information related to the device to be accessed from the access request, and determine the category determination information used to characterize the device category based on the device description information; S13: Generate the device category identifier based on the category determination information.

[0044] It should be noted that the access trigger information is a trigger information carrier generated by the control side and used to trigger the access processing of the device to be accessed. The device description information is a descriptive type of information parsed from the access request, used to characterize the attributes of the device to be accessed.

[0045] Specifically, when the control side needs to perform access and protocol matching on the device to be accessed, it generates access trigger information for the device to be accessed. This access trigger information is used to indicate the initiation of the access process and may carry the identification elements of the device to be accessed to ensure the access target is clearly identified. An access request is generated based on the access trigger information, ensuring that the access request at least includes the identification information of the device to be accessed. This provides a unified input carrier for subsequent parsing and category identification of the request content, and guarantees that the access process can be consistently executed after being triggered by the control side.

[0046] Furthermore, device description information related to the device to be accessed is parsed from the access request, and the device description information is structured and aggregated to form a set of descriptive elements that can be used for category determination. Based on the set of descriptive elements, category determination information for characterizing the device category is determined, for example, by merging the device description information into a certain category determination result through mapping relationships or rule constraints. Subsequently, a device category identifier is generated based on the category determination information, and the device category identifier is used as the index input for subsequent "aggregating resources by category location protocol".

[0047] By generating access trigger information from the control side and constructing an access request containing the identification information of the device to be accessed, the access process has a clear trigger entry point and a unified request carrier, thereby ensuring that the device to be accessed can be accurately identified in the process. Furthermore, by parsing the device description information from the access request and forming category determination information, and then generating a device category identifier from the category determination information, the device category identification is automatically derived from the parsable request content, avoiding reliance on manual presets or externally specified categories. This provides an automated and reusable prerequisite for subsequent selection of protocol aggregation resources based on the device category identifier, improving the process efficiency of the entire protocol matching link.

[0048] Based on the first embodiment described above, in this embodiment, step S2 includes: S21: Based on the device category identifier, retrieve the target resource identifier that matches the device category identifier in the preset protocol resource mapping relationship, and determine the protocol aggregation resource corresponding to the device category identifier according to the target resource identifier; S22: Based on the protocol aggregation resource, locate the protocol dependency description file associated with the protocol aggregation resource, and read the matching status field, device identifier field, and feature parameter valid range field from the protocol dependency description file; S23: Based on the protocol aggregation resource, locate the feature parameter configuration file associated with the protocol aggregation resource, and load the feature parameter configuration file to obtain the candidate device identifier related configuration, thereby obtaining the protocol dependency description file and feature parameter configuration file associated with the protocol aggregation resource.

[0049] It should be noted that the preset protocol resource mapping relationship is a pre-established "device category identifier - resource identifier" correspondence. The target resource identifier is the resource identifier entry in the preset protocol resource mapping relationship that matches the device category identifier. The candidate device identifier related configuration is the configuration content obtained by parsing the feature parameter configuration file.

[0050] Specifically, after receiving the device category identifier, a search and matching process is performed in a preset protocol resource mapping relationship to determine the target resource identifier that matches the device category identifier. The search can employ exact matching or equivalent matching according to preset rules to ensure that the same device category identifier can be stably mapped to the corresponding resource identifier. Based on the target resource identifier, the protocol aggregation resource corresponding to the device category identifier is determined, thereby limiting the subsequent matching process to protocol resources related to the current category and avoiding the involvement of irrelevant resources in the processing.

[0051] Furthermore, after determining the protocol aggregation resource, the associated protocol dependency description file is located based on the protocol aggregation resource, and the matching status field, device identifier field, and valid range field of feature parameters are read from the protocol dependency description file. This enables subsequent processes to have an updatable status carrier, a writable branch selection carrier, and a referenceable range constraint basis. At the same time, the associated feature parameter configuration file is located based on the protocol aggregation resource, and the feature parameter configuration file is loaded to obtain the relevant configuration of the candidate device identifier. This completes the acquisition of the protocol dependency description file and feature parameter configuration file associated with the protocol aggregation resource, providing an input basis for the subsequent generation of the candidate device identifier set and the driving protocol branch call.

[0052] By retrieving the target resource identifier based on the device category identifier in the preset protocol resource mapping relationship and determining the protocol aggregation resource accordingly, the selection of protocol resources is automatically completed by the category index, thereby constraining the matching process to the range of protocol resources related to the current device category. Furthermore, by locating and reading the matching status field, device identifier field, and valid range field of feature parameters in the protocol dependency description file based on the protocol aggregation resource, and loading the feature parameter configuration file to obtain the relevant configuration of the candidate device identifier, the "status carrier, branch selection carrier, and range constraint basis" and "candidate generation basis" required for subsequent matching are structurally prepared before entering the matching process, thereby improving the executability and process-orientation of protocol branch traversal and matching judgment.

[0053] This embodiment obtains the access request from the device to be accessed and extracts the device category identifier from the access request; determines the protocol aggregation resource corresponding to the device category identifier based on the device category identifier, and obtains the protocol dependency description file and feature parameter configuration file associated with the protocol aggregation resource. The protocol dependency description file includes a matching status field, a device identifier field, and a feature parameter valid range field; in the matching process, a set of candidate device identifiers is determined based on the feature parameter configuration file, and the device identifier field in the protocol dependency description file is updated based on each candidate device identifier in the candidate device identifier set to drive the protocol aggregation resource to call the protocol branch corresponding to the current candidate device identifier to interact with the device to be accessed; for each protocol branch, the collected value obtained from the data interaction is obtained, and during the parsing process of the protocol aggregation resource, the collected value is compared with the feature parameter valid range field in the protocol dependency description file to generate a matching judgment result. The matching status field is updated based on the matching judgment result, and the updated matching status field is sent back to the control side through a preset backhaul channel; the target protocol branch is determined based on the matching status field received by the control side, and the matching result corresponding to the target protocol branch is output. This embodiment extracts the device category identifier from the access request to automatically locate the corresponding protocol aggregation resource, and loads a protocol dependency description file and a feature parameter configuration file containing a matching status field, a device identifier field, and a feature parameter valid range field. In the matching process, a set of candidate device identifiers is first generated based on the feature parameter configuration file, and then the device identifier field is updated one by one to drive the automatic switching of the protocol aggregation resource and call the corresponding protocol branch to interact with the device to be accessed. At the same time, during the parsing process, the collected value is compared with the feature parameter valid range field to generate a matching judgment result, and the matching status field is updated accordingly and sent back to the control side through a preset backhaul channel. Finally, the control side determines the target protocol branch based on the matching status field and outputs the matching result, thereby improving the automation level of communication protocol matching for the device to be accessed.

[0054] Based on the second embodiment described above, a third embodiment of the communication protocol automatic matching method based on built-in protocol aggregation resources is proposed in this application. Please refer to... Figure 3 , Figure 3 This is a schematic diagram of a sub-process in the third embodiment of the automatic matching method for communication protocols based on built-in protocol aggregation resources in this application.

[0055] In this embodiment, step S3 includes: S31: In the matching process, the device identifier related configuration associated with the device category identifier is obtained by parsing the feature parameter configuration file, and a candidate device identifier set is generated based on the device identifier related configuration; S32: Select the current candidate device identifier from the candidate device identifier set according to the preset traversal order, and write the current candidate device identifier into the device identifier field of the protocol dependency description file to obtain the updated protocol dependency description file; S33: Based on the updated protocol dependency description file, drive the protocol aggregation resource to call the protocol branch corresponding to the current candidate device identifier, and perform data interaction with the device to be accessed based on the protocol branch, so as to drive the protocol aggregation resource to call the protocol branch corresponding to the current candidate device identifier to perform data interaction with the device to be accessed.

[0056] It should be noted that the device identifier-related configuration is the configuration content obtained by parsing the feature parameter configuration file. The preset traversal order is a pre-defined rule used to specify the traversal order of each candidate device identifier in the candidate device identifier set.

[0057] Specifically, after entering the matching process, the feature parameter configuration file is read and parsed to obtain the device identifier-related configuration associated with the device category identifier. The device identifier-related configuration can be organized into multiple device identifier entries and their associated attributes. Based on the device identifier-related configuration, the device identifier entries are extracted and organized to generate the candidate device identifier set, so that the candidate range is clear before entering the branch switching, and a reusable candidate set structure can be formed according to the organization method in the configuration.

[0058] Furthermore, after the candidate set is determined, the current candidate device identifier is selected from the candidate device identifier set according to a preset traversal order, and written into the device identifier field of the protocol dependency description file to obtain an updated protocol dependency description file. The protocol aggregation resource reads the updated protocol dependency description file at runtime and calls the protocol branch corresponding to the current candidate device identifier based on the device identifier field. Subsequently, data interaction is performed with the device to be accessed based on the protocol branch, so that each "candidate identifier write" can trigger an interaction attempt with the corresponding protocol branch, thereby completing the item-by-item interaction coverage of the candidate device identifier set.

[0059] By parsing the configuration file based on feature parameters to obtain the device identifier-related configuration associated with the device category identifier and generating a set of candidate device identifiers, the matching process has a clear candidate range and traversable objects. Furthermore, by selecting the current candidate device identifier according to a preset traversal order and writing it into the device identifier field of the protocol dependency description file, the selection of protocol branches is transformed from "manual switching configuration" to a repeatable action of "field writing driven". After each writing, the updated protocol dependency description file drives the protocol aggregation resource to call the corresponding protocol branch and interact with the device to be connected, thus forming an automatic execution chain of "candidate generation - sequential traversal - field-driven call - interaction triggering", which improves the process and automation of protocol branch switching and interaction attempts.

[0060] Based on the second embodiment described above, in this embodiment, step S4 includes: S41: For the protocol branch corresponding to the candidate device identifier, perform the data interaction with the device to be accessed based on the protocol branch, obtain the collected value output by the data interaction, and input the collected value into the parsing process of the protocol aggregation resource; S42: During the parsing of the protocol aggregated resources, based on the valid range field of the feature parameters in the protocol dependency description file, the collected values ​​are subjected to range consistency comparison processing to generate a matching judgment result corresponding to the protocol branch; S43: Update the matching status field in the protocol dependency description file based on the matching determination result, and send the updated matching status field back to the control side through a preset backhaul channel.

[0061] It should be noted that the range consistency comparison process is a process of judging the consistency between the collected values ​​and the range constraints represented by the valid range field of the feature parameters.

[0062] Specifically, after the matching process selects a candidate device identifier, it calls the protocol branch corresponding to the candidate device identifier and performs data interaction with the device to be accessed based on the protocol branch to obtain the data interaction output returned by the device to be accessed; it obtains the collected value from the data interaction output and sends the collected value as the parsing input to the parsing process of the protocol aggregation resource, so that the protocol aggregation resource can uniformly parse and process the interaction data corresponding to the current protocol branch, providing a comparable data basis for subsequent consistency determination.

[0063] Furthermore, during the parsing of the aggregated protocol resources, the valid range field of the feature parameters in the protocol dependency description file is read, and the range constraint indicated by the valid range field is used as the basis for judgment. The range consistency comparison processing is performed on the collected values ​​to generate a matching judgment result corresponding to the protocol branch. Subsequently, the matching status field in the protocol dependency description file is updated based on the matching judgment result so that the matching status field can reflect the matching status of the current protocol branch. The updated matching status field is then sent back to the control side through a preset backhaul channel so that the control side can determine the target protocol branch based on the matching status field in subsequent steps.

[0064] This step involves data interaction between the protocol branch corresponding to the candidate device identifier and the device to be accessed to obtain collected values. These collected values ​​are then input into the parsing process of the protocol aggregation resource, ensuring that the matching judgment is based on the parsing results of the actual interactive data. Furthermore, by referencing the valid range field of the feature parameters in the protocol dependency description file during the parsing process to compare the range consistency of the collected values, a unified and configurable judgment criterion is formed, thereby automatically generating the matching judgment result. Based on the matching judgment result, the matching status field is updated and transmitted back to the control side via a preset feedback channel, so that the judgment conclusion is automatically output in the form of a status field and can be directly used by the control side. This streamlines the key links of "interaction - judgment - status output" and improves the automation level of protocol branch matching judgment and status feedback.

[0065] Based on the second embodiment described above, in this embodiment, step S5 includes: S51: Obtain the matching status field received by the control side via the preset backhaul channel, and determine the protocol branch status corresponding to the candidate device identifier currently being traversed based on the matching status field; S52: When the protocol branch status indication meets the target matching condition, the candidate device identifier corresponding to the matching status field is determined as the target device identifier, and the protocol branch corresponding to the target device identifier is determined as the target protocol branch; S53: Generate matching result data based on the target protocol branch, and output the matching result data to the control side to output the matching result corresponding to the target protocol branch.

[0066] Specifically, after receiving the matching status field via a preset backhaul channel, the control side establishes a correspondence between the matching status field and the currently traversed candidate device identifier to determine the protocol branch status corresponding to the candidate device identifier. The control side can maintain the current indication information of the candidate device identifier during the traversal process, so that each received matching status field can be associated with the corresponding candidate device identifier, thereby forming a traceable record of the protocol branch status corresponding to the candidate device identifier, providing consistent input for subsequent target determination.

[0067] Furthermore, after obtaining the protocol branch status, the control side determines whether the protocol branch status indicates that the target matching condition is met. When it is met, the control side identifies the candidate device identifier corresponding to the matching status field as the target device identifier, and accordingly identifies the protocol branch corresponding to the target device identifier as the target protocol branch. Subsequently, the control side generates matching result data based on the target protocol branch. The matching result data is used to at least characterize the target protocol branch and its matching conclusion, and outputs the matching result data to the control side, thereby outputting the matching result corresponding to the target protocol branch.

[0068] The control side receives the matching status field via a preset feedback channel and determines the protocol branch status corresponding to the currently traversed candidate device identifier. This allows the control side to automatically identify the matching status of each candidate branch using the status field as a unified input. Furthermore, when the protocol branch status indicates that the target matching condition is met, the control side directly determines the corresponding candidate device identifier as the target device identifier and locks its corresponding target protocol branch. Then, it generates and outputs matching result data based on the target protocol branch. This forms an automatic decision-making and output process of "branch status judgment - target branch determination - result output", reducing the reliance on manual judgment and selection and improving the automation level of target protocol branch determination and result output.

[0069] This embodiment extracts the device category identifier from the access request to automatically locate the corresponding protocol aggregation resource, and loads a protocol dependency description file and a feature parameter configuration file containing a matching status field, a device identifier field, and a feature parameter valid range field. In the matching process, a set of candidate device identifiers is first generated based on the feature parameter configuration file, and then the device identifier field is updated one by one to drive the automatic switching of the protocol aggregation resource and call the corresponding protocol branch to interact with the device to be accessed. At the same time, during the parsing process, the collected value is compared with the feature parameter valid range field to generate a matching judgment result, and the matching status field is updated accordingly and sent back to the control side through a preset backhaul channel. Finally, the control side determines the target protocol branch based on the matching status field and outputs the matching result, thereby improving the automation level of communication protocol matching for the device to be accessed.

[0070] Please see Figures 4-6 , Figure 4 This is a schematic diagram of the automatic matching service software framework design in one embodiment of the communication protocol automatic matching method for aggregating resources based on built-in protocols in this application; Figure 5 This is a schematic diagram of a feature configuration file in one embodiment of the automatic matching method for communication protocols based on built-in protocol aggregation resources in this application; Figure 6 This is a schematic diagram of the web automatic matching interface design in one embodiment of the communication protocol automatic matching method for aggregating resources based on built-in protocols in this application.

[0071] like Figures 4-6 As shown, in one embodiment, the automatic communication protocol matching method based on built-in protocol aggregation resources includes: 1. Built-in collection protocol library design Protocols are categorized according to device type, such as (switching power supply, electricity meter, temperature and humidity control, air conditioner, UPS). Each device type is required to be aggregated into one smart device protocol. Within the protocol, the corresponding protocol is distinguished by device manufacturer, device model, and software version. Users can communicate with devices from multiple manufacturers using a single protocol by configuring the protocol library dependency files to achieve data interaction.

[0072] 2. Automatic matching service design This service is specifically designed for automatically matching built-in collection protocol libraries. A startup request is issued from the web application, which in turn notifies the automatic matching service via ubus to start the relevant tasks. The matching tasks will automatically and repeatedly perform the matching work (by modifying the manufacturer information field in the collection protocol library dependency file to call the corresponding collection protocol library for automatic matching) until success or failure. The web application will periodically request matching progress and results from the backend program for display on the front end.

[0073] 3. Design of fields related to dependency files of the collection protocol library ① Automatic matching identifier field: 0: Matching started; 1: Match successful; 2: Matching in progress; 3: Match failed; 255: Invalid value; ② Feature quantity field, default value is 0; ③Feature quantity custom channel type field, 0: AI quantity, 1: DI quantity; ④ The feature quantity custom channel number field; ⑤ A custom upper limit field for feature values; ⑥ Define a custom effective lower limit field for feature values.

[0074] 4. Design of the preset value range of characteristic quantities

[0075] 5. Feature Configuration File Design It is mainly used to store the semaphores supported by different manufacturers, models and software versions of the same type of equipment for automatic matching and loading.

[0076] 6. Design of automatic matching function in the collection protocol library framework 6.1 Reserve a fixed AI1 channel for transmitting the device manufacturer's protocol matching rate back to the automatic matching service; 6.2 Reserve a fixed AI2 channel for inputting automatically matched identifier values; 6.3 Add logical processing to the parsing function. Before each data transmission, check if the current collected value meets the preset range of the feature values. If it meets the preset range once, increment the count by one until all features are met. Then, set the automatic matching flag to 1, indicating that a usable protocol has been matched. If only some features are met or none are met, set the automatic matching flag to 2, indicating that the current manufacturer's equipment protocol does not fully meet the matching conditions and needs to continue matching the next manufacturer's equipment protocol. Simultaneously, calculate the matching rate of the current manufacturer's equipment protocol as a percentage of the cumulative number of times / total number of features * 100%. Finally, send the AI1 and AI2 values ​​back to the automatic matching service.

[0077] 7. Web automatic matching design An "Auto Match" button has been added to the protocol library selection interface. When the user selects the device type, device address, and communication parameters and clicks the button, the web application transmits the preset device address and communication parameters to the auto match service via the Ubus interface. The auto match service continuously and automatically matches data based on the selected device type and initial serial port parameters, repeatedly loading data from various devices until a successful match or a failed match occurs, ending the entire process. The web application then retrieves the matching results via the Ubus interface, including (total auto match progress and individual device protocol matching rate), and displays this information in real-time to the user on the front-end interface.

[0078] This application also provides an automatic communication protocol matching device based on built-in protocol aggregation resources. Please refer to... Figure 7 , Figure 7 This is a schematic diagram of the module structure of the communication protocol automatic matching device based on built-in protocol aggregation resources according to an embodiment of this application. The communication protocol automatic matching device based on built-in protocol aggregation resources includes: The category identification module 701 is used to obtain the access request of the device to be accessed and extract the device category identifier from the access request. The protocol aggregation module 702 is used to determine the protocol aggregation resource corresponding to the device category identifier based on the device category identifier, and to obtain the protocol dependency description file and feature parameter configuration file associated with the protocol aggregation resource. The protocol dependency description file includes a matching status field, a device identifier field, and a feature parameter valid range field. The data interaction module 703 is used to determine a set of candidate device identifiers based on the feature parameter configuration file during the matching process, and update the device identifier field in the protocol dependency description file based on each candidate device identifier in the set of candidate device identifiers, so as to drive the protocol aggregation resource to call the protocol branch corresponding to the current candidate device identifier and perform data interaction with the device to be accessed. The field feedback module 704 is used to obtain the collected value obtained from the data interaction for each protocol branch, and compare the collected value with the valid range field of the feature parameter in the protocol dependency description file to generate a matching judgment result during the parsing process of the protocol aggregation resource. Based on the matching judgment result, the matching status field is updated, and the updated matching status field is fed back to the control side through a preset feedback channel. The target module 705 is used to determine the target protocol branch based on the matching status field received by the control side, and output the matching result corresponding to the target protocol branch.

[0079] The automatic communication protocol matching device based on built-in protocol aggregation resources provided in this application adopts the automatic communication protocol matching method based on built-in protocol aggregation resources in the above embodiments, which can solve the technical problem of how to improve the automation level of communication protocol matching of the device to be accessed. Compared with the prior art, the beneficial effects of the automatic communication protocol matching device based on built-in protocol aggregation resources provided in this application are the same as the beneficial effects of the automatic communication protocol matching method based on built-in protocol aggregation resources provided in the above embodiments, and other technical features in the automatic communication protocol matching device based on built-in protocol aggregation resources are the same as the features disclosed in the methods of the above embodiments, and will not be repeated here.

[0080] This application provides an automatic communication protocol matching device based on built-in protocol aggregation resources. The automatic communication protocol matching device based on built-in protocol aggregation resources includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the automatic communication protocol matching method based on built-in protocol aggregation resources in the above embodiments.

[0081] The following is for reference. Figure 8 , Figure 8 This is a schematic diagram of the hardware operating environment involved in the automatic communication protocol matching method based on built-in protocol aggregation resources in the embodiments of this application. It shows a schematic diagram of the structure of the device suitable for implementing the automatic communication protocol matching device based on built-in protocol aggregation resources in the embodiments of this application. Figure 8 The communication protocol auto-matching device based on built-in protocol aggregation resources shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0082] like Figure 8 As shown, the communication protocol automatic matching device based on built-in protocol aggregation resources may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the communication protocol automatic matching device based on built-in protocol aggregation resources. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows communication protocol auto-matching devices based on built-in protocol aggregation resources to exchange data wirelessly or via wired communication with other devices. Although the figure shows communication protocol auto-matching devices based on built-in protocol aggregation resources with various systems, it should be understood that implementing or having all the systems shown is not required. More or fewer systems can be implemented alternatively.

[0083] In particular, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. When the computer program is executed by the processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0084] The communication protocol automatic matching device based on built-in protocol aggregation resources provided in this application, employing the communication protocol automatic matching method based on built-in protocol aggregation resources in the above embodiments, can solve the technical problem of how to improve the automation level of communication protocol matching for devices to be accessed. Compared with the prior art, the beneficial effects of the communication protocol automatic matching device based on built-in protocol aggregation resources provided in this application are the same as the beneficial effects of the communication protocol automatic matching method based on built-in protocol aggregation resources provided in the above embodiments, and other technical features in this communication protocol automatic matching device based on built-in protocol aggregation resources are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.

[0085] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0086] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0087] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the communication protocol automatic matching method based on built-in protocol aggregation resources in the above embodiments.

[0088] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by a communication protocol auto-matching device based on built-in protocol aggregation resources, the communication protocol auto-matching device based on built-in protocol aggregation resources: obtains an access request from a device to be accessed and extracts a device category identifier from the access request; determines the protocol aggregation resource corresponding to the device category identifier based on the device category identifier, and obtains a protocol dependency description file and a feature parameter configuration file associated with the protocol aggregation resource. The protocol dependency description file includes a matching status field, a device identifier field, and a feature parameter valid range field; in the matching process, it determines a set of candidate device identifiers based on the feature parameter configuration file, and... For each candidate device identifier in the candidate device identifier set, the device identifier field in the protocol dependency description file is updated to drive the protocol aggregation resource to call the protocol branch corresponding to the current candidate device identifier and interact with the device to be accessed. For each protocol branch, the collected value obtained from the data interaction is acquired, and during the parsing process of the protocol aggregation resource, the collected value is compared with the valid range field of the feature parameters in the protocol dependency description file to generate a matching judgment result. Based on the matching judgment result, the matching status field is updated, and the updated matching status field is sent back to the control side through a preset feedback channel. Based on the matching status field received by the control side, the target protocol branch is determined, and the matching result corresponding to the target protocol branch is output. Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof. The programming languages ​​include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer through any type of network—including a local area network (LAN) or a wide area network (WAN)—or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0089] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0090] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0091] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described automatic communication protocol matching method based on built-in protocol aggregation resources. This solves the technical problem of how to improve the automation level of communication protocol matching for devices to be accessed. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the automatic communication protocol matching method based on built-in protocol aggregation resources provided in the above embodiments, and will not be repeated here.

[0092] This application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the communication protocol automatic matching method based on built-in protocol aggregation resources as described above.

[0093] The computer program product provided in this application can solve the technical problem of how to improve the automation level of communication protocol matching for devices to be accessed. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the automatic communication protocol matching method based on built-in protocol aggregation resources provided in the above embodiments, and will not be repeated here.

[0094] The above are merely preferred embodiments of this application and do not limit the scope of protection of this application. Any equivalent structural or procedural transformations made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the scope of this application.

Claims

1. A method for automatic matching of communication protocols based on built-in protocol aggregation resources, characterized in that, The method includes: Obtain the access request from the device to be connected, and extract the device category identifier from the access request; Based on the device category identifier, determine the protocol aggregation resource corresponding to the device category identifier, and obtain the protocol dependency description file and feature parameter configuration file associated with the protocol aggregation resource. The protocol dependency description file includes a matching status field, a device identifier field, and a feature parameter valid range field. In the matching process, a set of candidate device identifiers is determined based on the feature parameter configuration file, and the device identifier field in the protocol dependency description file is updated based on each candidate device identifier in the set of candidate device identifiers, so as to drive the protocol aggregation resource to call the protocol branch corresponding to the current candidate device identifier to interact with the device to be accessed. For each of the protocol branches, the collected values ​​obtained from the data interaction are acquired, and during the parsing process of the protocol aggregated resources, the collected values ​​are compared with the valid range field of the feature parameters in the protocol dependency description file to generate a matching judgment result. The matching status field is updated based on the matching judgment result, and the updated matching status field is sent back to the control side through a preset backhaul channel. The target protocol branch is determined based on the matching status field received by the control side, and the matching result corresponding to the target protocol branch is output.

2. The method as described in claim 1, characterized in that, The step of obtaining the access request of the device to be accessed and extracting the device category identifier from the access request includes: Obtain access trigger information initiated by the control side and generated for the device to be accessed, and generate an access request including the identification information of the device to be accessed based on the access trigger information; The device description information related to the device to be accessed is parsed from the access request, and the category determination information used to characterize the device category is determined based on the device description information; The device category identifier is generated based on the category determination information.

3. The method as described in claim 1, characterized in that, The step of determining the protocol aggregation resource corresponding to the device category identifier based on the device category identifier, and obtaining the protocol dependency description file and feature parameter configuration file associated with the protocol aggregation resource, includes: Based on the device category identifier, a target resource identifier that matches the device category identifier is retrieved from the preset protocol resource mapping relationship, and the protocol aggregation resource corresponding to the device category identifier is determined according to the target resource identifier; Based on the protocol aggregation resource, locate the protocol dependency description file associated with the protocol aggregation resource, and read the matching status field, device identifier field, and feature parameter valid range field from the protocol dependency description file; Based on the protocol aggregation resource, the feature parameter configuration file associated with the protocol aggregation resource is located, and the feature parameter configuration file is loaded to obtain the candidate device identifier related configuration, thereby obtaining the protocol dependency description file and feature parameter configuration file associated with the protocol aggregation resource.

4. The method as described in claim 1, characterized in that, The step of determining a set of candidate device identifiers based on the feature parameter configuration file in the matching process, and updating the device identifier field in the protocol dependency description file based on each candidate device identifier in the set of candidate device identifiers, to drive the protocol aggregation resource to call the protocol branch corresponding to the current candidate device identifier to interact with the device to be accessed for data exchange, includes: In the matching process, the device identifier-related configuration associated with the device category identifier is obtained by parsing the feature parameter configuration file, and a candidate device identifier set is generated based on the device identifier-related configuration; The current candidate device identifier is selected from the candidate device identifier set according to the preset traversal order, and the current candidate device identifier is written into the device identifier field of the protocol dependency description file to obtain the updated protocol dependency description file; Based on the updated protocol dependency description file, the protocol aggregation resource calls the protocol branch corresponding to the current candidate device identifier, and performs data interaction with the device to be accessed based on the protocol branch, so as to drive the protocol aggregation resource to call the protocol branch corresponding to the current candidate device identifier to perform data interaction with the device to be accessed.

5. The method as described in claim 1, characterized in that, The steps of acquiring the collected values ​​obtained from the data interaction for each protocol branch, comparing the collected values ​​with the valid range field of the feature parameters in the protocol dependency description file to generate a matching judgment result during the parsing of the protocol aggregation resources, updating the matching status field based on the matching judgment result, and sending the updated matching status field back to the control side through a preset backhaul channel include: For the protocol branch corresponding to the candidate device identifier, the data interaction is performed with the device to be accessed based on the protocol branch, the collected value output by the data interaction is obtained, and the collected value is input into the parsing process of the protocol aggregation resource; During the parsing process of the protocol aggregated resources, based on the valid range field of the feature parameters in the protocol dependency description file, the collected values ​​are subjected to range consistency comparison processing to generate a matching judgment result corresponding to the protocol branch; The matching status field in the protocol dependency description file is updated based on the matching determination result, and the updated matching status field is sent back to the control side through a preset backhaul channel.

6. The method as described in claim 1, characterized in that, The step of determining the target protocol branch based on the matching status field received by the control side and outputting the matching result corresponding to the target protocol branch includes: The matching status field received by the control side via the preset backhaul channel is obtained, and the protocol branch status corresponding to the candidate device identifier currently being traversed is determined based on the matching status field. When the protocol branch status indication meets the target matching condition, the candidate device identifier corresponding to the matching status field is determined as the target device identifier, and the protocol branch corresponding to the target device identifier is determined as the target protocol branch; Based on the target protocol branch, matching result data is generated and output to the control side to output the matching result corresponding to the target protocol branch.

7. A communication protocol automatic matching device based on built-in protocol aggregation resources, characterized in that, The device includes: The category identification module is used to obtain the access request from the device to be accessed and extract the device category identifier from the access request. The protocol aggregation module is used to determine the protocol aggregation resource corresponding to the device category identifier based on the device category identifier, and to obtain the protocol dependency description file and feature parameter configuration file associated with the protocol aggregation resource. The protocol dependency description file includes a matching status field, a device identifier field, and a feature parameter valid range field. The data interaction module is used to determine a set of candidate device identifiers based on the feature parameter configuration file during the matching process, and update the device identifier field in the protocol dependency description file based on each candidate device identifier in the set of candidate device identifiers, so as to drive the protocol aggregation resource to call the protocol branch corresponding to the current candidate device identifier and interact with the device to be accessed. The field feedback module is used to obtain the collected value obtained from the data interaction for each protocol branch, and compare the collected value with the valid range field of the feature parameter in the protocol dependency description file to generate a matching judgment result during the parsing process of the protocol aggregated resource. Based on the matching judgment result, the matching status field is updated, and the updated matching status field is fed back to the control side through a preset feedback channel. The target module is used to determine the target protocol branch based on the matching status field received by the control side, and output the matching result corresponding to the target protocol branch.

8. A communication protocol automatic matching device based on built-in protocol aggregation resources, characterized in that, The device includes: a memory, a processor, and an automatic communication protocol matching program based on built-in protocol aggregation resources stored in the memory and executable on the processor, the automatic communication protocol matching program based on built-in protocol aggregation resources being configured to implement the steps of the automatic communication protocol matching method based on built-in protocol aggregation resources as described in any one of claims 1 to 6.

9. A storage medium, characterized in that, The storage medium stores an automatic communication protocol matching program based on built-in protocol aggregation resources. When the processor executes the automatic communication protocol matching program based on built-in protocol aggregation resources, it implements the steps of the automatic communication protocol matching method based on built-in protocol aggregation resources as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the communication protocol automatic matching method based on built-in protocol aggregation resources as described in any one of claims 1 to 6.