Abstract:
The present disclosure provides a parameter acquisition method and device for general protocol parsing and a general protocol parsing method and device. The method includes: acquiring a message to be parsed; according to a preset state transition table, performing regular expression matching on the message to be parsed, and acquiring a state number and location information of a character corresponding to a matched matching rule; and acquiring the matching rule corresponding to the state number according to a preset rule matching table, and outputting a required field according to the matching rule, the location information, and the buffered message to be parsed, where the matching rule is an initial point sub-rule or an end point sub-rule. Embodiments of the present disclosure may implement general parsing on the protocol.