Protocol conformance test method and device, medium, product and equipment
By introducing the test system of proxy module, filter module and adapter module into the protocol consistency test, data security interaction and consistency testing in privacy computing and federated learning scenarios are realized, which solves the problem that existing technology cannot meet the requirements of data security and Privacy protection issues.
Patent Information
- Application Number
- CN202410304861.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-18
- Publication Date
- 2024-10-18
AI Technical Summary
Existing protocol consistency testing methods cannot achieve data security and privacy protection in private computing and federated learning scenarios. They require protocol interaction data to be open and transparent, and cannot meet the needs of data security and privacy protection.
A test system including a proxy module, a filter module and an adapter module is used. The proxy module receives test tasks and sends protocol data requirements to the protocol test object. The filter module is used for data encryption and the adapter module is decrypted to achieve safe data interaction. and consistency testing.
While meeting data security and privacy protection, protocol consistency testing is implemented to ensure the security and privacy of data in private computing and federated learning scenarios.
Smart Images

Figure CN118802676A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a protocol consistency testing method, device, computer-readable storage medium, computer program product and terminal equipment. Background Art
[0002] Communication protocols are general rules that should be followed when exchanging information between communication entities in Internet systems and distributed systems. The rapid development of Internet technology, computer technology and communication technology has led to the expansion of communication networks and the complexity of communication protocols. In order to ensure the correct implementation of communication protocols and to ensure stable and reliable communication between communication entities, it is necessary to use protocol testing technology to conduct systematic testing of communication protocols.
[0003] Protocol testing technology mainly includes conformance testing and interoperability testing. Conformance testing is mainly to determine whether the information received and sent by the implementation under test (IUT) in the network system is consistent with the standard. Usually, a set of test case sequences are used to perform black box testing on the implementation under test in a certain network environment. By comparing the actual output of the IUT with the expected output, it is determined whether the IUT is consistent with the protocol description.
[0004] The prominent problem with the existing conceptual model and testing methods of protocol consistency testing is that the format content of the protocol, the constructed protocol test data and the entire protocol testing process are all carried out in an open and transparent manner. This is not applicable to scenarios such as privacy computing and federated learning that focus on security and privacy protection. This is because the interactive protocols in privacy computing and federated learning carry the original data of each data owner or the intermediate process data of data processing. The existing testing methods require that these protocol interaction data be open and transparent, making protocol consistency testing in scenarios such as privacy computing and federated learning impossible to implement. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide a protocol consistency testing method, apparatus, computer-readable storage medium, computer program product and terminal device, which can implement consistency testing of interactive protocols while meeting data security and privacy protection in scenarios such as privacy computing and federated learning where data security and privacy need to be protected.
[0006] In order to achieve the above object, an embodiment of the present invention provides a protocol consistency testing method, which is applicable to a testing system including an agent module, a filter module and an adapter module, and the method includes:
[0007] The proxy module receives the test task and sends the protocol data requirements carried in the test task to the protocol test object; wherein the proxy module is used to interact with the protocol test object through the filter module and the adapter module;
[0008] The proxy module receives the protocol data returned by the protocol test object in response to the received protocol data requirement, and performs a protocol consistency test according to the received protocol data.
[0009] Further, receiving the test task through the proxy module and sending the protocol data requirement carried in the test task to the protocol test object specifically includes:
[0010] Receiving the test task through the proxy module, and parsing to obtain the protocol data requirements carried in the test task;
[0011] Sending the protocol data requirement to the filter module, and filtering the protocol data requirement through the filter module;
[0012] The filtered protocol data requirements are sent to the adapter module after being packaged and encoded, and the adapter module unpacks and decodes the packaged and encoded protocol data requirements;
[0013] Send the unpacked and decoded protocol data requirements to the protocol test object.
[0014] Further, the filtering process of the protocol data requirement by the filter module specifically includes:
[0015] The filter module encrypts the data to be protected in the protocol data requirement and transparently transmits other data in the protocol data requirement; wherein the data to be protected is preset data related to security and privacy.
[0016] Further, after the adapter module unpacks and decodes the packetized and encoded protocol data requirements, the method further includes:
[0017] Decrypting the data to be protected in the unpacked and decoded protocol data requirements through the adapter module;
[0018] Then, the unpacked and decoded protocol data requirement is sent to the protocol test object, specifically including:
[0019] Send the decrypted protocol data requirements to the protocol test object.
[0020] Furthermore, before unpacking and decoding the packet-encoded protocol data requirements by the adapter module, the method further includes:
[0021] The connection between the adapter module and the filter module is authenticated and authorized.
[0022] Further, the receiving, by the proxy module, the protocol data returned by the protocol test object in response to the received protocol data requirement specifically includes:
[0023] receiving, by the adapter module, protocol data returned by the protocol test object in response to the received protocol data demand;
[0024] The received protocol data is encrypted and packaged and encoded, and then transmitted back to the filter module, and the filter module unpacks, decodes and decrypts the processed protocol data;
[0025] The proxy module receives the protocol data returned by the filter module after being unpacked, decoded and decrypted.
[0026] In order to achieve the above object, an embodiment of the present invention further provides a protocol consistency test device, which is applicable to a test system including a proxy module, a filter module and an adapter module, and the device includes:
[0027] A test task acquisition module, used to receive the test task through the proxy module, and send the protocol data requirements carried in the test task to the protocol test object; wherein the proxy module is used to interact with the protocol test object through the filter module and the adapter module;
[0028] The protocol consistency test module is used to receive, through the proxy module, the protocol data returned by the protocol test object in response to the received protocol data requirement, and perform a protocol consistency test according to the received protocol data.
[0029] An embodiment of the present invention further provides a computer-readable storage medium, comprising a stored computer program, wherein when the computer program is run, the device where the computer-readable storage medium is located controls the device to execute any one of the above-mentioned protocol consistency testing methods.
[0030] An embodiment of the present invention further provides a computer program product, including a computer program, wherein the computer program implements any of the above-mentioned protocol consistency testing methods when executed by a processor.
[0031] An embodiment of the present invention further provides a terminal device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements any of the above-mentioned protocol consistency testing methods when executing the computer program.
[0032] Compared with the prior art, the embodiment of the present invention provides a protocol consistency test method, device, computer-readable storage medium, computer program product and terminal device, which are applicable to a test system including a proxy module, a filter module and an adapter module, wherein the method comprises: receiving a test task through the proxy module, and sending the protocol data requirement carried in the test task to the protocol test object; wherein the proxy module is used to interact with the protocol test object through the filter module and the adapter module; receiving the protocol data returned by the protocol test object in response to the received protocol data requirement through the proxy module, and performing a protocol consistency test according to the received protocol data. The embodiment of the present invention sets an observer agent in the existing protocol consistency test process, uses the observer agent to replace the original protocol test object to interact with the tester, and the observer agent interacts with the protocol test object through the filter module and the adapter module, which can meet the protection of data security and privacy of the protocol test object, and can also realize the test of protocol consistency, so that in scenarios such as privacy computing and federated learning where data security and privacy need to be protected, the consistency test of the interactive protocol can be realized under the condition of meeting data security and privacy protection. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a structural diagram of a conceptual model of a protocol consistency test provided by the prior art;
[0034] Figure 2 It is a flow chart of a preferred embodiment of a protocol consistency testing method provided by the present invention;
[0035] Figure 3 It is a structural schematic diagram of a preferred embodiment of a protocol consistency testing system provided by the present invention;
[0036] Figure 4 It is a structural block diagram of a preferred embodiment of a protocol consistency testing device provided by the present invention;
[0037] Figure 5 It is a structural block diagram of a preferred embodiment of a terminal device provided by the present invention. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in 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. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this technical field without creative work are within the scope of protection of the present invention.
[0039] See also Figure 1 As shown in the figure, it is a schematic diagram of the structure of a conceptual model of a protocol consistency test provided by the prior art. The test principle is that the tester uses the abstract service primitive (ASP) and the protocol service unit (PDU) to observe and control the object under test (i.e., IUT). The tester is generally composed of an upper tester (UT) corresponding to the upper interface of the IUT and a lower tester (LT) corresponding to the lower interface of the IUT. During the test, the tester is connected to the IUT, and the service function of the IUT is detected through the UT using the test coordination procedure, and the protocol is verified through the LT. In fact, the case where the IUT directly connects the UT and the LT is only a special case. Generally, the upper tester (UT) is installed on the top of the IUT, and the UT, IUT and the lower equipment are combined to form the system under test, and then connected through the network and the consistency test system (CTS) for testing.
[0040] based on Figure 1 The prominent problem with the protocol consistency testing method implemented by the conceptual model shown is that the format content of the protocol, the constructed protocol test data and the entire protocol testing process are all carried out in an open and transparent manner. It is not applicable to scenarios such as privacy computing and federated learning that focus on security and privacy protection. This is because the interactive protocols in privacy computing and federated learning carry the original data of each data owner or the intermediate process data of data processing. The existing testing methods require that these protocol interaction data be open and transparent, making it impossible to implement protocol consistency testing in scenarios such as privacy computing and federated learning.
[0041] In order to solve the above problems, an embodiment of the present invention provides a protocol consistency test method, which is applicable to a test system including an agent module, a filter module and an adapter module, see Figure 2 FIG. 1 is a flowchart of a preferred embodiment of a protocol consistency test method provided by the present invention, wherein the method comprises steps S11 to S12:
[0042] Step S11, receiving a test task through the proxy module, and sending the protocol data requirements carried in the test task to the protocol test object; wherein the proxy module is used to interact with the protocol test object through the filter module and the adapter module;
[0043] Step S12: receiving, through the proxy module, the protocol data returned by the protocol test object in response to the received protocol data requirement, and performing a protocol consistency test according to the received protocol data.
[0044] Combination Figure 3 FIG. 1 is a schematic diagram of a preferred embodiment of a protocol consistency test system provided by the present invention. The test system is mainly composed of an agent module, a filter module, and an adapter module for implementing adaptive transformation of a protocol test object (i.e., IUT). Figure 1 Compared with the conceptual model of the protocol conformance test shown in FIG, a proxy module, a filter module and an adapter module are added accordingly, wherein the proxy module is used to replace the original IUT to interact with the tester, and the proxy module interacts with the IUT through the filter module and the adapter module.
[0045] In the specific implementation, the proxy module assumes the original role of the protocol test object in the protocol consistency test, and receives the test task in the original test process, wherein the test task can be generated by the tester and sent to the proxy module, and the test task can be a test script, protocol data unit (PDU) or abstract service primitive (ASP), etc.; the proxy module sends the protocol data requirements carried in the test task to the protocol test object through the filter module and the adapter module in sequence; after receiving the protocol data requirements sent by the proxy module, the protocol test object can respond to the protocol data requirements and return the corresponding protocol data to the proxy module through the adapter module and the filter module in sequence; after receiving the protocol data returned by the protocol test object, the proxy module can perform a protocol consistency test based on the received protocol data; for example, the proxy module determines whether the received protocol data is the same as the expected protocol data. If so, it means that the protocol consistency test has passed, otherwise, it means that the protocol consistency test has failed.
[0046] A protocol consistency test method provided by an embodiment of the present invention is applicable to a test system including a proxy module, a filter module and an adapter module, and the method includes: receiving a test task through a proxy module, and sending the protocol data requirement carried in the test task to a protocol test object; wherein the proxy module is used to interact with the protocol test object through a filter module and an adapter module; receiving the protocol data returned by the protocol test object in response to the received protocol data requirement through the proxy module, and performing a protocol consistency test according to the received protocol data. The embodiment of the present invention sets an observer agent in the existing protocol consistency test process, uses the observer agent to replace the original protocol test object to interact with the tester, and the observer agent interacts with the protocol test object through the filter module and the adapter module, which can meet the protection of data security and privacy of the protocol test object, and can also realize the test of protocol consistency, so that in scenarios such as privacy computing and federated learning where data security and privacy need to be protected, the consistency test of the interactive protocol can be realized under the condition of meeting data security and privacy protection.
[0047] In one of the optional embodiments, receiving the test task through the proxy module and sending the protocol data requirement carried in the test task to the protocol test object specifically includes:
[0048] Receiving the test task through the proxy module, and parsing to obtain the protocol data requirements carried in the test task;
[0049] Sending the protocol data requirement to the filter module, and filtering the protocol data requirement through the filter module;
[0050] The filtered protocol data requirements are sent to the adapter module after being packaged and encoded, and the adapter module unpacks and decodes the packaged and encoded protocol data requirements;
[0051] Send the unpacked and decoded protocol data requirements to the protocol test object.
[0052] Specifically, in combination with the above embodiments, after receiving the test task, the proxy module can parse the received test task, obtain the protocol data requirements carried in the test task accordingly, and send the protocol data requirements obtained by parsing to the filter module; after receiving the protocol data requirements sent by the proxy module, the filter module can first filter the protocol data requirements, and then re-package and encode the filtered protocol data requirements, and send the packaged and encoded protocol data requirements to the adapter module on the protocol test object side; after receiving the packaged and encoded protocol data requirements sent by the filter module, the adapter module can perform corresponding unpacking and decoding processing on the packaged and encoded protocol data requirements, and send the unpacked and decoded protocol data requirements to the protocol test object. For example, the adapter module can send a protocol data request to the protocol test object, and the protocol data request carries the unpacked and decoded protocol data requirements, so that the protocol test object can provide corresponding protocol data according to the received protocol data request.
[0053] In an embodiment of the present invention, when the proxy module parses and processes the test task, it can first analyze the frame structure and filter out data segments that meet the frame size; then segment the frame data according to the identifier in the frame structure, and obtain the meaning of each field and the specific data and information it contains; then, implement the corresponding functions (frame detection, field identifier recognition, field information extraction, etc.) with corresponding functions or programs; wherein the proxy module can maintain a state machine, continuously loop the frame parsing process, and write the results of each parsing into the state machine.
[0054] It should be noted that the parsing implementation method can adopt existing technology or be customized according to actual needs, and can also be updated online as needed (for example, online updating of functions, programs, identification definitions, etc. corresponding to the parsing process).
[0055] In an embodiment of the present invention, when the filter module performs packaging and encoding processing on the protocol data requirements after filtering, it can, according to the defined protocol frame structure, call the packaging function corresponding to different field identifiers, and represent the data in the defined frame structure format according to the identifiers in the frame structure and the corresponding data and information encoding, and store and send the data in a specific data format.
[0056] It should be noted that the packing coding format and method can adopt existing technology, or can be customized according to actual needs, and can also be updated online as needed (for example, the frame structure, packing function, field identifier, data structure, etc. corresponding to the packing coding process can be updated online).
[0057] In an embodiment of the present invention, when the adapter module unpacks and decodes the protocol data required after the packing and encoding processing, the above-mentioned filter module can be used to implement the inverse processing corresponding to the packing and encoding processing. Similarly, the unpacking and decoding format and method can adopt the existing technology, or can be customized according to actual needs, and can also be updated online as needed (for example, the frame structure, packing function, field identifier, data structure, etc. corresponding to the unpacking and decoding process can be updated online).
[0058] In one of the optional embodiments, filtering the protocol data requirement by the filter module specifically includes:
[0059] The filter module encrypts the data to be protected in the protocol data requirement and transparently transmits other data in the protocol data requirement; wherein the data to be protected is preset data related to security and privacy.
[0060] Specifically, in combination with the above embodiments, when the filter module filters the protocol data requirements sent by the received proxy module, it can encrypt the data to be protected in the protocol data requirements, and transparently transmit other data in the protocol data requirements except the data to be protected, so as to obtain the filtered protocol data requirements accordingly; wherein, the data to be protected in the protocol data requirements mainly refers to fields and data content related to security and privacy.
[0061] It should be noted that the protocol data requirements mainly include relevant fields and specific information that need to be clarified when verifying the protocol. Which of these fields and information involve security and privacy and are data to be protected that require additional encryption and protection can be customized through preset rules. In addition, the filter module can identify the data to be protected through the identification of fields and information, or identify the data to be protected from the protocol data requirements through a specific feature recognition algorithm. The embodiments of the present invention do not make specific limitations.
[0062] It should be noted that the filter module can directly use the existing encryption algorithm when encrypting the protected data, as long as it can ensure that the filter module and the adapter module (protocol test object) can achieve mutual encryption and decryption internally and maintain confidentiality externally.
[0063] In one of the optional embodiments, after the adapter module unpacks and decodes the packetized and encoded protocol data requirements, the method further includes:
[0064] Decrypting the data to be protected in the unpacked and decoded protocol data requirements through the adapter module;
[0065] Then, the unpacked and decoded protocol data requirement is sent to the protocol test object, specifically including:
[0066] Send the decrypted protocol data requirements to the protocol test object.
[0067] Specifically, in combination with the above-mentioned embodiments, based on the encryption processing performed on the data to be protected in the protocol data demand by the filter module, after the adapter module receives the protocol data demand after the packaged encoding processing sent by the filter module, in addition to performing corresponding unpacking and decoding processing on the protocol data demand after the packaged encoding processing, it is also necessary to further decrypt the data to be protected in the protocol data demand after the unpacking and decoding processing. Accordingly, the adapter module sends the decrypted protocol data demand to the protocol test object.
[0068] It should be noted that the adapter module can also directly use the existing encryption algorithm when decrypting the protected data, as long as the filter module and the adapter module (protocol test object) can achieve mutual encryption and decryption internally and maintain confidentiality externally.
[0069] In one of the optional embodiments, before the adapter module unpacks and decodes the packetized and encoded protocol data requirements, the method further includes:
[0070] The connection between the adapter module and the filter module is authenticated and authorized.
[0071] Specifically, in combination with the above embodiments, the connection between the adapter module and the filter module needs to be authenticated and authorized. Therefore, after the adapter module receives the packaged and encoded protocol data requirements sent by the filter module, before performing corresponding unpacking and decoding processing on the packaged and encoded protocol data requirements, it is necessary to first authenticate and authenticate the connection between the adapter module and the filter module. Only after the security authentication and authentication verification are passed, the adapter module will perform corresponding unpacking and decoding processing on the received packaged and encoded protocol data requirements.
[0072] In an embodiment of the present invention, the authentication process between the adapter module and the filter module is mainly to realize the identity of the declarant to be authenticated by comparing the consistency of specific identification information; the authentication process between the adapter module and the filter module is a process based on the authentication method to identify and confirm the authenticity of the identity and rights declared by a declarant.
[0073] It should be noted that the authentication method and the authorization method can adopt the existing technology, or can be customized according to actual needs, and can also be updated online as needed (for example, the methods, procedures and configuration information corresponding to the authentication and authorization can be updated online).
[0074] In one of the optional embodiments, the receiving, by the proxy module, the protocol data returned by the protocol test object in response to the received protocol data requirement specifically includes:
[0075] receiving, by the adapter module, protocol data returned by the protocol test object in response to the received protocol data demand;
[0076] The received protocol data is encrypted and packaged and encoded, and then transmitted back to the filter module, and the filter module unpacks, decodes and decrypts the processed protocol data;
[0077] The proxy module receives the protocol data returned by the filter module after being unpacked, decoded and decrypted.
[0078] Specifically, in combination with the above embodiments, when the proxy module receives the protocol data returned by the protocol test object in response to the received protocol data demand, the protocol test object can first return the protocol data to the adapter module; after receiving the protocol data returned by the protocol test object, the adapter module can perform corresponding encryption and packaging encoding processing on the received protocol data, and return the encrypted and packaged encoding protocol data to the filter module; after receiving the encrypted and packaged encoding protocol data returned by the adapter module, the filter module can perform corresponding unpacking, decoding and decryption processing on the received encrypted and packaged encoding protocol data, and return the unpacking, decoding and decrypted protocol data to the proxy module, and the proxy module can obtain the protocol data returned by the protocol test object in response to the received protocol data demand.
[0079] It should be noted that, in the process of protocol data request, encryption and packaging encoding processing is required in the filter module, and unpacking decoding and decryption processing is required in the adapter module, while in the process of protocol data return, encryption and packaging encoding processing is required in the adapter module, and unpacking decoding and decryption processing is required in the filter module. The encryption method, decryption method, packaging encoding method, unpacking decoding method used in the process of protocol data request and the encryption method, decryption method, packaging encoding method, unpacking decoding method used in the process of protocol data return may be the same or different, as long as the protocol data request process and the protocol data return process can be implemented safely.
[0080] For example, the following is combined Figure 3 As well as all the above embodiments, the implementation process of the protocol consistency testing method provided by the embodiment of the present invention is specifically described:
[0081] Step 1: The proxy module assumes the original role of the protocol test object (IUT) in the conformance test and receives the test tasks in the original test process;
[0082] Step 2: The proxy module parses the test task (e.g., test script, protocol data unit (PDU), abstract service primitive (ASP), etc.) to obtain the protocol data requirements carried in the test task;
[0083] Step 3: The proxy module submits the parsed protocol data requirements to the filter module for analysis and processing;
[0084] Step 4: The filter module filters the received protocol data requirements, encrypts the fields and data contents related to security and privacy in the protocol data requirements, transparently transmits other data in the protocol data requirements, and repackages and encodes the protocol data requirements and sends them to the adapter module on the IUT side;
[0085] Step 5: After the connection between the adapter module and the filter module has been authenticated and verified, the adapter module unpacks, decodes and decrypts the received protocol data requirements and sends a protocol data request to the IUT;
[0086] Step 6: The IUT provides the protocol data required by the adapter module according to the received protocol data request (i.e., the protocol data requirement or the data and information related to the protocol test corresponding to the protocol data request), and fills the protocol data into the "return information or message body" corresponding to the protocol data request (the "return information or message body" can be defined according to the test task);
[0087] Step 7: The IUT sends the filled protocol data back to the adapter module;
[0088] Step 8: The adapter module encrypts and packages the received protocol data and sends it back to the filter module;
[0089] Step 9: The filter module unpacks, decodes and decrypts the received protocol data and transmits it to the proxy module;
[0090] Step 10: The proxy module completes the corresponding protocol consistency test process according to the received protocol data.
[0091] It can be understood that the embodiment of the present invention sets an observer agent to replace the original protocol test object in the test process, and acts as an agent to communicate with the tester and the protocol test object after converting the information that needs to be interacted in the original test process in a specific, definable, confidential and secure manner. This is equivalent to adding a layer of isolation and protection between the tester and the protocol test object, filtering the protocol test content for security and privacy, and preventing the tester and the protocol test object from directly interacting with the information that needs to be protected in the test process, thereby meeting the security and privacy protection of the protocol test object.
[0092] The embodiment of the present invention also provides a protocol consistency test device, which is applicable to a test system including a proxy module, a filter module and an adapter module. The device is used to implement the protocol consistency test method described in any of the above embodiments, see Figure 4 FIG. 1 is a block diagram of a preferred embodiment of a protocol consistency test device provided by the present invention, wherein the device comprises:
[0093] A test task acquisition module 11, used to receive the test task through the proxy module, and send the protocol data requirements carried in the test task to the protocol test object; wherein the proxy module is used to interact with the protocol test object through the filter module and the adapter module;
[0094] The protocol consistency test module 12 is used to receive, through the proxy module, the protocol data returned by the protocol test object in response to the received protocol data requirement, and perform a protocol consistency test according to the received protocol data.
[0095] Preferably, the test task acquisition module 11 specifically includes:
[0096] A test task receiving and parsing unit, used to receive the test task through the proxy module, and parse and obtain the protocol data requirements carried in the test task;
[0097] A protocol data requirement filtering unit, used for sending the protocol data requirement to the filter module, and filtering the protocol data requirement through the filter module;
[0098] The protocol data demand unpacking and decoding unit is used to send the filtered protocol data demand to the adapter module after packaging and encoding, and the adapter module unpacks and decodes the packaged and encoded protocol data demand;
[0099] The protocol data requirement sending unit is used to send the unpacked and decoded protocol data requirement to the protocol test object.
[0100] Preferably, the protocol data requirement filtering unit filters the protocol data requirement through the filter module, specifically including:
[0101] The filter module encrypts the data to be protected in the protocol data requirement and transparently transmits other data in the protocol data requirement; wherein the data to be protected is preset data related to security and privacy.
[0102] Preferably, the test task acquisition module 11 further includes:
[0103] A protocol data requirement decryption unit, used for decrypting the data to be protected in the unpacked and decoded protocol data requirement through the adapter module;
[0104] Then, the protocol data requirement sending unit sends the unpacked and decoded protocol data requirement to the protocol test object, specifically including:
[0105] Send the decrypted protocol data requirements to the protocol test object.
[0106] Preferably, the device further comprises:
[0107] The authentication and authorization module is used to perform authentication and authorization processing on the connection between the adapter module and the filter module.
[0108] Preferably, the protocol consistency test module 12 specifically includes:
[0109] A first protocol data receiving unit, configured to receive, through the adapter module, protocol data returned by the protocol test object in response to a received protocol data demand;
[0110] The protocol data processing unit is used to encrypt and package the received protocol data and then transmit it back to the filter module, and the filter module unpacks, decodes and decrypts the processed protocol data;
[0111] The second protocol data receiving unit is used to receive the protocol data returned by the filter module through the proxy module after being unpacked, decoded and decrypted.
[0112] It should be noted that a protocol consistency testing device provided in an embodiment of the present invention can implement all the processes of the protocol consistency testing method described in any of the above embodiments. The functions of each module and unit in the device and the technical effects achieved are respectively the same as the functions and technical effects achieved by the protocol consistency testing method described in the above embodiments, and will not be repeated here.
[0113] An embodiment of the present invention further provides a computer-readable storage medium, comprising a stored computer program, wherein when the computer program is run, the device where the computer-readable storage medium is located controls the device to execute the protocol consistency testing method described in any of the above embodiments.
[0114] An embodiment of the present invention further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the protocol consistency testing method described in any of the above embodiments is implemented.
[0115] The embodiment of the present invention also provides a terminal device, see Figure 5 As shown, it is a structural block diagram of a preferred embodiment of a terminal device provided by the present invention, wherein the terminal device includes a processor 10, a memory 20, and a computer program stored in the memory 20 and configured to be executed by the processor 10, and the processor 10 implements the protocol consistency test method described in any of the above embodiments when executing the computer program.
[0116] Preferably, the computer program can be divided into one or more modules / units (such as computer program 1, computer program 2, ...), and the one or more modules / units are stored in the memory 20 and executed by the processor 10 to complete the present invention. The one or more modules / units can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the terminal device.
[0117] The processor 10 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor 10 may be any conventional processor. The processor 10 is the control center of the terminal device, and various parts of the terminal device are connected using various interfaces and lines.
[0118] The memory 20 mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function, etc., and the data storage area can store related data, etc. In addition, the memory 20 can be a high-speed random access memory, or a non-volatile memory, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, and a flash card (Flash Card), etc., or the memory 20 can also be other volatile solid-state storage devices.
[0119] It should be noted that the above terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that Figure 5 The structural block diagram shown is only a structural example of the above-mentioned terminal device and does not constitute a structural limitation of the above-mentioned terminal device. The above-mentioned terminal device may include more or fewer components than shown in the figure, or combine certain components, or different components.
[0120] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A protocol consistency testing method, It is characterized in that Applicable to a test system including an agent module, a filter module and an adapter module, the method comprising: Receive the test task through the proxy module, and send the protocol data requirements carried in the test task to the protocol test object; wherein the proxy module is used to interact with the protocol test object through the filter module and the adapter module; The proxy module receives the protocol data returned by the protocol test object in response to the received protocol data requirement, and performs a protocol consistency test according to the received protocol data.
2. The protocol consistency testing method according to claim 1, It is characterized in that The receiving the test task through the proxy module and sending the protocol data requirement carried in the test task to the protocol test object specifically includes: Receiving the test task through the proxy module, and parsing to obtain the protocol data requirements carried in the test task; Sending the protocol data requirement to the filter module, and filtering the protocol data requirement through the filter module; The filtered protocol data requirements are sent to the adapter module after being packaged and encoded, and the adapter module unpacks and decodes the packaged and encoded protocol data requirements; Send the unpacked and decoded protocol data requirements to the protocol test object.
3. The protocol consistency testing method as claimed in claim 2, It is characterized in that The filtering process of the protocol data requirement by the filter module specifically includes: The filter module encrypts the data to be protected in the protocol data requirement and transparently transmits other data in the protocol data requirement; wherein the data to be protected is preset data related to security and privacy.
4. The protocol consistency testing method as claimed in claim 3, It is characterized in that After the adapter module unpacks and decodes the packet-encoded protocol data requirements, the method further includes: Decrypting the data to be protected in the unpacked and decoded protocol data requirements through the adapter module; Then, the unpacked and decoded protocol data requirement is sent to the protocol test object, specifically including: Send the decrypted protocol data requirements to the protocol test object.
5. The protocol consistency testing method as claimed in claim 2, It is characterized in that Before the adapter module unpacks and decodes the packetized and encoded protocol data requirements, the method further includes: The connection between the adapter module and the filter module is authenticated and authorized.
6. The protocol consistency testing method according to any one of claims 1 to 5, It is characterized in that The receiving, by the proxy module, the protocol data returned by the protocol test object in response to the received protocol data requirement specifically includes: receiving, by the adapter module, protocol data returned by the protocol test object in response to the received protocol data demand; The received protocol data is encrypted and packaged and encoded, and then transmitted back to the filter module, and the filter module unpacks, decodes and decrypts the processed protocol data; The proxy module receives the protocol data returned by the filter module after being unpacked, decoded and decrypted.
7. A protocol consistency test device, It is characterized in that Applicable to a test system including an agent module, a filter module and an adapter module, the device comprising: A test task acquisition module, used to receive the test task through the proxy module, and send the protocol data requirements carried in the test task to the protocol test object; wherein the proxy module is used to interact with the protocol test object through the filter module and the adapter module; The protocol consistency test module is used to receive, through the proxy module, the protocol data returned by the protocol test object in response to the received protocol data requirement, and perform a protocol consistency test according to the received protocol data.
8. A computer-readable storage medium, It is characterized in that The method comprises a stored computer program, wherein when the computer program is run, the device where the computer-readable storage medium is located controls the device to execute the protocol consistency testing method according to any one of claims 1 to 6.
9. A computer program product, It is characterized in that The method comprises a computer program, which implements the protocol consistency testing method according to any one of claims 1 to 6 when executed by a processor.
10. A terminal device, It is characterized in that The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the protocol consistency testing method according to any one of claims 1 to 6 when executing the computer program.
Citation Information
Patent Citations
System and method for testing protocol consistency for base station
CN101232661A
Conformance testing adapter based on TTCN-3
CN103368673A
Multiple cell TTCN (Tree and Tabular Combined Notation) protocol conformance test platform system
CN103812730A
Protocol conformance testing method and apparatus
CN106533642A
Fine-grained data encryption method, system and device based on database
CN110889130A
