CN109510737A - Protocol interface test method, device, computer equipment and storage medium - Google Patents

Protocol interface test method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN109510737A
CN109510737A CN201811530304.3A CN201811530304A CN109510737A CN 109510737 A CN109510737 A CN 109510737A CN 201811530304 A CN201811530304 A CN 201811530304A CN 109510737 A CN109510737 A CN 109510737A
Authority
CN
China
Prior art keywords
protocol
agreement
interface
message
mark
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811530304.3A
Other languages
Chinese (zh)
Other versions
CN109510737B (en
Inventor
丁晶晶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN201811530304.3A priority Critical patent/CN109510737B/en
Publication of CN109510737A publication Critical patent/CN109510737A/en
Priority to PCT/CN2019/120517 priority patent/WO2020119430A1/en
Application granted granted Critical
Publication of CN109510737B publication Critical patent/CN109510737B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/18Protocol analysers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols

Abstract

This application involves computer communication technology field more particularly to a kind of protocol interface test method, device, computer equipment and storage mediums.Message request information is obtained, the signature identification of agreement is extracted from the message request information, is obtained responding response message according to the feedback result after the signature identification input interface;Agreement described in the response response message is extracted to enter to join information and go out ginseng information, obtain the ID mark of the agreement, the protocol classification that calling classification file is classified to obtain the agreement to the ID mark of the agreement identifies, and corresponding interface is written in the agreement according to protocol classification mark;The corresponding inverse protocol classification mark of the interface is obtained, the inverse protocol classification is assembled and identifies to obtain protocol groups, read the protocol groups and obtain inverse sort file corresponding to protocol groups, obtain the extrapolation message of the agreement.The application can be effectively adapted to by effectively being classified to message information according to classification results.

Description

Protocol interface test method, device, computer equipment and storage medium
Technical field
This application involves computer communication technology field more particularly to a kind of protocol interface test methods, device, computer Equipment and storage medium.
Background technique
Interface testing is generally used in interaction exploitation between multisystem, or possess the application system development of multiple subsystems Test.Interface testing is suitable for providing the bottom frame system and center service system of service for other systems, mainly tests this The interface that a little system external portions provide, verifies its correctness and stability.Interface testing is equally applicable in a upper-level system Service layer interface, more toward upper layer, the difficulty of test is bigger.
Currently, its data input mode of the interface of different agreement is essentially identical when carrying out interface testing, but in interface Its interface protocol is inconsistent when operation, and certain platform tools allow user in order to guarantee that the interface of different agreement is accurately sent When typing by the way of being suitble to this agreement, such as Jmeter testing tool.
But in conventional testing techniques, when carrying out multi-protocols test, same interface is unable to satisfy variety classes agreement Demand causes data to need to repeat typing, reduces testing efficiency.
Summary of the invention
In view of this, it is necessary to for the problem that various protocols are when being written interface, cannot effectively be adapted to, a kind of association is provided Discuss interface test method, device, computer equipment and storage medium.
A kind of protocol interface test method, includes the following steps:
Message request information is obtained, the signature identification of agreement is extracted from the message request information, according to the spy Feedback result after sign mark input interface obtains responding response message;
It extracts agreement described in the response response message to enter to join information and go out ginseng information, obtains the ID mark of the agreement Know, the protocol classification that calling classification file is classified to obtain the agreement to the ID mark of the agreement identifies, according to described Corresponding interface is written in the agreement by protocol classification mark, and the sort file is pre-stored in the server;
The corresponding inverse protocol classification mark of the interface is obtained, the inverse protocol classification is assembled and identifies to obtain protocol groups, read It takes the protocol groups to obtain inverse sort file corresponding to the protocol groups, obtains the agreement from the inverse sort file It extrapolates message, sends the extrapolation message of the agreement to testing terminal.
The acquisition message request information in one of the embodiments, extracts association from the message request information The signature identification of view obtains responding response message according to the feedback result after the signature identification input interface, comprising:
Message request information is obtained, the signature identification of agreement is extracted from the message request information;
The corresponding regular expression rule of the message request information is obtained, is extracted from the regular expression rule described Origin identification and message source address field in the signature identification of agreement, according to the origin identification and the message source address word Duan Shengcheng matching rule list, the regular expression rule storage is in the database;
According to the matching rule list and the mapping relations responded between response message, positions and obtain described With the corresponding response response message of list of rules;
It detects included in Upstream Interface information included in the response response message and the message request information Downstream mapping node information whether match, if matching if receive the response response message, otherwise reacquire respond response Message.
Agreement described in the extraction response response message enters to join information and goes out ginseng letter in one of the embodiments, Breath, obtains the ID mark of the agreement, and calling classification file is classified to obtain the agreement to the ID mark of the agreement According to protocol classification mark corresponding interface is written in the agreement by protocol classification mark, and the sort file is pre-stored In the server, comprising:
That extracts agreement described in the response response message enters to join information and out ginseng information, enters to join information and institute to described State out ginseng information and carry out characteristic parameter extraction, and the characteristic parameter is marked, according to the characteristic parameter enter ginseng and Variation when joining out determines the ID mark of the agreement;
The encryption rule for obtaining the sort file encrypts the sort file, obtains encryption class sort file And key identification;
According to the key identifier in the key identification, the ID mark of the agreement is classified to obtain the agreement Class indication;
It obtains the corresponding table that interface ID mark is identified with the protocol classification and the agreement is established according to the corresponding table Protocol classification identify the mapping relations between interface ID corresponding with the agreement, according to the mapping relations by the agreement Corresponding interface is written, wherein the interface ID mark stores in the database with the corresponding table that the protocol classification identifies.
It is described in one of the embodiments, to obtain the corresponding inverse protocol classification mark of the interface, assemble the inverse association View class indication obtains protocol groups, reads the protocol groups and obtains inverse sort file corresponding to the protocol groups, from described inverse The extrapolation message that the agreement is obtained in sort file, extrapolation message to the test terminal for sending the agreement include:
Establish the interface and the protocol classification mark mapping table, by the element in the mapping table into Row matrix indicates to obtain interface protocol matrix, obtains interface protocol inverse matrix to the interface protocol matrix inversion, will be described Element in interface protocol inverse matrix is normalized, in the interface protocol inverse matrix after obtaining normalized Each element, then the value of each element is the corresponding inverse protocol classification mark of the interface;
The inverse protocol classification mark is assembled to carry out obtaining the protocol groups;
The protocol groups are entered into ginseng into new example function, inverse classification text corresponding to the protocol groups is obtained after joining out Part;
Start node and terminal node that data in the inverse sort file generate are obtained, from the start node to described Terminal node successively sends the protocol information in the inverse sort file to testing terminal.
The acquisition message request information in one of the embodiments, extracts association from the message request information The signature identification of view, comprising:
The preset time interval for extracting message request information is obtained, message information is obtained according to the time interval;
Whether the detected message information is complete, reacquires the message if the message information is imperfect Information;
The message information is compared with last round of time response response message, obtains the discrepancy of the two, according to Position in protocol characteristic mapping table corresponding to the discrepancy obtains the signature identification, wherein the protocol characteristic reflects Firing table is stored in data.
It is described in one of the embodiments, to extract entering to join information and going out to join for agreement described in the response response message Information enters to join information and the information of the ginseng out progress characteristic parameter extraction, and the characteristic parameter is marked, root to described Entering ginseng according to the characteristic parameter and going out the ID mark of the determining agreement of variation when joining, comprising:
Enter to join information according to entering to join time sequencing and be ranked up to generate a line and enter to join matrix by described, will it is described go out ginseng information Also generation one is ranked up according to ginseng time sequencing out list ginseng matrix;
By it is described enter join matrix and it is described go out ginseng matrix carry out matrix product obtain into ginseng-go out join matrix;
From it is described enter ginseng-go out in ginseng matrix to extract data on leading diagonal, as primitive character parameter;
By it is described enter ginseng-go out ginseng matrix do normalized obtain it is normalized enter ginseng-go out ginseng matrix;
Extract it is described it is normalized enter ginseng-go out data in ginseng matrix on counter-diagonal as characteristic parameter weight;
The characteristic parameter weight and the primitive character parameter are subjected to the ID mark that the agreement is calculated in pairing.
The assembling inverse protocol classification mark carries out obtaining the protocol groups in one of the embodiments, comprising:
According to the interface source that the protocol classification identifies, the inverse protocol classification mark is subjected to layering and is packed into number A protocol layer;
Protocol data between the protocol layer is identified, data correlation degree index between protocal layers, institute are obtained Data correlation degree index is stated for indicating the quantity of the data from same interface between two protocol layers;
It carries out maximum two protocol layers of the data correlation degree to be assembled into a protocol groups.
A kind of protocol interface test device, including following module:
Request module is set as obtaining message request information, extracts agreement from the message request information Signature identification obtains responding response message according to the feedback result after the signature identification input interface;
Classify writing module, be set as extracting agreement described in the responses response message and enter to join information and go out to join information, The ID mark of the agreement is obtained, calling classification file is classified to obtain the agreement of the agreement to the ID mark of the agreement According to protocol classification mark corresponding interface is written in the agreement by class indication, and the sort file is pre-stored in clothes It is engaged in device;
Extrapolation message module is set as obtaining the corresponding inverse protocol classification mark of the interface, assembles the inverse agreement point Class identifies to obtain protocol groups, reads the protocol groups and obtains inverse sort file corresponding to the protocol groups, from the inverse classification The extrapolation message that the agreement is obtained in file sends the extrapolation message of the agreement to testing terminal.
A kind of computer equipment, including memory and processor are stored with computer-readable instruction in the memory, institute When stating computer-readable instruction and being executed by the processor, so that the processor executes the step of above-mentioned protocol interface test method Suddenly.
A kind of storage medium being stored with computer-readable instruction, the computer-readable instruction are handled by one or more When device executes, so that the step of one or more processors execute above-mentioned protocol interface test method.
Above-mentioned protocol interface test method, device, computer equipment and storage medium, including message request information is obtained, The signature identification that agreement is extracted from the message request information, according to the feedback result after the signature identification input interface It obtains responding response message;It extracts agreement described in the response response message to enter to join information and go out ginseng information, obtains the association The ID of view is identified, and the protocol classification that calling classification file is classified to obtain the agreement to the ID mark of the agreement identifies, Corresponding interface is written into the agreement according to protocol classification mark, the sort file is pre-stored in the server;It obtains The corresponding inverse protocol classification mark of the interface is taken, the inverse protocol classification is assembled and identifies to obtain protocol groups, read the agreement Group obtains inverse sort file corresponding to the protocol groups, and the extrapolation message of the agreement is obtained from the inverse sort file, The extrapolation message of the agreement is sent to testing terminal.The technical program is directed to various protocols when interface is written, cannot be effective The problem of adaptation, can be effectively adapted to by effectively being classified to message information according to classification results.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the application Limitation.
Fig. 1 is a kind of overall flow figure of the protocol interface test method of the application in one embodiment;
Fig. 2 is the request process schematic in a kind of protocol interface test of the application in one embodiment;
Fig. 3 is the classification writing process signal in a kind of protocol interface test method of the application in one embodiment Figure;
Fig. 4 is a kind of structure chart of the protocol interface test device of the application in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, and It is not used in restriction the application.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singular " one " used herein, " one It is a ", " described " and "the" may also comprise plural form.It is to be further understood that being arranged used in the description of the present application Diction " comprising " refer to that there are the feature, integer, step, operation, element and/or component, but it is not excluded that in the presence of or addition Other one or more features, integer, step, operation, element, component and/or their group.
Fig. 1 is the overall flow figure of protocol interface test method in the application one embodiment, as shown in Figure 1, a kind of association Discuss interface test method, comprising the following steps:
S1 obtains message request information, the signature identification of agreement is extracted from the message request information, according to described Feedback result after signature identification input interface obtains responding response message;
Specifically, receiving protocol interface detection initiator sends message request information, extracts and use from message request information In the feature tag of mark multi-protocols attribute, such as the class type-word of operation and maintenance management OAM message in multiprotocol label switching MPLS Section;Then it is returned what is obtained after the type field input interface of operation and maintenance management OAM message in multiprotocol label switching MPLS Answer response message.
S2 extracts agreement described in the response response message and enters to join information and go out ginseng information, obtains the ID of the agreement Mark, the protocol classification that calling classification file is classified to obtain the agreement to the ID mark of the agreement identifies, according to institute It states protocol classification mark and corresponding interface is written into the agreement, the sort file is pre-stored in the server;
Specifically, obtaining all functions used on interface, agreement is entered to ginseng respectively and is calculated into these functions, is obtained It is identified to ginseng is gone out as a result, will go out and join the result that frequency of occurrence is most in result as the ID of agreement;Protocol classification mainly divides For transmission control protocol TCP, User Datagram Protocol UDP and hypertext transfer protocol HTTP etc..
S3 obtains the corresponding inverse protocol classification mark of the interface, assembles the inverse protocol classification and identify to obtain protocol groups, It reads the protocol groups and obtains inverse sort file corresponding to the protocol groups, obtain the agreement from the inverse sort file Extrapolation message, send the extrapolation message of the agreement to testing terminal.
Specifically, the corresponding inverse protocol-identifier of so-called interface is obtained by carrying out conversed analysis to agreement, assembling It can be assembled, same inverse class indication can also be assembled into according to the genesis sequence of inverse protocol-identifier when inverse protocol-identifier One protocol groups.
The present embodiment can be such that agreement is adapted to interface by the way that agreement is effectively parsed and classified.
Fig. 2 is the request process schematic in a kind of protocol interface test of the application, as shown, the acquisition is reported Literary solicited message extracts the signature identification of agreement from the message request information, according to the signature identification input interface Feedback result afterwards obtains responding response message, comprising:
S101, message request information is obtained, the signature identification of agreement is extracted from the message request information;
Specifically, one message request information of setting sends task, after the message request information, which sends task, to be triggered, Detection terminal sends message request information and server, the signature identification of so-called agreement refer to the dummy suffix notation etc. of agreement.
S102, the corresponding regular expression rule of the message request information is obtained, is extracted from the regular expression rule Origin identification and message source address field in the signature identification of the agreement out, according to the origin identification and the message source Address field generates matching rule list, and the regular expression rule storage is in the database;
Wherein, regular expression rule mainly carries out regularization processing, regular expressions to character string using regular expression Formula is a kind of logical formula to string operation, is exactly with predefined some specific characters and these specific characters Combination, form one " regular character string ", this " regular character string " is used to express a kind of filter logic to character string.Just Then expression formula is a kind of Text Mode, and matched one or more character strings are wanted in mode description when searching for text.
S103, according to the matching rule list and it is described respond response message between mapping relations, position and obtain The corresponding response response message of the matching rule list;
Specifically, application structure query SQL language etc. carries out key content in message content to matching rule list Retrieval determines the position for responding response message in matching rule list according to search result.
Institute in Upstream Interface information included in S104, the detection response response message and the message request information Whether the downstream mapping node information for including matches, and receives the response response message if matching, otherwise reacquires and responds Response message.
The present embodiment can effectively guarantee to respond response report by verifying response response message receive process The integrality of text.
Fig. 3 is the classification writing process schematic diagram in a kind of protocol interface test method of the application, as shown, described mention It takes agreement described in the response response message to enter to join information and goes out ginseng information, obtain the ID mark of the agreement, calling classification The protocol classification that file is classified to obtain the agreement to the ID mark of the agreement identifies, and is identified according to the protocol classification Corresponding interface is written into the agreement, the sort file is pre-stored in the server, comprising:
Agreement described in S201, the extraction response response message enters to join information and out ginseng information, enters to join letter to described Breath and the information of ginseng out carry out characteristic parameter extraction, and the characteristic parameter is marked, and are existed according to the characteristic parameter Enter ginseng and goes out the ID mark that variation when joining determines the agreement;
Specifically, the characteristic parameter responded in response message refers mainly to the information such as interface method name, version number and group, If the corresponding ginseng result generation version that goes out changes than after joining out, then identified using version number as agreement ID.
S202, the encryption rule for obtaining the sort file, encrypt the sort file, obtain encryption class classification File and key identification;
Wherein, encryption rule can be added using Base64 cipher mode, md5 encryption and key chain cipher mode etc. It is close.
S203, according to the key identifier in the key identification, the ID mark of the agreement is classified to obtain institute State protocol classification mark;
Wherein, key identifier refers to the initial character in key identification, if the initial character and key identification of agreement ID mark Symbol is consistent, then the agreement is classified according to the classification in the corresponding sort file of key identifier.
S204, it obtains interface ID and identifies the corresponding table that identifies with the protocol classification, according to the corresponding table, described in foundation The protocol classification of agreement identifies the mapping relations between interface ID corresponding with the agreement, will be described according to the mapping relations Corresponding interface is written in agreement, wherein the corresponding table that the interface ID mark is identified with the protocol classification is stored in database In.
The present embodiment makes interface and agreement by the corresponding relationship established between interface ID mark and protocol classification mark Match.
In one embodiment, described to obtain the corresponding inverse protocol classification mark of the interface, assemble the inverse agreement point Class identifies to obtain protocol groups, reads the protocol groups and obtains inverse sort file corresponding to the protocol groups, from the inverse classification The extrapolation message that the agreement is obtained in file sends the extrapolation message of the agreement to testing terminal, comprising:
Establish the interface and the protocol classification mark mapping table, by the element in the mapping table into Row matrix indicates to obtain interface protocol matrix, obtains interface protocol inverse matrix to the interface protocol matrix inversion, will be described Element in interface protocol inverse matrix is normalized, in the interface protocol inverse matrix after obtaining normalized Each element, then the value of each element is the corresponding inverse protocol classification mark of the interface;
Specifically, extracting record when the element in mapping table extracts position of the element in record sheet, by institute's rheme Corresponding ranks number is set, as the numerical value of element in agreement matrix, for example, position of a certain element in mapping table For the 3rd row, the 4th column, then its numerical value in agreement matrix is 34,;According to the sequence of element extraction, successively these numerical value are write Enter into interface protocol matrix.
The inverse protocol classification mark is assembled to carry out obtaining the protocol groups;
Specifically, can just there is face tangent plane programming AOP to be assembled when assembling these class indications.
The protocol groups are entered into ginseng into new example function, inverse classification text corresponding to the protocol groups is obtained after joining out Part;
Specifically, new example function when using AOP, is carried out into ginseng using newInstance () function or goes out ginseng fortune It calculates.
Start node and terminal node that data in the inverse sort file generate are obtained, from the start node to described Terminal node successively sends the protocol information in the inverse sort file to testing terminal.
The present embodiment can promote the accurate of extrapolation message transmission by carrying out matrixing processing to protocol classification element Property.
In one embodiment, the acquisition message request information, extracts agreement from the message request information Signature identification, comprising:
The preset time interval for extracting message request information is obtained, message information is obtained according to the time interval;
Specifically, time interval is obtained according to historical data, when carrying out historical data statistics, difference can be assigned Historical data with different weights, the weight of the historical data closer apart from present moment is bigger, otherwise smaller.
Whether the detected message information is complete, reacquires the message if the message information is imperfect Information;
Specifically, in detection messages information integrity, it can be according to preset message rule to the bebinning character of message It is detected with final character, if the bebinning character or final character of the message information are not inconsistent with preset message rule, Message is imperfect.
The message information is compared with last round of time response response message, obtains the discrepancy of the two, according to Position in protocol characteristic mapping table corresponding to the discrepancy obtains the signature identification, wherein the protocol characteristic reflects Firing table is stored in data.
Specifically, carry out respond response message compare when, can by respond response message be segmented, be divided into several Then message subsegment carries out discrepancy comparison to each subsegment.
In the present embodiment, carries out completing the detection of whole and otherness by responding response message, can preferably promote agreement With the accuracy of Interface Matching.
In one embodiment, described to extract entering to join information and going out to join letter for agreement described in the response response message Breath enters to join information and the information of the ginseng out progress characteristic parameter extraction, and the characteristic parameter is marked to described, according to The characteristic parameter is entering ginseng and is going out the ID mark of the determining agreement of variation when joining, comprising:
Enter to join information according to entering to join time sequencing and be ranked up to generate a line and enter to join matrix by described, will it is described go out ginseng information Also generation one is ranked up according to ginseng time sequencing out list ginseng matrix;
By it is described enter join matrix and it is described go out ginseng matrix carry out matrix product obtain into ginseng-go out join matrix;
It establishes specifically, such as will enter to join after information carries out numerical value conversion into ginseng matrix A, ginseng information will be gone out and carry out numerical value conversion After establish out and join matrix B.Such as matrixMatrix A and matrix B are done product to obtain going out to join into ginseng- Matrix
From it is described enter ginseng-go out in ginseng matrix to extract data on leading diagonal, as primitive character parameter;
Specifically, as above original characteristic parameter is 8+10=18 in example.
By it is described enter ginseng-go out ginseng matrix do normalized obtain it is normalized enter ginseng-go out ginseng matrix;
Extract it is described it is normalized enter ginseng-go out data in ginseng matrix on counter-diagonal as characteristic parameter weight;
Specifically, then the element on counter-diagonal is summed divided by 2, obtained power after doing normalized for Matrix C Weight is 0.5.
The characteristic parameter weight and the primitive character parameter are subjected to the ID mark that the agreement is calculated in pairing.
The present embodiment carries out matrixing processing by entering ginseng and going out ginseng information, improves the accurate of determining agreement ID mark Property.
In one embodiment, the assembling inverse protocol classification mark carries out obtaining the protocol groups, comprising:
According to the interface source that the protocol classification identifies, the inverse protocol classification mark is subjected to layering and is packed into number A protocol layer;
Specifically, the inverse protocol classification in same interface source can be identified to one association of write-in when carrying out layering packing Layer is discussed, a protocol layer can also be written into the inverse agreement in several same category of interface sources.
Protocol data between the protocol layer is identified, data correlation degree index between protocal layers, institute are obtained Data correlation degree index is stated for indicating the quantity of the data from same interface between two protocol layers;
It carries out maximum two protocol layers of the data correlation degree to be assembled into a protocol groups.
Specifically, it is there are three if or consistent with the degree of association between upper protocol layer, randomly select out two protocol layers It carries out assembling and forms a protocol groups, remaining protocol layer recalculates the degree of association with other protocol layers again.
The present embodiment forms protocol groups by calculating correlation, improves the speed of protocol interface test.
In one embodiment it is proposed that protocol interface test device, as shown in figure 4, including following module:
Request module is set as obtaining message request information, extracts agreement from the message request information Signature identification obtains responding response message according to the feedback result after the signature identification input interface;
Classify writing module, be set as extracting agreement described in the responses response message and enter to join information and go out to join information, The ID mark of the agreement is obtained, calling classification file is classified to obtain the agreement of the agreement to the ID mark of the agreement According to protocol classification mark corresponding interface is written in the agreement by class indication, and the sort file is pre-stored in clothes It is engaged in device;
Extrapolation message module is set as obtaining the corresponding inverse protocol classification mark of the interface, assembles the inverse agreement point Class identifies to obtain protocol groups, reads the protocol groups and obtains inverse sort file corresponding to the protocol groups, from the inverse classification The extrapolation message that the agreement is obtained in file sends the extrapolation message of the agreement to testing terminal.
A kind of computer equipment, including memory and processor are stored with computer-readable instruction in the memory, institute When stating computer-readable instruction and being executed by the processor, so that the processor executes agreement described in the various embodiments described above and connects The step of mouth test method.
A kind of storage medium being stored with computer-readable instruction, the computer-readable instruction are handled by one or more When device executes, so that the step of one or more processors execute protocol interface test method described in the various embodiments described above.Institute Stating storage medium can be non-volatile memory medium.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can It is completed with instructing relevant hardware by program, which can be stored in a computer readable storage medium, storage Medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD etc..
Each technical characteristic of embodiment described above can be combined arbitrarily, for simplicity of description, not to above-mentioned reality It applies all possible combination of the technical characteristic in example to be all described, as long as however, lance is not present in the combination of these technical characteristics Shield all should be considered as described in this specification.
The some exemplary embodiments of the application above described embodiment only expresses, wherein describe it is more specific and detailed, But it cannot be understood as the limitations to the application the scope of the patents.It should be pointed out that for the ordinary skill of this field For personnel, without departing from the concept of this application, various modifications and improvements can be made, these belong to the application Protection scope.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of protocol interface test method characterized by comprising
Message request information is obtained, the signature identification of agreement is extracted from the message request information, according to the feature mark Feedback result after knowing input interface obtains responding response message;
It extracts agreement described in the response response message to enter to join information and go out ginseng information, obtains the ID mark of the agreement, adjust It is identified with the protocol classification that ID mark of the sort file to the agreement is classified to obtain the agreement, according to the agreement point Corresponding interface is written in the agreement by class mark, and the sort file is pre-stored in the server;
The corresponding inverse protocol classification mark of the interface is obtained, the inverse protocol classification is assembled and identifies to obtain protocol groups, read institute It states protocol groups and obtains inverse sort file corresponding to the protocol groups, the extrapolation of the agreement is obtained from the inverse sort file Message sends the extrapolation message of the agreement to testing terminal.
2. protocol interface test method according to claim 1, which is characterized in that the acquisition message request information, from The signature identification that agreement is extracted in the message request information is obtained according to the feedback result after the signature identification input interface To response response message, comprising:
Message request information is obtained, the signature identification of agreement is extracted from the message request information;
The corresponding regular expression rule of the message request information is obtained, the agreement is extracted from the regular expression rule Signature identification in origin identification and message source address field, it is raw according to the origin identification and the message source address field At matching rule list, the regular expression rule storage is in the database;
According to the matching rule list and the mapping relations responded between response message, positions and obtain the matching rule The then corresponding response response message of list;
Under detecting included in Upstream Interface information included in the response response message and the message request information Whether trip mapping node information matches, and receives the response response message if matching, otherwise reacquires and responds response message.
3. protocol interface test method according to claim 1, which is characterized in that described to extract the response response message Described in agreement enter to join information and go out ginseng information, obtain the agreement ID mark, ID of the calling classification file to the agreement Mark is classified the protocol classification mark for obtaining the agreement, and the agreement is written accordingly according to protocol classification mark Interface, the sort file is pre-stored in the server, comprising:
Extract it is described response response message described in agreement enter to join information and go out ginseng information, to it is described enter join information and it is described go out Join information and carry out characteristic parameter extraction, and the characteristic parameter is marked, is entering ginseng according to the characteristic parameter and going out to join When variation determine the ID mark of the agreement;
The encryption rule for obtaining the sort file encrypts the sort file, obtains encryption class sort file and close Key mark;
According to the key identifier in the key identification, the ID mark of the agreement is classified to obtain the protocol classification Mark;
It obtains the corresponding table that interface ID mark is identified with the protocol classification and the association of the agreement is established according to the corresponding table The mapping relations between class indication interface ID corresponding with the agreement are discussed, the agreement is written according to the mapping relations Corresponding interface, wherein the interface ID mark stores in the database with the corresponding table that the protocol classification identifies.
4. protocol interface test method according to claim 1, which is characterized in that obtain the corresponding inverse agreement of the interface Class indication assembles the inverse protocol classification and identifies to obtain protocol groups, reads the protocol groups and obtain corresponding to the protocol groups Inverse sort file, the extrapolation message of the agreement is obtained from the inverse sort file, sends the extrapolation message of the agreement To test terminal, comprising:
Element in the mapping table is carried out square by the mapping table for establishing the interface and protocol classification mark Array indicates to obtain interface protocol matrix, interface protocol inverse matrix is obtained to the interface protocol matrix inversion, by the interface Element in agreement inverse matrix is normalized, each in the interface protocol inverse matrix after obtaining normalized A element, then the value of each element is the corresponding inverse protocol classification mark of the interface;
The inverse protocol classification mark is assembled to carry out obtaining the protocol groups;
The protocol groups are entered into ginseng into new example function, obtain inverse sort file corresponding to the protocol groups after joining out;
The start node and terminal node that data generate in the inverse sort file are obtained, from the start node to the termination Node successively sends the protocol information in the inverse sort file to testing terminal.
5. protocol interface test method according to claim 2, which is characterized in that the acquisition message request information, from The signature identification of agreement is extracted in the message request information, comprising:
The preset time interval for extracting message request information is obtained, message information is obtained according to the time interval;
Whether the detected message information is complete, and the message letter is reacquired if the message information is imperfect Breath;
The message information is compared with last round of time response response message, the discrepancy of the two is obtained, according to described Position in protocol characteristic mapping table corresponding to discrepancy obtains the signature identification, wherein the protocol characteristic mapping table It is stored in data.
6. protocol interface test method according to claim 3, which is characterized in that described to extract the response response message Described in agreement enter to join information and go out ginseng information, to it is described enter join information and it is described go out ginseng information carry out characteristic parameter extraction, And the characteristic parameter is marked, entering ginseng according to the characteristic parameter and going out the ID of the determining agreement of variation when joining Mark, comprising:
By it is described enter join information according to enter to join time sequencing be ranked up generate a line enter to join matrix, by it is described go out ginseng information also press It breaks forth to join time sequencing and be ranked up generation and one lists ginseng matrix;
By it is described enter join matrix and it is described go out ginseng matrix carry out matrix product obtain into ginseng-go out join matrix;
From it is described enter ginseng-go out in ginseng matrix to extract data on leading diagonal, as primitive character parameter;
By it is described enter ginseng-go out ginseng matrix do normalized obtain it is normalized enter ginseng-go out ginseng matrix;
Extract it is described it is normalized enter ginseng-go out data in ginseng matrix on counter-diagonal as characteristic parameter weight;
The characteristic parameter weight and the primitive character parameter are subjected to the ID mark that the agreement is calculated in pairing.
7. protocol interface test method according to claim 4, which is characterized in that the assembling inverse protocol classification mark Knowledge carries out obtaining the protocol groups, comprising:
According to the interface source that the protocol classification identifies, the inverse protocol classification mark is subjected to layering and is packed into several associations Discuss layer;
Protocol data between the protocol layer is identified, data correlation degree index between protocal layers, the number are obtained It is used to indicate the quantity of the data from same interface between two protocol layers according to degree of association index;
It carries out maximum two protocol layers of the data correlation degree to be assembled into a protocol groups.
8. a kind of protocol interface test device characterized by comprising
Request module is set as obtaining message request information, the feature of agreement is extracted from the message request information Mark obtains responding response message according to the feedback result after the signature identification input interface;
Classify writing module, is set as extracting agreement described in the responses response message and enters to join information and go out to join information, obtain The ID of the agreement is identified, and calling classification file is classified to obtain the protocol classification of the agreement to the ID mark of the agreement According to protocol classification mark corresponding interface is written in the agreement by mark, and the sort file is pre-stored in server In;
Extrapolation message module is set as obtaining the corresponding inverse protocol classification mark of the interface, assembles the inverse protocol classification mark Knowledge obtains protocol groups, reads the protocol groups and obtains inverse sort file corresponding to the protocol groups, from the inverse sort file The middle extrapolation message for obtaining the agreement sends the extrapolation message of the agreement to testing terminal.
9. a kind of computer equipment, including memory and processor, it is stored with computer-readable instruction in the memory, it is described When computer-readable instruction is executed by the processor, so that the processor executes such as any one of claims 1 to 7 right It is required that the step of protocol interface test method.
10. a kind of storage medium for being stored with computer-readable instruction, the computer-readable instruction is handled by one or more When device executes, so that one or more processors execute the protocol interface as described in any one of claims 1 to 7 claim and survey The step of method for testing.
CN201811530304.3A 2018-12-14 2018-12-14 Protocol interface testing method and device, computer equipment and storage medium Active CN109510737B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201811530304.3A CN109510737B (en) 2018-12-14 2018-12-14 Protocol interface testing method and device, computer equipment and storage medium
PCT/CN2019/120517 WO2020119430A1 (en) 2018-12-14 2019-11-25 Protocol interface test method, device, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811530304.3A CN109510737B (en) 2018-12-14 2018-12-14 Protocol interface testing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109510737A true CN109510737A (en) 2019-03-22
CN109510737B CN109510737B (en) 2022-04-26

Family

ID=65753371

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811530304.3A Active CN109510737B (en) 2018-12-14 2018-12-14 Protocol interface testing method and device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN109510737B (en)
WO (1) WO2020119430A1 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110287070A (en) * 2019-05-21 2019-09-27 平安银行股份有限公司 ESB specialized protocol interface test method, server and computer readable storage medium
CN110309058A (en) * 2019-05-24 2019-10-08 平安银行股份有限公司 Business end test method, device, computer installation and computer storage medium
CN110727475A (en) * 2019-10-12 2020-01-24 四川新网银行股份有限公司 Intelligent service calling method based on configuration
WO2020119430A1 (en) * 2018-12-14 2020-06-18 深圳壹账通智能科技有限公司 Protocol interface test method, device, computer device and storage medium
CN111611147A (en) * 2020-06-28 2020-09-01 中国人民解放军国防科技大学 Method, system and medium for detecting and analyzing performance of universal interface in processor
CN111884776A (en) * 2020-07-02 2020-11-03 深圳市赛特新能科技有限公司 Charging pile protocol consistency testing method
CN114095588A (en) * 2020-08-03 2022-02-25 网宿科技股份有限公司 Sharing method, system and server of multi-protocol port
CN115242691A (en) * 2022-07-04 2022-10-25 中国电子科技集团公司第三十研究所 Protocol identification method based on protocol feature library
US11770460B2 (en) 2020-08-03 2023-09-26 Wangsu Science and Technology Co., Ltd. Method and system for sharing multi-protocol port, and server
CN117672342A (en) * 2024-01-29 2024-03-08 合肥康芯威存储技术有限公司 Protocol monitoring system and method for memory chip

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113992549B (en) * 2020-07-08 2023-06-13 大唐移动通信设备有限公司 Test method, test device, electronic equipment and storage medium
CN113779128B (en) * 2021-09-09 2024-04-05 平安科技(深圳)有限公司 Medical data system docking method, device, equipment and storage medium
CN113709182B (en) * 2021-09-13 2023-03-10 支付宝(杭州)信息技术有限公司 Interface identification method, device and equipment
CN114070761B (en) * 2021-11-11 2023-09-26 北京轨道交通路网管理有限公司 Protocol message detection method and device and electronic equipment
CN114338448B (en) * 2021-12-29 2024-02-20 北京天融信网络安全技术有限公司 Performance test method and device, electronic equipment and storage medium
CN115633098B (en) * 2022-12-02 2023-03-31 北京红山微电子技术有限公司 Storage management method and device of many-core system and integrated circuit
CN116781790B (en) * 2023-08-25 2023-12-05 国网江西省电力有限公司电力科学研究院 Instrument specification intelligent conversion system, method, readable medium and electronic device
CN117254886B (en) * 2023-11-17 2024-01-23 广州市森锐科技股份有限公司 Cloud desktop data interaction method and device, computer equipment and storage medium
CN117576545B (en) * 2024-01-16 2024-04-05 成都同步新创科技股份有限公司 Multi-algorithm full-matching access adapter access method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080313344A1 (en) * 2007-06-05 2008-12-18 Innowireless Co., Ltd. Dual processing system capable of ensuring real-time processing in protocol conformance test
CN104601403A (en) * 2015-01-07 2015-05-06 上海瀚之友信息技术服务有限公司 Automatic test system
CN205176829U (en) * 2013-07-25 2016-04-20 中国航天科工集团第三研究院第八三五七研究所 Multiple communications protocol's of test configuration system on a chip's test system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7099438B2 (en) * 2002-06-14 2006-08-29 Ixia Multi-protocol, multi-interface communications device testing system
CN100459530C (en) * 2005-10-13 2009-02-04 华为技术有限公司 Testing adopter and testing tool system and detecting method
KR101060181B1 (en) * 2009-08-03 2011-08-29 강원대학교산학협력단 Web-based software debugging device and its method for remote debugging
CN102694701B (en) * 2012-06-13 2015-12-02 青岛海信传媒网络技术有限公司 Message based method of testing and system
CN109510737B (en) * 2018-12-14 2022-04-26 深圳壹账通智能科技有限公司 Protocol interface testing method and device, computer equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080313344A1 (en) * 2007-06-05 2008-12-18 Innowireless Co., Ltd. Dual processing system capable of ensuring real-time processing in protocol conformance test
CN205176829U (en) * 2013-07-25 2016-04-20 中国航天科工集团第三研究院第八三五七研究所 Multiple communications protocol's of test configuration system on a chip's test system
CN104601403A (en) * 2015-01-07 2015-05-06 上海瀚之友信息技术服务有限公司 Automatic test system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张国伟: "基于compactPcl总线的多功能串行通信接口设计", 《中国优秀硕士学位论文全文数据库》 *

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020119430A1 (en) * 2018-12-14 2020-06-18 深圳壹账通智能科技有限公司 Protocol interface test method, device, computer device and storage medium
CN110287070B (en) * 2019-05-21 2024-03-19 平安银行股份有限公司 ESB special protocol interface test method, server and computer readable storage medium
CN110287070A (en) * 2019-05-21 2019-09-27 平安银行股份有限公司 ESB specialized protocol interface test method, server and computer readable storage medium
CN110309058A (en) * 2019-05-24 2019-10-08 平安银行股份有限公司 Business end test method, device, computer installation and computer storage medium
CN110727475A (en) * 2019-10-12 2020-01-24 四川新网银行股份有限公司 Intelligent service calling method based on configuration
CN110727475B (en) * 2019-10-12 2023-07-21 四川新网银行股份有限公司 Intelligent service calling method based on configuration
CN111611147B (en) * 2020-06-28 2023-05-30 中国人民解放军国防科技大学 Method, system and medium for detecting and analyzing performance of internal universal interface of processor
CN111611147A (en) * 2020-06-28 2020-09-01 中国人民解放军国防科技大学 Method, system and medium for detecting and analyzing performance of universal interface in processor
CN111884776A (en) * 2020-07-02 2020-11-03 深圳市赛特新能科技有限公司 Charging pile protocol consistency testing method
US11770460B2 (en) 2020-08-03 2023-09-26 Wangsu Science and Technology Co., Ltd. Method and system for sharing multi-protocol port, and server
CN114095588B (en) * 2020-08-03 2023-08-18 网宿科技股份有限公司 Sharing method, system and server of multi-protocol ports
CN114095588A (en) * 2020-08-03 2022-02-25 网宿科技股份有限公司 Sharing method, system and server of multi-protocol port
CN115242691B (en) * 2022-07-04 2023-05-19 中国电子科技集团公司第三十研究所 Protocol identification method based on protocol feature library
CN115242691A (en) * 2022-07-04 2022-10-25 中国电子科技集团公司第三十研究所 Protocol identification method based on protocol feature library
CN117672342A (en) * 2024-01-29 2024-03-08 合肥康芯威存储技术有限公司 Protocol monitoring system and method for memory chip
CN117672342B (en) * 2024-01-29 2024-04-05 合肥康芯威存储技术有限公司 Protocol monitoring system and method for memory chip

Also Published As

Publication number Publication date
WO2020119430A1 (en) 2020-06-18
CN109510737B (en) 2022-04-26

Similar Documents

Publication Publication Date Title
CN109510737A (en) Protocol interface test method, device, computer equipment and storage medium
US11513869B2 (en) Systems and methods for synthetic database query generation
Boididou et al. Detection and visualization of misleading content on Twitter
Tsukerman Machine Learning for Cybersecurity Cookbook: Over 80 recipes on how to implement machine learning algorithms for building security systems using Python
JP6850806B2 (en) Annotation system for extracting attributes from electronic data structures
CN110336838B (en) Account abnormity detection method, device, terminal and storage medium
CN110222513B (en) Abnormality monitoring method and device for online activities and storage medium
CN103164698A (en) Method and device of generating fingerprint database and method and device of fingerprint matching of text to be tested
CN107392022A (en) Reptile identification, processing method and relevant apparatus
CN106485261A (en) A kind of method and apparatus of image recognition
CN114840286B (en) Service processing method and server based on big data
CN106294406A (en) A kind of method and apparatus accessing data for processing application
US10719482B2 (en) Data comparison
US20230281306A1 (en) System and method for detecting leaked documents on a computer network
WO2019077656A1 (en) Production facility monitoring device, production facility monitoring method, and production facility monitoring program
KR20230073056A (en) Malicious event log automatic analysis device and method
CN111488269B (en) Index detection method, device and system for data warehouse
Naukudkar et al. Enhancing performance of security log analysis using correlation-prediction technique
Team Nimble Challenge 2017 Evaluation Plan
Landauer et al. Visualizing Syscalls using Self-organizing Maps for System Intrusion Detection.
EP4254237A1 (en) Security data processing device, security data processing method, and computer-readable storage medium for storing program for processing security data
CN113239353B (en) Content difference-based container software security detection system and method
CN114219427B (en) Information security processing method and storage medium for handling big data office work
CN117540368A (en) Data leakage detection method, device, equipment and storage medium
CN117040879A (en) Threat traceability analysis method, traceability analysis model building method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant