This invention discloses a terminal identification method, device, equipment, and medium based on OCR technology, belonging to the field of automated testing technology. It includes: Step 1, dividing the ICD protocol into blocks according to ICD
multiplexing identifiers; Step 2, establishing an
adjacency matrix of the
graph based on the relationships between multiple frames in the ICD; Step 3, determining the calculation order of each
multiplexing identifier according to the
adjacency matrix; Step 4, establishing pointers to
multiplexing identifiers to provide a basis for setting the
data stream buffer size and locating multiplexing identifiers; Step 5, calculating the value of each multiplexing identifier sequentially according to the
data stream, selecting the corresponding protocol block, and combining them to form a dedicated
parsing protocol for the current data frame; Step 6, repeating Step 5 until the
parsing of all data streams is completed. This invention provides a solution for
parsing complex ICDs containing multiple frames, effectively solving the error problem when the dependencies between multiplexing identifiers are inconsistent with the
data stream.