Multi-protocol self-adaptive intelligent assertion engine system and cross-platform verification method
Through the multi-protocol self-adaptive intelligent assertion engine system, the problems of high protocol coupling, high maintenance cost, single verification dimension and limited expansion capability of interface testing tools in multi-protocol mixed testing are solved, and efficient and accurate cross-protocol verification and difference analysis are achieved.
Patent Information
- Application Number
- CN202511254439.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-04
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-09-04
AI Technical Summary
Existing interface testing tools have problems such as high protocol coupling, high maintenance cost, single verification dimension, weak difference analysis and limited expansion capability when handling multi-protocol mixed testing, making it difficult to achieve efficient, unified and visual verification across protocols.
It adopts a multi-protocol self-adaptive intelligent assertion engine system, including a protocol perception layer, a unified description layer, an adaptation execution layer, and an intelligent analysis layer. It realizes unified verification and difference analysis across protocols through protocol feature extraction, a weighted scoring mechanism, an abstract syntax tree conversion, and a visual renderer.
It achieves high-accuracy protocol identification and type adaptation, reduces test script maintenance costs, improves code reuse, supports multi-dimensional verification and visual difference display, and shortens the new protocol adaptation cycle.
Smart Images

Figure CN120806882A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of software testing, and in particular relates to a multi-protocol adaptive intelligent assertion engine system and a cross-platform verification method. BACKGROUND
[0002] With the evolution of software systems towards distributed and microservice architecture, the interface communication protocols between systems show a trend of diversification, and protocols such as HTTP, gRPC and WebSocket coexist in the same system as the norm. The current mainstream interface testing tools (such as Postman, JMeter and SoapUI, etc.) have significant limitations when dealing with multi-protocol mixed testing, as follows: (1) High protocol coupling: traditional assertion tools need to write independent verification logic for different protocols, for example, verifying HTTP response requires calling specific status code checking methods, and gRPC verification requires parsing protobuf structure, resulting in strong binding between test scripts and protocol types, low code reuse rate in cross-protocol testing scenarios; (2) High maintenance cost: protocol version upgrade will lead to synchronous modification of assertion scripts, for example, HTTP / 2 protocol header format change and gRPC protocol protobuf field addition and deletion, all of which require reengineering of verification logic, and the proportion of test script maintenance workload caused by protocol version iteration in total test cost is high, and the system scalability is poor; (3) Single verification dimension: lack of joint verification capability for binary protocols, nested data structures and performance indicators, traditional tools can only verify the surface data of text protocols (such as HTTP status code, JSON field), cannot handle WebSocket binary message frames, and cannot handle complex JSON structures with more than ten layers of nesting, and cannot associate response time, throughput and other performance indicators for comprehensive verification; (4) Weak difference analysis: traditional tools only provide simple Boolean judgment (verification pass or fail), lack of difference localization and visualization capabilities, when a deep field in the nested structure does not match, manual layer-by-layer troubleshooting is required, the average fault localization time is long, and the data flow difference in the multi-protocol interaction link cannot be intuitively displayed; (5) Limited extension capability: adding new protocol types (such as MQTT and Kafka) requires modifying the core framework code, which does not comply with the open-closed principle, resulting in high system upgrade risk, and the development cycle of adding a new protocol verification capability under the traditional architecture is long. SUMMARY
[0003] In order to solve the above technical problems, the present application provides a multi-protocol adaptive intelligent assertion engine system and a cross-platform verification method.
[0004] In a first aspect, the application provides a multi-protocol adaptive intelligent assertion engine system, comprising a protocol awareness layer, a unified description layer, an adaptive execution layer, and an intelligent analysis layer. The protocol awareness layer comprises a protocol feature library, a multi-dimensional feature extractor, a confidence decision engine, and a protocol version identification subunit. After receiving the data to be verified, the multi-dimensional feature extractor extracts protocol features. The confidence decision engine dynamically adjusts the weight of the protocol features through a weighted scoring mechanism, establishes a scoring mechanism, matches the protocol features with the protocol feature library, comprehensively evaluates the matching score of the protocol features, and determines the protocol type. The protocol version identification subunit extracts version information. The unified description layer comprises a DAL syntax parser, an abstract syntax tree generator, and a protocol-independent verification rule converter. The DAL syntax parser parses the declarative assertion rules written by the user. The abstract syntax tree generator generates an abstract syntax tree according to the parsing result. The protocol-independent verification rule converter converts the abstract syntax tree into verification instructions according to the protocol type. The adaptive execution layer comprises a verifier factory, a class loader isolation container, a protocol-verifier mapping table, and an execution result aggregator. The verifier factory loads the verifier corresponding to the protocol from the class loader isolation container through the factory mode according to the identification result of the protocol awareness layer and the protocol-verifier mapping table. The verifier executes the verification instructions converted by the unified description layer. The execution result aggregator collects the verification results. The intelligent analysis layer comprises a nested data comparison engine, a binary difference calculation unit, a multi-dimensional result correlation analyzer, and a visual renderer. The nested data comparison engine compares the verification results in a nested data structure. The binary difference calculation unit calculates the binary data edit distance. The multi-dimensional result correlation analyzer forms a comprehensive report according to the correlation performance indicators. The visual renderer visualizes the comprehensive report and displays the difference details through a visual interface.
[0005] In a second aspect, the application provides a multi-protocol adaptive intelligent assertion cross-platform verification method, comprising protocol identification, rule analysis, verification execution, and result analysis. The protocol identification comprises the following steps: after receiving the data to be verified, the multi-dimensional feature extractor extracts protocol features, matches the protocol features with the protocol feature library, establishes a scoring mechanism to determine the protocol type, and extracts version information. The rule analysis comprises the following steps: the DAL syntax parser parses the declarative assertion rules written by the user; the abstract syntax tree generator generates an abstract syntax tree according to the parsing result; and the protocol-independent verification rule converter converts the abstract syntax tree into verification instructions according to the protocol type. The verification execution comprises: the verifier factory identifies the protocol perception layer result according to a protocol-verifier mapping table, and loads the verifier of the corresponding protocol from the class loader isolation container through the factory mode; the verifier executes the verification instruction converted by the unified description layer; and the execution result aggregator collects the verification result. The result analysis comprises: the nested data comparison engine performs nested data structure comparison on the verification result; the binary difference calculation unit performs binary data edit distance calculation; the multi-dimensional result correlation analyzer forms a comprehensive report according to correlation performance indicators; and the visual renderer performs visual processing on the comprehensive report and displays the difference details through a visual interface.
[0006] On the basis of the above technical solution, the application can be further improved as follows.
[0007] Further, a scoring mechanism is established to determine the protocol type, comprising: a weighted scoring mechanism is established to identify the protocol type; dynamic weights are set for each protocol feature; when the total score is greater than or equal to a set score threshold, the protocol type is determined; when the total score is less than the set score threshold, a degradation verification mechanism is started, and the protocol type is determined through general rules.
[0008] Further, a unified verifier interface is defined; and the verifier factory dynamically loads protocol adaptation components through the factory mode.
[0009] Further, the class loader isolation container loads the jar package of the new protocol verifier at the system runtime to add the protocol verifier.
[0010] Further, the class loader isolation container is used to run each verifier, and each verifier runs in an independent class loader space.
[0011] Further, the nested data comparison engine uses a depth-first search strategy to traverse the nested object, and pre-judges the verification result through hash value comparison; when the hash values are different, the verification result is compared in the nested data structure.
[0012] Further, the binary difference calculation unit performs binary data edit distance calculation, which is optimized based on the Levenshtein distance algorithm, and calculates the minimum modification steps required for binary data conversion.
[0013] Further, the verification results of different protocols in the same business link are correlated to identify cross-protocol data flow conversion anomalies.
[0014] Further, the visual renderer generates a visual report containing a JSON tree view, a hexadecimal comparison and a performance indicator curve.
[0015] The application has the following beneficial effects: (1) The protocol recognition accuracy is high, and the code reuse rate is high in a cross-protocol test scenario. (2) The test script maintenance workload caused by protocol version iteration accounts for a low proportion of the total test cost, and the maintenance cost is low; (3) Implement multi-dimensional verification, be able to process WebSocket binary message frames and complex JSON structures with more than ten nested layers, and be able to correlate performance indicators such as response time and throughput for comprehensive verification; (4) The new protocol adaptation cycle is short, the nested data difference positioning time is short, and the data flow differences in the multi-protocol interaction link can be intuitively displayed; (5) It has strong scalability and the development cycle of adding verification capabilities for a new protocol is short. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A functional block diagram of the multi-protocol self-adaptive intelligent assertion engine system provided in Example 1 of the present invention; Figure 2 A flowchart of the specific workflow of the multi-protocol self-adaptive intelligent assertion engine system; Figure 3 Flow chart of system detection; Figure 4 This is a schematic diagram of the visualization interface; Figure 5 This is a schematic diagram of the cross-platform verification method of the multi-protocol self-adaptive intelligent assertion engine provided in Example 2 of the present invention. DETAILED DESCRIPTION
[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.
[0018] Example 1 As an example, Figure 1 As shown, in order to solve the above technical problems, this embodiment provides a multi-protocol self-adaptive intelligent assertion engine system, including a protocol perception layer, a unified description layer, an adaptation execution layer and an intelligent analysis layer; The protocol perception layer includes a protocol feature library, a multi-dimensional feature extractor, a confidence decision engine, and a protocol version identification subunit. After the protocol perception layer receives the data to be verified, the multi-dimensional feature extractor extracts the protocol features. The confidence decision engine dynamically adjusts the weights of the protocol features through a weighted scoring mechanism, establishes a scoring mechanism, matches the protocol features with the protocol feature library, comprehensively evaluates the matching scores of the protocol features, and determines the protocol type. The protocol version identification subunit extracts version information. The unified description layer includes a DAL syntax parser, an abstract syntax tree generator, and a protocol-independent verification rule converter; the DAL syntax parser parses the declarative assertion rules written by a user; the abstract syntax tree generator generates an abstract syntax tree according to a parsing result; and the protocol-independent verification rule converter converts the abstract syntax tree into verification instructions according to a protocol type; The adaptive execution layer includes a verifier factory, a class loader isolation container, a protocol-verifier mapping table, and an execution result aggregator; the verifier factory loads a verifier of a corresponding protocol from the class loader isolation container through a factory mode according to a recognition result of the protocol-aware layer and the protocol-verifier mapping table; the verifier executes the verification instructions converted by the unified description layer; and the execution result aggregator collects verification results; The intelligent analysis layer includes a nested data comparison engine, a binary difference calculation unit, a multi-dimensional result correlation analyzer, and a visual renderer; the nested data comparison engine compares the verification results in a nested data structure; the binary difference calculation unit calculates a binary data edit distance; the multi-dimensional result correlation analyzer forms a comprehensive report according to correlation performance indicators; and the visual renderer visualizes the comprehensive report and displays difference details through a visual interface.
[0019] The depth-first search strategy is used to traverse a nested data structure (such as a 16-layer nested JSON), quickly locate a field-level difference, and reduce manual troubleshooting time. First, the hash value is used to quickly determine whether the data is consistent, and if not, the depth comparison is performed. The 16-layer nested structure comparison is supported, and the difference positioning accuracy reaches the field level. The correlation performance indicators such as response time and throughput are obtained by collecting performance data in the verifier execution process through the execution result aggregator. The multi-dimensional result correlation analyzer analyzes the verification results of different protocols in the same business link (such as HTTP response time 120 ms, gRPC 85 ms, and WebSocket 30 ms), generates a comprehensive report, and visually displays the cross-protocol performance differences through the performance indicator curves (such as the response time trend chart).
[0020] Specifically, as shown in the accompanying Figure 2 The specific workflow of the multi-protocol adaptive intelligent assertion engine system is as follows: After the system is started and detected, the detected system sends a request to the multi-protocol adapter, and the multi-protocol adapter processes HTTP responses, gRPC responses, WebSocket messages, binary features, and TCP features through the HTTP response processor, the gRPC response decoder, the WS message parser, respectively. DAL syntax parser adopts multi-protocol fingerprint identification method. The protocol awareness layer can dynamically obtain HTTP / gRPC / WebSocket protocol features through multi-dimensional protocol feature extractor, automatically identify protocol type and version information, and extract protocol features (such as HTTP status_code, gRPC content-type header and WebSocket Sec-WebSocket-Key, etc.) after receiving the data to be verified. The protocol type is determined through feature matching and scoring mechanism, and the identification accuracy is above 98.7%. The unified description layer provides a declarative assertion description language (DAL) and a parsing engine, which can realize cross-protocol unified verification rule definition. The unified rule parser parses the declarative assertion rules written by the user (such as YAML / JSON assertion description) into an abstract syntax tree, and then converts it into specific verification instructions according to the protocol type, realizing one writing, multi-protocol application. The adaptive execution layer dynamically loads protocol-specific verifiers to execute specific verification logic, such as HTTP assertion executor, gRPC assertion executor and WebSocket assertion executor. The adaptive execution layer loads the corresponding protocol verifier from the class loading isolation container through the factory mode according to the identification result of the protocol awareness layer, and the verifier executes the verification instruction converted by the unified description layer to collect the verification result. The intelligent analysis layer realizes cross-protocol difference comparison and visual report generation. The intelligent analysis layer supports 16-layer nested data structure comparison and binary data edit distance calculation through deep analysis of the verification result, forms a comprehensive report through association of performance indicators, and displays the difference details through a visual interface.
[0021] In actual application process, declarative assertion description language is adopted, cross-protocol unified assertion syntax is adopted to support state code verification, metadata verification and message frame analysis, etc. Universal verification scenarios, protocol-independent rule definition is realized through abstract syntax tree. The rule reuse rate is improved to more than 85%. Cross-protocol unification refers to the communication rules of different protocols (such as HTTP, gRPC, WebSocket and MQTT, etc.) are unified into a general format through middleware, converters and standardized interfaces, etc. Cross-protocol unified assertion syntax refers to the assertion rule definition method applicable to multiple protocols. Only one assertion logic (such as state code verification and field verification) needs to be written, which can be reused across protocols (such as HTTP, gRPC and WebSocket), without the need to define assertion syntax for each protocol. Through declarative language and abstract syntax tree, protocol-independent rule conversion is realized.
[0022] Optionally, a scoring mechanism is established to determine the protocol type, including establishing a weighted scoring mechanism to identify the protocol type; setting dynamic weights for each protocol feature; determining the protocol type when the total score is greater than or equal to a set score threshold, and starting a downgrade verification mechanism when the total score is lower than the set score threshold, and determining the protocol type through general rules.
[0023] Multi-dimensional protocol determination algorithm based on response header and load characteristics: a feature library containing multiple protocol features is constructed (such as HTTP status code, gRPC content-type (in HTTP protocol, Content-Type is a header field used to indicate the media type of the entity data in the request or response): application / grpc (application / grpc is a MIME type (header field) used in GRPC protocol communication, used to identify the data transmitted in compliance with the gRPC protocol specification.), etc.), and the protocol type is identified through a weighted scoring mechanism.
[0024] Set dynamic weights for different protocol features, such as HTTP status code matching weight 30 points, gRPC content-type matching weight 25 points, etc.), and determine the protocol type when the total score is greater than or equal to 50 points, and start the downgrade verification mechanism when the total score is less than 50 points.
[0025] Through experiments, the recognition accuracy of gRPC remote procedure call protocol reaches 98.7%, the recognition accuracy of WebSocket protocol reaches 97.3%, and the overall recognition accuracy in mixed protocol scenarios reaches 96.5%.
[0026] The verifier hot loading mechanism is adopted, the factory pattern is used to dynamically load protocol adaptation components, a unified verifier interface is defined, each protocol verifier implements the interface, instances are dynamically created through the factory class, and the core code does not need to be modified when adding new protocols. Support for adding protocol verifiers at runtime (such as MQTT / Kafka), through class loader isolation containers, load new protocol verifier jar packages at system runtime, and achieve plug and play. The design of the class loading isolation container ensures system stability, each verifier runs in a separate class loader space, avoiding class conflicts, and the fault isolation rate reaches 100%. Through the addition of an MQTT protocol verifier, the efficiency is improved by 14 times compared to traditional architecture in only 1 day.
[0027] Adopt intelligent difference analysis engine, through nested data structure comparison algorithm (support 16 layers of object recursion): adopt depth first search strategy to traverse nested objects, pre-judge through hash value to reduce comparison amount, difference positioning accuracy reaches field level. Adopt binary difference based edit distance calculation model, based on Levenshtein distance algorithm optimization, calculate the minimum modification steps of binary data, support byte level difference positioning. Adopt hybrid protocol verification result association analysis method, through the association of the verification results of different protocols in the same service chain, identify cross-protocol data flow transfer anomalies. In the actual application process, the comparison speed of 16 layers of nested structure is improved by 40% compared with the traditional recursive algorithm, the binary difference positioning time is shortened to 0.3 seconds / MB, and the fault positioning efficiency is improved by 80%.
[0028] For example, as shown in the accompanying drawings Figure 3 As shown, after system startup detection, the detected system sends a request to the multi-protocol adapter, and the multi-protocol adapter respectively corresponds to detect HTTP features (if status_code exists, +30 points), gRPC features (content-type contains gRPC, +25 points), WebSocket features (Sec-WebSocket header exists, +20 points), binary features (magic number matching, +15 points), and TCP features (+10 points) through HTTP response processor, gRPC response decoder and WS message parser; After accumulating the score, if the highest score is greater than or equal to 50, the protocol type is determined, otherwise the downgrade general verification is executed.
[0029] When the protocol feature matching score is lower than the set threshold (such as 40 points), the downgrade verification mechanism is started, if the protocol type cannot be determined, the basic verification is performed through general rules (such as checking whether the HTTP response header exists or the binary data magic number matches) or the protocol determination is performed through only using high weight features (such as data format identification mechanism), to reduce the risk of misjudgment.
[0030] Optionally, a unified verifier interface is defined; the verifier factory adopts factory mode to dynamically load protocol adaptation components.
[0031] Optionally, the runtime loads the jar package of the new protocol verifier through the class loader isolation container to add the protocol verifier.
[0032] Optionally, the class loader isolation container is used to run each verifier, and each verifier runs in an independent class loader space.
[0033] Optionally, the nested data comparison engine adopts depth first search strategy to traverse nested objects, pre-judges the verification result through hash value, and compares the verification result through hash value when the hash values are different.
[0034] Optionally, the binary difference calculation unit performs binary data edit distance calculation, based on Levenshtein distance algorithm optimization, to calculate the minimum modification steps required for binary data conversion.
[0035] Optionally, by associating the verification results of different protocols in the same service link, cross-protocol data flow conversion anomalies are identified.
[0036] Optionally, the visualization renderer generates a visualization report containing a JSON tree view, a hexadecimal comparison, and performance indicator curves.
[0037] As shown in the accompanying Figure 4 visualization interface consists of: navigation bar (including protocol selection label and view mode switching), main display area (including left actual value and right expected value, difference content highlight display), performance indicator area (including response time curve and throughput heat map), operation toolbar (including difference export button, comment adding tool, and history comparison slider). Supports multiple modes such as JSON tree view, hexadecimal comparison, binary analysis, and offset positioning.
[0038] Taking e-commerce order process multi-protocol verification as an example, the e-commerce platform order creation full process is verified, including HTTP interface order creation (RESTful API), gRPC interface logistics information query (protobuf format), and WebSocket inventory change notification reception (text and binary message frames).
[0039] The specific implementation steps include: configuring declarative assertion files; executing automated test scripts; verifying result analysis. The intelligent analysis layer generates a joint verification report containing HTTP / gRPC / WebSocket; the visualization interface highlights the difference items (such as inventory availability calculation error for a certain order); automatically associates the response times of the three calls (HTTP: 120ms, gRPC: 85ms, WebSocket: 30ms) to generate performance comparison curves.
[0040] Taking MQTT protocol extension adaptation as an example, add MQTT protocol verification capability in the existing system for Internet of Things device message testing. The specific implementation steps include: developing an MQTT protocol verifier; registering the verifier to the system using hot loading; configuring MQTT assertion rules; executing verification and viewing results: MQTT message verification response time ≤ 50ms; supporting precise positioning of errors such as QoS level mismatch and payload field missing; the visualization interface shows the association between MQTT messages and other protocol messages.
[0041] The application has the following effects: the protocol recognition accuracy is greater than or equal to 96.5%, which is increased by 35% compared with the traditional method; the test script reuse rate is increased from 30% to more than 85%; the new protocol adaptation period is shortened from 2 weeks to 1-2 days; the nested data difference positioning time is shortened from 30 minutes to less than 1 minute; the test script maintenance cost is reduced by more than 60%; no special tool needs to be provided for each protocol, which reduces the procurement cost of the new protocol test tool; the test period is shortened, and the product online time is accelerated (the average is shortened by 15%-20%); The application is suitable for the automated testing of the multi-protocol mixed calling scene under the micro-service architecture, and can provide an efficient testing solution for the multi-protocol interaction intensive field such as the Internet of Things and financial technology, and support the test team to quickly respond to protocol upgrades and new requirements, and improve the productivity of the test team.
[0042] Embodiment 2 Based on the same principle as the method shown in Embodiment 1 of the application, as shown in the accompanying Figure 5 The application also provides a multi-protocol adaptive intelligent assertion cross-platform verification method in the embodiments, which includes protocol recognition, rule analysis, verification execution and result analysis. The protocol recognition includes: after the protocol perception layer receives the to-be-verified data, the multi-dimensional feature extractor extracts the protocol features, performs feature matching on the protocol features and the protocol feature library, establishes a scoring mechanism to determine the protocol type, and extracts the version information. The rule analysis includes: the DAL syntax parser parses the declarative assertion rules written by the user; the abstract syntax tree generator generates an abstract syntax tree according to the parsing result; and the protocol-independent verification rule converter converts the abstract syntax tree into a verification instruction according to the protocol type. The verification execution includes: the verifier factory loads the verifier corresponding to the protocol from the class loader isolation container through the factory mode according to the protocol perception layer recognition result and the protocol-verifier mapping table; the verifier executes the converted verification instruction of the unified description layer; and the execution result aggregator collects the verification result. The result analysis includes: the nested data comparison engine compares the verification results in the nested data structure; the binary difference calculation unit calculates the binary data edit distance; the multi-dimensional result correlation analyzer forms a comprehensive report according to the correlation performance indicators; and the visual renderer visualizes the comprehensive report and displays the difference details through the visual interface.
[0043] Optionally, the scoring mechanism is established to determine the protocol type, which includes establishing a weighted scoring mechanism to identify the protocol type; setting dynamic weights for each protocol feature; determining the protocol type when the total score is greater than or equal to the set score threshold; starting a degradation verification mechanism when the total score is lower than the set score threshold, and determining the protocol type through general rules.
[0044] Optionally, a unified verifier interface is defined; and the verifier factory dynamically loads the protocol adaptation component by using the factory mode.
[0045] Optionally, the runtime loads the jar package of the new protocol verifier through the class loader isolation container to add the protocol verifier.
[0046] Optionally, the class loader isolation container is used to run each verifier, and each verifier runs in an independent class loader space.
[0047] Optionally, the nested data comparison engine uses a depth-first search strategy to traverse the nested objects, pre-judges the verification result by comparing the hash values, and compares the verification result by using the nested data structure when the hash values are different.
[0048] Optionally, the binary difference calculation unit calculates the binary data edit distance, optimizes the Levenshtein distance algorithm, and calculates the minimum modification steps required for the binary data conversion.
[0049] Optionally, the verification results of different protocols in the same business link are associated to identify cross-protocol data flow conversion anomalies.
[0050] Optionally, the visual renderer generates a visual report including a JSON tree view, a hexadecimal comparison, and a performance index curve.
[0051] The above is only a preferred embodiment of the present application and is not used to limit the present application. For those skilled in the art, the present application can have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A multi-protocol self-adaptive intelligent assertion engine system, characterized by: It includes protocol perception layer, unified description layer, adaptation execution layer and intelligent analysis layer; The protocol perception layer includes a protocol feature library, a multi-dimensional feature extractor, a confidence decision engine, and a protocol version identification subunit. After the protocol perception layer receives the data to be verified, the multi-dimensional feature extractor extracts the protocol features, matches the protocol features with the protocol feature library, establishes a scoring mechanism to determine the protocol type, and extracts version information. Unified description layer, including DAL syntax parser, abstract syntax tree generator and protocol-independent validation rule converter; The DAL syntax parser parses the declarative assertion rules written by the user; The abstract syntax tree generator generates an abstract syntax tree based on the parsing results; the protocol-independent verification rule converter converts the abstract syntax tree into verification instructions based on the protocol type; Adaptive execution layer, including validator factory, class loader isolation container, protocol-validator mapping table and execution result aggregator; The validator factory loads the validator of the corresponding protocol from the class loader isolation container through the factory mode according to the recognition results of the protocol perception layer and the protocol-validator mapping table; the validator executes the verification instructions converted by the unified description layer; The execution result aggregator collects the verification results; Intelligent analysis layer, including nested data comparison engine, binary difference calculation unit, multi-dimensional result correlation analyzer and visualization renderer; The nested data comparison engine compares the nested data structures of the verification results; The binary difference calculation unit performs binary data edit distance calculation; The multi-dimensional result correlation analyzer generates a comprehensive report based on the correlation performance indicators; The visual renderer visualizes the comprehensive report and displays the difference details through a visual interface.
2. The multi-protocol self-adaptive intelligent assertion engine system according to claim 1, characterized in that: Establish a scoring mechanism to determine the protocol type, including establishing a weighted scoring mechanism to identify the protocol type; set dynamic weights for each protocol feature; When the total score is greater than or equal to the set score threshold, the protocol type is determined. When the total score is lower than the set score threshold, the downgrade verification mechanism is activated and the protocol type is determined through general rules.
3. The multi-protocol self-adaptive intelligent assertion engine system according to claim 1, characterized in that: Define a unified validator interface; the validator factory uses the factory pattern to dynamically load protocol adapter components.
4. The multi-protocol self-adaptive intelligent assertion engine system according to claim 1, characterized in that: At runtime, a new protocol verifier is added by isolating the container through the class loader and loading the jar package of the new protocol verifier when the system is running.
5. The multi-protocol self-adaptive intelligent assertion engine system according to claim 1, characterized in that: The class loader isolation container is used to run each validator, and each validator runs in an independent class loader space.
6. The multi-protocol self-adaptive intelligent assertion engine system according to claim 1, characterized in that: The nested data comparison engine uses a depth-first search strategy to traverse nested objects, pre-judges the verification results by comparing hash values, and compares the nested data structures of the verification results when the hash values are different.
7. The multi-protocol self-adaptive intelligent assertion engine system according to claim 1, characterized in that: The binary difference calculation unit performs binary data edit distance calculation based on the Levenshtein distance algorithm optimization to calculate the minimum modification steps required for binary data conversion.
8. The multi-protocol self-adaptive intelligent assertion engine system according to claim 1, characterized in that: By correlating the verification results of different protocols in the same business link, cross-protocol data flow anomalies can be identified.
9. The multi-protocol self-adaptive intelligent assertion engine system according to claim 1, characterized in that: The visualization renderer generates a visualization report that includes a JSON tree view, hexadecimal comparison, and performance indicator curves.
10. A multi-protocol self-adaptive intelligent assertion cross-platform verification method, characterized in that: Including protocol identification, rule parsing, verification execution and result analysis; Protocol identification includes: after the protocol perception layer receives the data to be verified, the multi-dimensional feature extractor extracts the protocol features, matches the protocol features with the protocol feature library, establishes a scoring mechanism to determine the protocol type, and extracts version information; Rule parsing includes: DAL syntax parser parses the declarative assertion rules written by the user; abstract syntax tree generator generates abstract syntax tree based on the parsing results; protocol-independent validation rule converter converts abstract syntax tree into validation instructions according to protocol type; Verification execution includes: the verifier factory loads the corresponding protocol verifier from the class loader isolation container through the factory mode according to the recognition results of the protocol perception layer and the protocol-verifier mapping table; the verifier executes the verification instructions converted by the unified description layer; the execution result aggregator collects the verification results; The result analysis includes: the nested data comparison engine compares the nested data structure of the verification results; the binary difference calculation unit calculates the binary data edit distance; the multi-dimensional result correlation analyzer generates a comprehensive report based on the correlation performance indicators; the visual renderer visualizes the comprehensive report and displays the difference details through a visual interface.
Citation Information
Patent Citations
Cross-database SQL automatic adaptation detection method and system
CN120371683A
Identification and verification of factual assertions in natural language
US20160078149A1