The invention relates to a protocol
consistency test method and
system based on
artificial intelligence, and the method comprises the steps: firstly, based on a communication message, calling a large
language model LLM for
processing, and obtaining an
XML format
test script and a
JSON rule expression set; driving a
server to work by using an
XML (
Extensible Markup Language) format
test script, capturing a communication
message flow, finally analyzing each to-be-analyzed
function code in the communication
message flow and a field name and a field value of the to-be-analyzed
function code, and mapping the to-be-analyzed
function code and the field name and the field value of the to-be-analyzed function code into each variable name and variable value which accord with an
open source rule matching engine expression
knowledge base; substituting the target function codes into
JSON rule expressions of various business scenes corresponding to the corresponding target function codes in a
JSON rule expression set to realize a
consistency test; according to the design scheme, large
language model LLM and RAG technologies are introduced, automatic and intelligent
processing of the whole
protocol conformance testing process is achieved, the testing efficiency, the coverage rate and the accuracy are effectively improved, and the manual participation degree and the maintenance cost are reduced.