CN110489331B - Method for testing mobile communication driver, terminal device and storage medium - Google Patents

Method for testing mobile communication driver, terminal device and storage medium Download PDF

Info

Publication number
CN110489331B
CN110489331B CN201910637010.9A CN201910637010A CN110489331B CN 110489331 B CN110489331 B CN 110489331B CN 201910637010 A CN201910637010 A CN 201910637010A CN 110489331 B CN110489331 B CN 110489331B
Authority
CN
China
Prior art keywords
data byte
byte stream
string
target identification
identification string
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.)
Active
Application number
CN201910637010.9A
Other languages
Chinese (zh)
Other versions
CN110489331A (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.)
PAX Computer Technology Shenzhen Co Ltd
Original Assignee
PAX Computer Technology Shenzhen Co Ltd
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 PAX Computer Technology Shenzhen Co Ltd filed Critical PAX Computer Technology Shenzhen Co Ltd
Priority to CN201910637010.9A priority Critical patent/CN110489331B/en
Publication of CN110489331A publication Critical patent/CN110489331A/en
Application granted granted Critical
Publication of CN110489331B publication Critical patent/CN110489331B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application is applicable to the technical field of program testing, and provides a method for testing a mobile communication driver, a terminal device and a storage medium, wherein the method comprises the following steps: monitoring a data byte stream of a tested mobile communication module; and when the data byte stream comprises the target identification string and is a lower data byte stream, replacing the target identification string in the lower data byte stream with a preset replacement byte string and sending the replaced lower data byte stream to the master control system, or discarding the target identification string in the lower data byte stream and sending the lower data byte stream without the target identification string to the master control system. According to the method for testing the mobile communication driver, the terminal device and the storage medium provided by the embodiment of the application, the target identification string in the lower data byte stream is replaced or discarded correspondingly, so that the communication condition of the detected mobile communication driver in a specific network environment can be simulated, and the test of the mobile communication driver is realized.

Description

Method for testing mobile communication driver, terminal device and storage medium
Technical Field
The present application belongs to the technical field of program testing, and in particular, to a method, a terminal device, and a storage medium for testing a mobile communication driver.
Background
Many mobile or non-mobile electronic devices are equipped with a separate mobile communication module, and accordingly, the electronic device is provided with a mobile communication driver corresponding to the mobile communication module. In the process of developing and maintaining products of electronic equipment, the adaptability of a mobile communication driver under a specific network environment is often required to be tested.
The existing test method for the mobile communication driver has the problems that the test effectiveness cannot be guaranteed or the test cost is high and the like.
Disclosure of Invention
In view of this, embodiments of the present application provide a method, a terminal device, and a storage medium for testing a mobile communication driver, so as to solve the problems of poor test effectiveness or high test cost in the current test of the mobile communication driver.
According to a first aspect, an embodiment of the present application provides a method for testing a mobile communication driver, including: monitoring a data byte stream of a tested mobile communication module; the data byte stream comprises a lower data byte stream to be sent to a corresponding main control system by the tested mobile communication module and an upper data byte stream to be sent to the mobile communication module by the main control system; and when the data byte stream comprises a target identification string and is a lower data byte stream, replacing the target identification string in the lower data byte stream with a preset replacement byte string and sending the replaced lower data byte stream to the main control system, or discarding the target identification string in the lower data byte stream and sending the lower data byte stream without the target identification string to the main control system.
With reference to the first aspect, in some embodiments of the present application, when the data byte stream includes a target identification string and the data byte stream is an upper data byte stream, the upper data byte stream is sent to the mobile communication module; acquiring a response data byte stream corresponding to the upper data byte stream; the response data byte stream is a data byte stream fed back by the mobile communication module according to the upper data byte stream; and replacing the response character string corresponding to the target identification string in the response data byte stream with a preset replacement byte string, and sending the replaced response data byte stream to the master control system, or discarding the response character string corresponding to the target identification string in the response data byte stream, and sending the response data byte stream without the response character string to the master control system.
With reference to the first aspect, in some embodiments of the present application, the determining whether the data byte stream includes the target identification string includes: judging whether the lower data byte stream or the upper data byte stream contains continuous character strings with the same length and content as the target identification strings; and when the lower data byte stream or the upper data byte stream contains a continuous character string with the same length and content as the target identification string, determining that the lower data byte stream or the upper data byte stream contains the target identification string, and the continuous character string is the target identification string.
With reference to the first aspect, in some embodiments of the present application, before determining that the target identification string is included in the lower data byte stream or the upper data byte stream, the determining whether the target identification string is included in the data byte stream further includes: judging whether the time interval between each adjacent character is smaller than a preset effective character interval when the continuous character string is received; and when the time interval between each adjacent character is smaller than or equal to a preset effective character interval when the continuous character string is received, determining that the lower data byte stream or the upper data byte stream comprises a target identification string, wherein the continuous character string is the target identification string.
With reference to the first aspect, in some embodiments of the present application, before determining that the target identification string is included in the lower data byte stream or the upper data byte stream, the determining whether the target identification string is included in the data byte stream further includes: judging whether the time interval between the continuous character string and the adjacent next character is larger than or equal to the preset minimum silent time or not; and when the time interval between the continuous character string and the next adjacent character is greater than or equal to a preset minimum silent time and the time interval between any two adjacent characters is less than or equal to a preset effective character interval when the continuous character string is received, determining that the lower data byte stream or the upper data byte stream comprises a target identification string and the continuous character string is the target identification string.
With reference to the first aspect, in some embodiments of the present application, the determining whether the data byte stream includes the target identification string further includes: and when the time interval between any two adjacent characters is larger than a preset effective character interval when the continuous character string is received, or the time interval between the continuous character string and the next adjacent character is smaller than a preset minimum silent time, or the lower data byte stream or the upper data byte stream does not contain the continuous character string with the same length and content as the target identification string, determining that the data byte stream does not contain the target identification string.
With reference to the first aspect, in some embodiments of the present application, it is characterized in that the target identification string includes a wildcard.
According to a second aspect, an embodiment of the present application provides a terminal device, including: the monitoring unit is used for monitoring the data byte stream of the tested mobile communication module; the data byte stream comprises a lower data byte stream to be sent to a corresponding main control system by the tested mobile communication module and an upper data byte stream to be sent to the mobile communication module by the main control system; and the replacing unit is used for replacing the target identification string in the lower data byte stream with a preset replacement byte string and sending the replaced lower data byte stream to the master control system, or discarding the target identification string in the lower data byte stream and sending the lower data byte stream without the target identification string to the master control system when the data byte stream comprises the target identification string and is the lower data byte stream.
According to a third aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the steps of the method according to the first aspect or any implementation manner of the first aspect.
According to a fourth aspect, embodiments of the present application provide a computer-readable storage medium, where a computer program is stored, and the computer program, when executed by a processor, implements the steps of the method according to the first aspect or any implementation manner of the first aspect.
According to the method for testing the mobile communication driver, the target identification string in the lower data byte stream is replaced or discarded correspondingly, so that the communication condition of the detected mobile communication driver in a specific network environment can be simulated, and the mobile communication driver can be tested. If the mobile communication module responds to the same command or request sent by the main control system differently in different network environments, the specific content of the output information or the response information of the mobile communication module in a specific network environment is known. Accordingly, the method for testing the mobile communication driver provided by the embodiment of the application can simulate a specific test environment seen from the main control system by configuring different target identification strings and operation modes thereof and executing a given test flow, and complete the adaptability test of the mobile communication driver in the corresponding environment. The method for testing the mobile communication driver provided by the embodiment of the application does not or does not need to really change the network environment of the mobile communication module, but utilizes the existing network environment to change the data received by the main control system from the mobile communication module, so that the main control system obtains the same operation result as that under the assumed network environment, and the purpose of completing the adaptability test is achieved. Therefore, the material and time cost of the test can be greatly saved, and the effectiveness of the test is enhanced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 2 is a flowchart of a specific example of a method for testing a mobile communication driver according to an embodiment of the present application;
fig. 3 is a flowchart of another specific example of a method for testing a mobile communication driver according to an embodiment of the present application;
FIG. 4 is a diagram of a character and its receiving time provided by an embodiment of the present application;
fig. 5 is a diagram illustrating a structure of a specific example of a terminal device according to an embodiment of the present application;
fig. 6 is a diagram illustrating a structure of another specific example of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
Fig. 1 is a schematic view of an application scenario in an embodiment of the present application. As shown in fig. 1, a filtering device 300 may be connected in series to an access interface between the main control system 100 and the mobile communication module 200 of the device under test, and the filtering device 300 simulates a communication process between the main control system 100 and the mobile communication module 200 in different network environments, so as to realize a function of simulating a specific network environment in an existing mobile communication network environment and perform an adaptive communication test in the specific network environment. Specifically, serial ports or USB connections may be used between the host system 100 and the filtering device 300, and between the mobile communication module 200 and the filtering device 300.
The filtering device 300 shown in fig. 1 is a computer device having two communication ports, and the type of the communication port depends on the type of the interface between the main control system 100 and the mobile communication module 200 of the device under test. Generally, the host system 100 of the device under test and the mobile communication module 200 are connected by a serial port or a USB port. The filtering device 300 may have input and output peripherals such as a keyboard, a mouse, a display screen, a touch screen, an additional serial port, an additional USB port, an ethernet port, etc. to facilitate the operation and running of the filtering program.
When the host system 100 and the mobile communication module 200 are connected via a serial port, the filter device 300 should have two serial ports. When the host system 100 and the mobile communication module 200 are connected through USB ports, the filter device 300 should have two USB ports, and the corresponding devices must be connected according to the way that one is a host mode port and the other is a device mode port.
The filtering device 300 includes an upper communication port and a lower communication port, which may be referred to as an upper port and a lower port, respectively. A port connected between the main control device and the main control system 100 of the main control device is called an upper port; the port connected between the mobile communication module 200 and the mobile communication module 200 is referred to as a lower port. When the filtering device 300 is in the connection and power-on states, the connection positions of the two ports cannot be changed arbitrarily; after power is off, and the connection mode is a serial port, the connection state can be changed at will.
Specifically, when the communication port is a serial port, the filtering device 300 should have two serial ports, and the upper port and the lower port may be arbitrarily allocated to and selected from the two serial ports; when the communication port is a USB port, the filtering device should have two USB ports, one of which is a host mode port and the other is a device mode port, and the host mode port should be selected by the upper port and the device mode port should be selected by the lower port, so as to meet the connection requirement of the USB bus, because the USB port of the host system 100 is the host mode port and the USB port of the mobile communication module 200 is the device mode port.
On the hardware circuit, the connection line between the main control system 100 and the mobile communication module 200 may be cut off first; the cut interface line of the main control device is connected to the upper port of the filter device 300, and the cut interface line of the mobile communication module 200 is connected to the lower port of the filter device 300.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
The embodiment of the present application provides a method for testing a mobile communication driver, which is suitable for the filtering apparatus 300 shown in fig. 1, and as shown in fig. 2, the method may include the following steps:
step S101: and monitoring the data byte stream of the tested mobile communication module. Specifically, the data byte stream includes a lower data byte stream to be sent to the corresponding master control system by the mobile communication module to be tested, and an upper data byte stream to be sent to the mobile communication module by the master control system. The main control system is communicated with the mobile communication module through a mobile communication driving program.
Step S102: and judging whether the data byte stream comprises the target identification string. When the data byte stream includes the target identification string and is the lower data byte stream, executing step S103; and directly forwarding the lower data byte stream when the lower data byte stream does not comprise the target identification string. When the data byte stream comprises the target identification string and is an upper data byte stream, executing the steps S104 to S105; and when the upper data byte stream does not contain the target identification string, directly forwarding the upper data byte stream and the response data byte stream corresponding to the upper data byte stream.
Step S103: and replacing the target identification string in the lower data byte stream with a preset replacement byte string, and sending the replaced lower data byte stream to the master control system, or discarding the target identification string in the lower data byte stream, and sending the lower data byte stream without the target identification string to the master control system.
Through the above steps S101 to S103, monitoring and management of the lower data byte stream can be realized. In practical applications, in addition to monitoring the lower data byte stream transmitted to the main control system 100 by the mobile communication module 200, the upper data byte stream transmitted to the mobile communication module 200 by the main control system 100 also needs to be monitored. For this reason, as shown in fig. 3, the following steps may be added after step S102:
step S104: and sending the upper data byte stream to the mobile communication module, and acquiring a response data byte stream corresponding to the upper data byte stream. Specifically, the response data byte stream is a data byte stream fed back by the mobile communication module according to the upper data byte stream.
Step S105: and replacing the character string corresponding to the target identification string in the response data byte stream with a preset replacement byte string, and sending the replaced response data byte stream to the master control system, or discarding the character string corresponding to the target identification string in the response data byte stream, and sending the response data byte stream without the character string corresponding to the target identification string to the master control system.
Through the steps S104 to S105, monitoring and management of the upper data byte stream can be realized. Through the upper filtering and replacing of the steps S104 to S105 and the lower filtering and replacing of the steps S101 to S103, monitoring, management and filtering of bidirectional communication between the main control system 100 and the mobile communication module 200 in fig. 1 can be realized, comprehensive simulation of a specific communication network is realized, and effectiveness of testing a mobile communication driver in the main control system 100 is improved.
In a specific embodiment, the process of step S102 and step S may be implemented by the following sub-steps, that is, implementing a process of determining whether the lower data byte stream or the upper data byte stream includes the target identification string:
step S101': whether the lower data byte stream or the upper data byte stream contains a continuous character string having the same length and content as the target identification string is judged. When the lower data byte stream or the upper data byte stream contains a continuous character string with the same length and content as the target identification string, executing step S102'; when the lower data byte stream or the upper data byte stream does not contain a continuous character string having the same length and content as the target identification string, it may be determined that the data byte stream does not contain the target identification string, and the process returns to step S101, so as to continue monitoring the data byte stream (including the lower data byte stream and the upper data byte stream).
Specifically, to increase the flexibility of filtering and simulation testing, the target identification string may contain wildcards. In general, characters that do not appear in the target identification string should be used as wildcards. Accordingly, in step S101', when determining whether the content of the continuous character string is the same as the content of the target identification string, it may be determined byte by byte whether the characters in the continuous character string are equal to two characters at the corresponding position in the target identification string, and when determining whether the characters are equal to two characters, the equality of the wildcard manner is also included.
Step S102': and judging whether the time interval between each adjacent character is less than or equal to the preset effective character interval when the continuous character string is received. When the time interval between each adjacent character is less than or equal to the preset effective character interval when the continuous character string is received, executing step S103'; when the time interval between any two adjacent characters in the received continuous character string is greater than the preset effective character interval, it can be determined that the data byte stream does not contain the target identification string, and the step S101 is returned, so that the monitoring of the lower data byte stream or the upper data byte stream is continued.
Step S103': and judging whether the time interval between the continuous character string and the next adjacent character is larger than or equal to the preset minimum silent time or not. When the time interval between the continuous character string and the next adjacent character is greater than or equal to the preset minimum silent time and the time interval between each adjacent character when the continuous character string is received is less than or equal to the preset effective character interval, executing step S104'; when the time interval between the consecutive character string and the next adjacent character is less than the preset minimum silent time, it may be determined that the data byte stream does not contain the target identification string, and the process returns to step S101, so as to continue to monitor the lower data byte stream or the upper data byte stream.
Step S104': and determining that the lower data byte stream or the upper data byte stream comprises the target identification string, wherein the continuous character string is the target identification string. Correspondingly, after the step S104' is executed, the lower filtering and replacing described in the step S103 may be further executed, or the upper filtering and replacing described in the step S104 to the step S105 may be further executed, so as to implement the communication adaptability test in the specific communication environment.
It should be noted that the method for testing the mobile communication driver provided in the embodiment of the present application may detect and replace or discard one target identification string, or may detect and replace or discard multiple target identification strings at the same time. When a plurality of target identification strings are detected, the detection can be performed in a mode of sequentially traversing each target identification string. In addition, the method for testing the mobile communication driver provided by the embodiment of the application can continuously detect the lower data byte stream and/or the upper data byte stream, and when the detection of all the lower data byte streams and/or the upper data byte streams is finished through traversal, or after an instruction for finishing the test is received, the test can be terminated.
According to the method for testing the mobile communication driver, when the continuous character strings in the lower data byte stream or the upper data byte stream are matched with the target identification strings, on one hand, matching is conducted from the length and the byte content, on the other hand, effective character intervals and minimum silent time are introduced, so that an aging detection mechanism is added in the matching process, guarantee is provided for accurate retrieval of the target identification strings, misdetection and misreplacement operation can be avoided, the testing accuracy is guaranteed, and the testing applicability is enhanced.
To more clearly illustrate how to perform aging detection on string matching using the valid character interval and the minimum silent time, the following explanation is given by taking the schematic diagram of the characters and their receiving times shown in fig. 4 as an example, on the premise that the length and each character value of the string are consistent with the set target identification string.
Assume that the target identification string is "ATH 0", the valid character interval is 10 msec, and the minimum silence time is 30 msec. With the consecutive character string (1) shown in fig. 4, since the length of the reception interval between the adjacent characters 'a' and 'T' is 20 milliseconds longer than the valid character interval by 10 milliseconds, although each character value in the consecutive character string (1) coincides with the set target identification string, the consecutive character string (1) is not a valid identification string due to the problem of the valid character interval being exceeded.
For the consecutive character string (2) shown in fig. 4, each character interval is less than 10 milliseconds of the valid character interval, and no other received character appears 30 milliseconds after the last character '0', so the consecutive character string (2) is a valid identification string, and the consecutive character string (2) can be used as a target identification string.
For the consecutive string (3) shown in fig. 4, the consecutive string (3) is not a valid identification string because the next character 'a' is received about 15 milliseconds after its last character '0', which does not meet the requirement of a minimum silence time of 30 milliseconds.
For the continuous string (4) shown in fig. 4, the next character 'a' is received about 35 ms after the last character '0', which meets the requirement of 30 ms of minimum silence time, so that the continuous string (4) is a valid identification string, and the continuous string (4) can be used as the target identification string.
As an example, a filter program for implementing the test method shown in fig. 2 or 3 may be loaded in the filter device 300 shown in fig. 1, thereby implementing the test of the mobile communication driver in the main control system 100. In one embodiment, the filter program loaded in the filtering apparatus 300 may be composed of a variable definition and initialization module, a control variable setting module, an upper port driver module, a lower port driver module, and a filtering and replacing module, wherein the filtering and replacing module is a core module.
Through the variable definition and initialization module, and the control variable setting module, control variables for subsequent filtering operations may be defined in the filter program in the filtering apparatus 300. The control variables are divided into two categories, namely variables for identification string retrieval recognition and variables for replacing the target identification string. The target identification string is a specific data string which is sent to the main control module by the mobile communication module and is replaced by the filter program in order to simulate a certain communication scene.
Meanwhile, the target identification string can also be a continuous character stream which contains special content in the data byte stream, can be distinguished from other irrelevant data and can be monitored and recognized by the filter management program. According to the working state (command state and data state) of the mobile communication module, the target identification string comprises an identification string of the command state and an identification string of the data state.
The filter replacement string is a string to which a string transmitted from the mobile communication module to the master control system is to be replaced. For example, the character string sent by the mobile communication module is "\\ \ nNO CARRIER \ r \ n", the corresponding filtering substitution string is "\\ \ nCONNECT \ r \ n", and the character string sent to the main control system is "\ r \ nCONNECT \ r \ n".
Specifically, when defining a target identification string, a two-dimensional character array variable of the target identification string may be defined, the size of the two-dimensional character array variable is N × M, and both N and M are agreed according to the test requirement, where M is the maximum number of bytes of a single identification string, and a typical value is 20; n is the total number of identification strings that can be filtered in parallel, is an integer greater than or equal to 1, and typically takes values of 10, 30, and the like. Optionally, the identification string may support wildcards; whether the wildcard is enabled or not and which character is adopted as the wildcard can be determined by self according to the test requirement, and in principle, characters which do not appear in the identification string should be selected as the wildcard. For example: wildcards can be enabled, taking the character' as a wildcard. Here, a wildcard is a symbol that can replace and be equal to an arbitrary character for relaxing the matching condition of individual characters in an identification string. If the wildcard matching mode is enabled, the wildcard in the set identification string is equal to any received character when the identification string is searched, and the description is not repeated.
An integer array variable defining the length of the target identification string, the number of elements of which is N. Each element indicates the actual effective length of the corresponding target identification string in bytes.
And defining a character array variable of the target identification string type, wherein the element number of the character array variable is N. Each element indicates a type of the corresponding target identification string. The types are divided into two types: an upper identification string and a lower identification string. The upper identification string refers to a target identification string sent to the filtering device by the master control system, and the lower identification string refers to a target identification string sent to the filtering device by the mobile communication module. The two types can be represented with different encodings, for example: and using 'U' to represent an upper identification string, and using 'D' to represent a lower identification string.
The Boolean type array variable for defining the filtering enable control has N elements. Each element indicates a filtering enable control of the corresponding identification string. The values are two kinds: enable and disable. The value 1 represents 'enable', and the value 0 represents 'not enable'.
An integer variable defining the valid character interval of the target identification string, which is used to indicate the maximum time interval in milliseconds allowed between each received character when listening to the corresponding identification string, for example: 10 milliseconds. When greater than the time interval, the character sub-string that is heard is not a valid identification string. The value of this variable should be greater than 0.
An integer variable defining a minimum silent time of the target identification string, which is used to indicate a minimum duration in milliseconds after monitoring reception of the corresponding identification string, where no other data can be received on the receiving channel, for example: 30 milliseconds. If data is received again within the silent time limit, the received identification string is not a valid identification string; if no data is received within the silent period, the most recently received identification string is a valid identification string. If there is no requirement for a silent time limit in the current test case, the variable may be set to 0.
In defining the filtered replacement string, an integer variable of character timeout of the replaced string may be defined for indicating that each character of the lower replaced string is received timeout after a valid upper filtered string is detected, for example: 100 milliseconds. If the next character is not received after the overtime is reached, the filtering replacement program automatically submits the replacement string which is not sent to the upper port driver, and the replacement string is sent to the main control system. The value of this variable should be greater than 0.
A two-dimensional character array variable for the filtered replacement string is defined, with an initial value of zero and a size of N × I, where N is the same convention as above, and I is the maximum number of bytes of a single replacement string, generally the same as the constant M, and typically takes a value of 20.
An integer array variable for filtering the length of the replacement string is defined, the initial value is zero, and the number of elements is N. Each element indicates the actual effective length in bytes of the corresponding filter replacement string.
After the control variable setting subprogram codes for setting the control variables are realized and operated, the variables can be set through an input/output module such as a touch screen, or a screen, a keyboard, a communication port and the like.
The upper port driving module is responsible for receiving data from the main control system, putting the received data into the tail of an upper receiving cache queue according to the operation requirement of a data queue FIFO, and sending the data to be sent submitted by the filtering and replacing module back to the main control system. The lower port driving module is responsible for receiving data from the mobile communication module, placing the received data at the tail of the lower receiving cache queue, and forwarding the upper data submitted by the filtering and replacing module and received from the main control system to the mobile communication module.
The operation flow of the filtering and replacing module is as follows:
a.1 defines the following variables to simplify the subsequent filtering search process.
And defining a sequence number variable of the identification strings, setting the sequence number variable as n, and initializing the sequence number variable to be 0 for circularly searching all target identification strings.
Defining identification string matching character counting array variable, setting it as m [ N ], and initializing it to all 0, which is used to indicate the number of characters matched currently by a single target identification string in the monitoring process. Here, N is the total number of previously agreed identification strings that can be filtered in parallel.
Defining a cache queue variable of the matched character string, setting the cache queue variable as H, emptying the queue, and performing temporary storage operation when filtering the lower identification string. The matched character string cache queue is only used for temporarily storing the lower identification strings and is not used for filtering the upper identification strings. Because the filtering of the upper identification strings is different from the filtering of the lower identification strings: when the upper identification string is filtered, the filtering equipment immediately forwards the received character to the mobile communication module; when the lower identification string is filtered, if the received characters are matched with the head of the lower identification string, the characters are put into an 'identical character string cache queue' for temporary storage, and if the matching condition or the aging condition is not met in the later monitoring process, the filtering equipment sends the temporarily stored characters to the master control system.
Defining an upper identification string finding mark variable, setting the upper identification string finding mark variable as Fu, and clearing the upper identification string finding mark variable to be zero, wherein the upper identification string finding mark variable is used for indicating whether a complete upper identification string is found or not, and when the upper identification string finding mark variable is 0, the upper identification string finding mark variable indicates that the complete upper identification string is found, and when the upper identification string finding mark variable is 1, the complete upper identification string is found. The found upper identification string index variable is defined and set to nFu to indicate that the found upper identification string corresponds to a sequence number in the filter identification array.
Defining a lower identification string finding flag variable, setting the lower identification string finding flag variable to be Fd, and clearing the lower identification string finding flag variable to be zero for indicating whether a complete lower identification string is found, wherein the lower identification string finding flag variable indicates that the lower identification string is not found when the lower identification string is 0, and the lower identification string finding flag variable indicates that a complete lower identification string is found when the lower identification string is 1. The found next-lower identification string index variable is defined and set to nFd indicating that the found next-lower identification string corresponds to a sequence number in the filter identification array.
A.2, checking whether the upper receiving buffer queue has data, if not, switching to A.8 and carrying out aging treatment; if the data exists, a character is taken out from the head of the upper receiving buffer queue, and the character is submitted to the lower port driving module to be sent to the mobile communication module.
A.3, if the current target identification string is not an upper identification string or filtering is not enabled, namely: and if the FilterIdType [ n ] is not equal to 'U' and the FilterEnable [ n ] is equal to 0, turning to A.6 and continuing to search the next target identification string.
A.4 the length comparison and flag and count process described below was performed.
Comparing the matched character count m [ n ] with a target identification string length variable FilterIdLen [ n ], if the matched character count m [ n ] is equal to the target identification string length variable FilterIdLen [ n ], clearing an upper identification string finding mark if the identification string just received does not reach the silent time duration, namely: fu is 0; clearing the current coincident character count m [ n ], namely: and m [ n ] ═ 0. If the received string reaches the silent time duration, step a.9 is performed.
A.5, comparing the extracted character with the current identification string corresponding to the sequence number n:
if the current identification string is an upper identification string and filtering is enabled, namely: FilterIdType [ n ] equals 'U' and FilterEnable [ n ] equals 1, then the retrieved character is compared to FilterIdStr [ n ] [ i ], where i equals the tally character count for the current identification string, i.e.: i is m [ n ].
Then, according to the comparison result, the following processing is carried out:
if the number of the characters is not equal to the initial character of the current identification string, the number of the coincident characters of the current identification string is modified into 1, namely: then go to next step A.6 if mn is 1;
if the current identification string is not equal to the initial character of the current identification string, the matched character count of the current identification string is reset, namely: then go to next step A.6 if mn is 0;
if the current identification string is equal to the current identification string, the matched character count of the current identification string is increased by one, namely: m [ n ] + 1. Thereafter, the matched character count m [ n ] is compared to a target identification string length variable FilterIdLen [ n ]. If the current count has reached the set target tag string length, then: and m [ n ] ═ filterldlen [ n ], the position identification string found flag is 1, that is: fu is 1.
A.6 increments the identification string number variable n by one, i.e., n ═ n + 1.
A.7, checking whether the identification string is completely traversed, namely: whether N is equal to N. N equal to N indicates the cumulative count N +1 times and the traversal is complete. The whole traversal process is to match the currently received character stream with all target identification strings byte by byte, and the cyclic retrieval process is performed at most N times.
And if the traversal is not completed, turning to A.3, and comparing the next identification string and performing corresponding operation.
If the traversal is completed, the next step is continued.
And A.8, calculating the time Tu consumed by the last time the character is taken out from the upper receiving buffer queue to the current moment.
A.9 checks minimum quiet time:
if Tu is greater than or equal to the minimum quiet time of the target identification string and the upper identification string discovery flag is set, that is: if Tu > is filterleasesilence, Fu > is 1, which indicates that a valid matching identification string has been retrieved, then n is assigned to the found upper identification string label variable, that is: nFu ═ n; and (3) resetting the coincidence character count of the current identification string, namely: m [ n ] is 0; then, the process goes to A.11 to perform the replacement transmission process.
A.10 check valid character spacing:
if Tu is less than or equal to the valid character interval of the target identification string, then: and if the Tu is less than the Filter ValidCharnterval, switching to A.16 and carrying out lower identification string filtering operation.
If Tu is greater than the valid character interval of the target identification string and the upper identification string discovery flag is not set, that is: and if the Tu > FilterValidCHARInterval and Fu are equal to 0, resetting all the elements of the upper counting number in the character counting array with the matched identification string, and then turning to A.16 to perform lower identification string filtering operation.
A.11 performs preparation before the replacement string transmission processing: and assigning the current moment to a variable t0, and clearing the character counting variable Sn.
A.12, checking whether the lower receiving buffer queue has data, and processing as follows:
if there is no data, check if it has timed out: calculating the difference value obtained by subtracting T0 from the new current time to obtain time consumption Ts; comparing the consumed time Ts with a replaced string character overtime variable ReleaseCharrTimeout, and if the Ts is less than ReleaseCharrTimeout, jumping to the beginning of A.12 and continuing to execute; and if Ts > is equal to RelacedCharrTimeout, submitting the rest replacement strings which are not sent to an upper port driver and sending the replacement strings to the master control system. The remaining replacement strings are substrings from the string ReplaceStr [ nFu ] starting with the sequence number Sn character and ending with the tail sequence number ReplaceStrLen [ nFu ] -1-Sn.
If so, executing the next step.
A.13 submits a current character replace str [ nFu ] [ Sn ] in the filtering replacement string to an upper port driving module and sends the current character replace str to a main control system.
A.14 increments the character count variable Sn by one, i.e.: sn ═ Sn + 1.
A.15 check if the replacement string has been sent:
if Sn is less than RelaceTrLen [ nFu ], indicating that the replacement string is not sent completely, then the A.12 switch continues to execute the lower reception processing.
If Sn is equal to RelaceStren [ nFu ], indicating that the replacement string has been sent, then the bit identification string found flag is cleared, i.e.: fu is equal to 0, and the next lower identification string filtering operation is continued.
A.16 clears the identification string sequence number variable n.
A.17, checking whether the lower receiving buffer queue has data or not, if not, switching to A.24 and carrying out aging treatment; if the data exists, a character is taken out from the head of the lower receiving buffer queue.
A.18 if the current identification string is not a lower identification string or filtering is not enabled, namely: and if the FilterIdType [ n ] is not equal to 'D' and the FilterEnable [ n ] is equal to 0, turning to A.21 and continuing to retrieve the next identification string.
A.19 length comparison and buffer release treatments were performed as described below.
Comparing the matched character count m [ n ] with the target identification string length variable FilterIdLen [ n ], if the matched character count m [ n ] is equal to the target identification string length variable FilterIdLen [ n ], clearing the identification string discovery mark if the identification string just discovered does not reach the silent time duration, namely: fd-0; clearing the current matched character count m [ n ], namely: m [ n ] is 0; and checking all the lower identification string matching character counting elements, if all the lower identification string matching character counting elements are zero, taking out all the data temporarily stored in the matching character string cache queue, submitting the data to the upper port driving module, sending the data to the main control system, and emptying the cache queue after taking out the data.
A.20 performs the following character comparison processing.
Comparing the extracted character with a current identification string FilterIdStr [ n ] [ i ] corresponding to the serial number n, wherein i is equal to the coincidence character count of the current identification string, namely: i is m [ n ].
Then, according to the comparison result, the following processing is carried out:
if the current identification string is not equal to the initial character of the current identification string, the matching character count of the current identification string is modified to be 1, namely: then go to next step A.21;
if the current identification string is not equal to the initial character of the current identification string, the matched character count of the current identification string is reset, namely: then go to next step A.21;
if the current identification string is equal to the current identification string, the matched character count of the current identification string is increased by one, namely: m [ n ] + 1. Thereafter, the matched character count m [ n ] is compared to a target identification string length variable FilterIdLen [ n ]. If the current count has reached the set target identification string length, then: and m [ n ] ═ filterldlen [ n ], then the lower identification string found flag is 1, that is: fd is 1.
A.21 increments the identification string number variable n by one, i.e., n equals n + 1.
A.22 checks whether the identification string has been traversed to completion, i.e.: whether N is equal to N.
If not, turning to A.18, and comparing the next identification string and performing corresponding operation.
If the traversal is completed, the next step is continued.
A.23, checking the coincidence character counting elements of all the lower identification strings, if all the coincidence character counting elements are zero, submitting the extracted characters to an upper port driver, and sending the characters to a master control system; otherwise, the character is temporarily stored into the matched character string buffer queue in a tail adding mode.
A.24 calculates the time Td taken to fetch the character from the lower receive buffer queue the last time to the present time.
A.25 checks the minimum silence time:
if Td is greater than or equal to the minimum quiet time of the target tag string and the lower tag string found flag is set, then: if Td > is filterleasesilence, Fd is 1, then n is assigned to the found lower id string index variable, i.e.: nFd, n, and then the alternate transmission process is performed.
Submitting a replacement string RelaceStrer [ nFd ] with the length of RelaceStren [ nFd ] to an upper port drive module, and sending the replacement string RelaceStrer [ nFd ] to a main control system; and (3) resetting the coincidence character count of the current identification string, namely: m [ n ] is 0; and then, converting to A.2, and carrying out upper identification string filtering operation.
A.26 check valid character spacing:
if Td is larger than the effective character interval of the target identification string, the lower identification string is not set, and the cache queue of the matching character string is not empty, namely: if Td is greater than Filter ValidCHARInterval, Fu is equal to 0, and H length is equal to 0, clearing all elements of lower counts in the identification string matching character count array, taking out all data temporarily stored in the matching character string cache queue, submitting the data to an upper port driving module, sending the data to a main control system, and emptying the cache queue after taking out; then the next step is carried out.
And in all other cases, converting to A.2, and performing upper identification string filtering operation.
According to the method for testing the mobile communication driver, the target identification string in the lower data byte stream is replaced or discarded correspondingly, so that the communication condition of the detected mobile communication driver in a specific network environment can be simulated, and the mobile communication driver can be tested. If the mobile communication module responds to the same command or request sent by the main control system differently in different network environments, the specific content of the output information or the response information of the mobile communication module in a specific network environment is known. Accordingly, the method for testing the mobile communication driver provided by the embodiment of the application can simulate a specific test environment seen from the main control system by configuring different target identification strings and operation modes thereof and executing a given test flow, and complete the adaptability test of the mobile communication driver in the corresponding environment. The method for testing the mobile communication driver provided by the embodiment of the application does not or does not need to really change the network environment of the mobile communication module, but utilizes the existing network environment to change the data received by the main control system from the mobile communication module, so that the main control system obtains the same operation result as that under the assumed network environment, and the purpose of completing the adaptability test is achieved. Therefore, the material and time cost of the test can be greatly saved, and the effectiveness of the test is enhanced.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
An embodiment of the present application further provides a terminal device, as shown in fig. 5, where the terminal device may include: a listening unit 501 and a replacement unit 502.
The monitoring unit 501 is configured to monitor a data byte stream of the mobile communication module under test; the data byte stream comprises a lower data byte stream to be sent to a corresponding main control system by the tested mobile communication module and an upper data byte stream to be sent to the mobile communication module by the main control system; the corresponding working process can be referred to as step S101 in the above method embodiment.
When the data byte stream includes the target identification string and the data byte stream is the lower data byte stream, the replacing unit 502 is configured to replace the target identification string in the lower data byte stream with a preset replacing byte string and send the replaced lower data byte stream to the master control system, or discard the target identification string in the lower data byte stream and send the lower data byte stream not including the target identification string to the master control system; the corresponding working process can be referred to the steps S102 to S103 in the above method embodiment.
Optionally, when the data byte stream includes the target identification string and the data byte stream is an upper data byte stream, the replacing unit 502 may be further configured to send the upper data byte stream to the mobile communication module, acquire a response data byte stream corresponding to the upper data byte stream, replace the character string corresponding to the target identification string in the response data byte stream with a preset replacement byte string, and send the replaced response data byte stream to the main control system, or discard the character string corresponding to the target identification string in the response data byte stream, and send the response data byte stream that does not include the character string corresponding to the target identification string to the main control system; the corresponding working process can be referred to the steps S104 to S105 in the above method embodiment.
Fig. 6 is a schematic diagram of another terminal device according to an embodiment of the present application. As shown in fig. 6, the terminal device 600 of this embodiment includes: a processor 601, a memory 602 and a computer program 603, e.g. a program for testing a mobile communication driver, stored in said memory 602 and executable on said processor 601. The processor 601, when executing the computer program 603, implements the steps in the various method embodiments for testing mobile communication drivers described above, such as steps S103 to S103 shown in fig. 2. Alternatively, the processor 601, when executing the computer program 603, implements the functions of each module/unit in each device embodiment described above, for example, the functions of the listening unit 501 and the replacing unit 502 shown in fig. 5.
The computer program 603 may be partitioned into one or more modules/units that are stored in the memory 602 and executed by the processor 601 to complete the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 603 in the terminal device 600. For example, the computer program 603 may be partitioned into a synchronization module, a summarization module, an acquisition module, a return module (a module in a virtual device).
The terminal device 600 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 601, a memory 602. Those skilled in the art will appreciate that fig. 6 is merely an example of a terminal device 600, and does not constitute a limitation of terminal device 600, and may include more or fewer components than shown, or some of the components may be combined, or different components, e.g., the terminal device may also include input-output devices, network access devices, buses, etc.
The Processor 601 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 602 may be an internal storage unit of the terminal device 600, such as a hard disk or a memory of the terminal device 600. The memory 602 may also be an external storage device of the terminal device 600, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the terminal device 600. Further, the memory 602 may also include both an internal storage unit and an external storage device of the terminal device 600. The memory 602 is used for storing the computer programs and other programs and data required by the terminal device. The memory 602 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the present application. For the specific working processes of the units and modules in the system, reference may be made to the corresponding processes in the foregoing method embodiments, which are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. . Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer-readable medium may contain suitable additions or subtractions depending on the requirements of legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer-readable media may not include electrical carrier signals or telecommunication signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the present application, and they should be construed as being included in the present application.

Claims (9)

1. A method of testing a mobile communications driver, comprising:
monitoring a data byte stream of a tested mobile communication module; the data byte stream comprises a lower data byte stream to be sent to a corresponding main control system by the tested mobile communication module and an upper data byte stream to be sent to the mobile communication module by the main control system;
when the data byte stream comprises a target identification string and the data byte stream is a lower data byte stream, replacing the target identification string in the lower data byte stream with a preset replacement byte string and sending the replaced lower data byte stream to the master control system, or discarding the target identification string in the lower data byte stream and sending the lower data byte stream without the target identification string to the master control system;
the method for testing the mobile communication driver further comprises the following steps:
when the data byte stream comprises a target identification string and is an upper data byte stream, sending the upper data byte stream to the mobile communication module;
acquiring a response data byte stream corresponding to the upper data byte stream; the response data byte stream is a data byte stream fed back by the mobile communication module according to the upper data byte stream;
and replacing the response character string corresponding to the target identification string in the response data byte stream with a preset replacement byte string, and sending the replaced response data byte stream to the master control system, or discarding the response character string corresponding to the target identification string in the response data byte stream, and sending the response data byte stream without the response character string to the master control system.
2. The method of testing a mobile communications driver as claimed in claim 1, wherein determining whether the stream of data bytes includes a target identification string comprises:
judging whether the lower data byte stream or the upper data byte stream contains continuous character strings with the same length and content as the target identification strings;
and when the lower data byte stream or the upper data byte stream contains a continuous character string with the same length and content as the target identification string, determining that the lower data byte stream or the upper data byte stream contains the target identification string, and the continuous character string is the target identification string.
3. The method of testing a mobile communications driver of claim 2, wherein prior to said determining that a target identification string is included in said lower data byte stream or said upper data byte stream, said determining whether a target identification string is included in said data byte stream further comprises:
judging whether the time interval between each adjacent character is smaller than a preset effective character interval when the continuous character string is received;
and when the time interval between each adjacent character is smaller than or equal to a preset effective character interval when the continuous character string is received, determining that the lower data byte stream or the upper data byte stream comprises a target identification string, wherein the continuous character string is the target identification string.
4. The method of testing a mobile communications driver of claim 3, wherein prior to said determining that a target identification string is included in said lower data byte stream or said upper data byte stream, said determining whether a target identification string is included in said data byte stream further comprises:
judging whether the time interval between the continuous character string and the adjacent next character is larger than a preset minimum silent time or not;
and when the time interval between the continuous character string and the next adjacent character is greater than or equal to a preset minimum silent time and the time interval between each adjacent character is less than or equal to a preset effective character interval when the continuous character string is received, determining that the lower data byte stream or the upper data byte stream comprises a target identification string and the continuous character string is the target identification string.
5. The method of testing a mobile communications driver of claim 4, wherein said determining whether a target identification string is included in said stream of data bytes further comprises:
and when the time interval between any two adjacent characters is larger than a preset effective character interval when the continuous character string is received, or the time interval between the continuous character string and the next adjacent character is smaller than a preset minimum silent time, or the lower data byte stream or the upper data byte stream does not contain the continuous character string with the same length and content as the target identification string, determining that the data byte stream does not contain the target identification string.
6. The method of testing a mobile communications driver according to any one of claims 2 to 5, wherein the target identification string comprises a wildcard.
7. A terminal device, comprising:
the monitoring unit is used for monitoring the data byte stream of the tested mobile communication module; the data byte stream comprises a lower data byte stream to be sent to a corresponding main control system by the tested mobile communication module and an upper data byte stream to be sent to the mobile communication module by the main control system;
a replacing unit, configured to, when the data byte stream includes a target identification string and the data byte stream is a lower data byte stream, replace the target identification string in the lower data byte stream with a preset replacement byte string and send the lower data byte stream after replacement to the master control system, or discard the target identification string in the lower data byte stream and send the lower data byte stream that does not include the target identification string to the master control system;
the replacing unit is further configured to send the upper data byte stream to the mobile communication module when the data byte stream includes a target identification string and the data byte stream is the upper data byte stream; acquiring a response data byte stream corresponding to the upper data byte stream; the response data byte stream is a data byte stream fed back by the mobile communication module according to the upper data byte stream; and replacing the response character string corresponding to the target identification string in the response data byte stream with a preset replacement byte string, and sending the replaced response data byte stream to the master control system, or discarding the response character string corresponding to the target identification string in the response data byte stream, and sending the response data byte stream without the response character string to the master control system.
8. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor realizes the steps of the method according to any of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of a method according to any one of claims 1 to 6.
CN201910637010.9A 2019-07-15 2019-07-15 Method for testing mobile communication driver, terminal device and storage medium Active CN110489331B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910637010.9A CN110489331B (en) 2019-07-15 2019-07-15 Method for testing mobile communication driver, terminal device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910637010.9A CN110489331B (en) 2019-07-15 2019-07-15 Method for testing mobile communication driver, terminal device and storage medium

Publications (2)

Publication Number Publication Date
CN110489331A CN110489331A (en) 2019-11-22
CN110489331B true CN110489331B (en) 2022-08-30

Family

ID=68547191

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910637010.9A Active CN110489331B (en) 2019-07-15 2019-07-15 Method for testing mobile communication driver, terminal device and storage medium

Country Status (1)

Country Link
CN (1) CN110489331B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262304A (en) * 2008-04-24 2008-09-10 浙江大学 A data stream parsing method based on universal communication data format
CN105162673A (en) * 2015-08-24 2015-12-16 北京大众益康科技有限公司 Data transmission interface and method
CN107147553A (en) * 2017-05-10 2017-09-08 深圳市亿维自动化技术有限公司 Method of adjustment, adjusting apparatus and the adjusting device of slave station baud rate and frame format
CN109981599A (en) * 2019-03-06 2019-07-05 南京理工大学 A kind of the general-purpose data parsing platform and method of communication data stream

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7746797B2 (en) * 2002-10-09 2010-06-29 Nortel Networks Limited Non-intrusive monitoring of quality levels for voice communications over a packet-based network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262304A (en) * 2008-04-24 2008-09-10 浙江大学 A data stream parsing method based on universal communication data format
CN105162673A (en) * 2015-08-24 2015-12-16 北京大众益康科技有限公司 Data transmission interface and method
CN107147553A (en) * 2017-05-10 2017-09-08 深圳市亿维自动化技术有限公司 Method of adjustment, adjusting apparatus and the adjusting device of slave station baud rate and frame format
CN109981599A (en) * 2019-03-06 2019-07-05 南京理工大学 A kind of the general-purpose data parsing platform and method of communication data stream

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
多仪器测试系统及其串行通信驱动程序的开发应用;赵伟,易红,王宏伟;《鱼雷技术》;20070430;第1-3页 *

Also Published As

Publication number Publication date
CN110489331A (en) 2019-11-22

Similar Documents

Publication Publication Date Title
CN107608750B (en) Device for pattern recognition
KR101648235B1 (en) Pattern-recognition processor with matching-data reporting module
US20210279074A1 (en) Overflow detection and correction in state machine engines
CN108255602B (en) Task combination method and terminal equipment
US20160104068A1 (en) Match engine for detection of multi-pattern rules
JP2004013896A (en) Tracing of instruction in data processing system
US20060256879A1 (en) Rapid I/O Traffic System
CN112069040B (en) Hard disk lighting method and device and related components
CN110201393A (en) Configuration data storage method and device and electronic equipment
CN110830234A (en) User traffic distribution method and device
CN109359027B (en) Method and device for Monkey test, electronic equipment and computer readable storage medium
CN109739712A (en) FPGA accelerator card transmission performance test method, device and equipment and medium
CN109471862A (en) Data processing method and device, electronic equipment, storage medium
CN110489331B (en) Method for testing mobile communication driver, terminal device and storage medium
WO2011008963A2 (en) Inserting a gap in information sent from a drive to a host device
CN110602166A (en) Method, terminal device and storage medium for solving problem of repeated data transmission
CN108234687B (en) Intelligent IP address configuration method and device and terminal equipment
CN116795752B (en) Interface communication method, device and server
CN117278890A (en) Optical module access method, device and system, electronic equipment and readable storage medium
CN111966846A (en) Image query method and device, electronic equipment and storage medium
US9769093B2 (en) Apparatus and method for performing InfiniBand communication between user programs in different apparatuses
CN114637574A (en) Data processing method, device and system based on paravirtualization equipment
CN110347683B (en) Data table merging processing method and device
CN110225025B (en) Method and device for acquiring abnormal network data behavior model, electronic equipment and storage medium
CN115904488A (en) Data transmission method, system, device and equipment

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