CN113825166B - Base station testing method and device, electronic equipment and storage medium - Google Patents

Base station testing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113825166B
CN113825166B CN202010562183.1A CN202010562183A CN113825166B CN 113825166 B CN113825166 B CN 113825166B CN 202010562183 A CN202010562183 A CN 202010562183A CN 113825166 B CN113825166 B CN 113825166B
Authority
CN
China
Prior art keywords
message structure
file
target
base station
target file
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
CN202010562183.1A
Other languages
Chinese (zh)
Other versions
CN113825166A (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.)
Datang Mobile Communications Equipment Co Ltd
Original Assignee
Datang Mobile Communications Equipment 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 Datang Mobile Communications Equipment Co Ltd filed Critical Datang Mobile Communications Equipment Co Ltd
Priority to CN202010562183.1A priority Critical patent/CN113825166B/en
Publication of CN113825166A publication Critical patent/CN113825166A/en
Application granted granted Critical
Publication of CN113825166B publication Critical patent/CN113825166B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application provides a base station testing method, a base station testing device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a target file in a base station, wherein the target file comprises a message structure used for communication of the base station; extracting a message structure conforming to a preset rule from the target file; if the message structure conforming to the preset rule exists in the target file, generating an analysis function for analyzing the message structure; and sending the analysis function to a testing end to analyze the target message obtained by the test to obtain test result data. The method and the device can reduce labor cost, avoid analysis errors or analysis failures, and improve analysis efficiency.

Description

Base station testing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of mobile communications technologies, and in particular, to a base station testing method, a base station testing device, an electronic device, and a storage medium.
Background
In the field of mobile communication technology, in order to ensure normal operation of a base station, the base station may be tested in advance, and the abnormality may be handled when the test result is that the base station is abnormal. In the process of testing the base station, the communication mode between the test terminal and the base station mainly comprises: the method comprises the steps of transmitting binary code stream communication modes based on SNMP (Simple Network Management Protocol ) and GTSA (General Test System Agent, general test system proxy interface), wherein the SNMP communication mode triggers one-time test according to protocol requirements to reply data, the message quantity is small, the method is generally suitable for laboratory test and error use of users, and the requirements of SNMP are strictly followed, so that the data format is limited, the SNMP communication mode is less, the GTSA binary code stream transmission communication mode is more, the GTSA binary code stream transmission communication mode transmits target files in a base station to a test end in the form of binary code streams, and when the test end receives tested target messages, the test end firstly obtains analysis rules corresponding to the target messages from the target files containing the analysis rules as target analysis rules; and then analyzing the target message by adopting the target analysis rule to obtain analysis result data. The target file is obtained from the base station, and after the target file in the base station is updated, a developer at the testing end is required to combine the target file into the testing end.
After the applicant researches the communication mode based on the GTSA transmission binary code stream, the target file of the test end needs to be updated along with the updating of the target file in the base station, and a developer is required to be combined into the test end, so that the labor cost is high, and if the tester does not update the target file of the test end in time, the analysis fails or is wrong; in addition, the test end needs to compare the bytes in the target file with the target message one by one so as to acquire the target analysis rule from the target file, which results in lower analysis efficiency.
Disclosure of Invention
In view of the foregoing, the present application has been made to provide a base station testing method, apparatus, electronic device, and storage medium that solve, or at least partially solve, the foregoing problems.
According to a first aspect of the present application, there is provided a base station testing method, including:
acquiring a target file in a base station, wherein the target file comprises a message structure used for communication of the base station;
extracting a message structure conforming to a preset rule from the target file;
if the message structure conforming to the preset rule exists in the target file, generating an analysis function for analyzing the message structure;
and responding to the test instruction aiming at the base station, analyzing the target message sent by the base station through the analysis function to obtain test result data, wherein the target message is returned by the base station aiming at the test instruction.
Optionally, the sending the parsing function to the testing end to parse the target message obtained by the testing to obtain testing result data includes:
compiling the analytic function to obtain a compiled code, wherein the compiled code comprises an analytic interface corresponding to the analytic function;
and sending the compiled code to a testing end so as to analyze the target message obtained by the test through an analysis interface in the compiled code to obtain test result data.
Optionally, after analyzing the target message obtained by the test to obtain the test result data, the method further includes:
storing the test result data into a test result file according to a preset format, wherein the test result file comprises at least one of the following components: table files, text files, graphic files.
Optionally, if the target file has a message structure that meets a preset rule, generating an parsing function that parses the message structure includes:
if the message structure conforming to the preset rule exists in the target file, storing the message structure;
and if the storage of the message structure is stopped, generating an analysis function for analyzing the message structure for the stored message structure.
Optionally, the acquiring the target file in the base station includes:
obtaining a target file in a base station according to target attribute information, wherein the target attribute information comprises at least one of the following: object extension, object type, object name.
Optionally, after extracting the message structure meeting the preset rule from the target file, the method further includes:
if the message structure which does not accord with the preset rule exists in the target file, generating prompt information to prompt that the message structure which does not accord with the preset rule exists in the target file.
According to a second aspect of the present application, there is provided a base station testing apparatus, comprising:
the target file acquisition module is used for acquiring a target file in a base station, wherein the target file comprises a message structure used for communication of the base station;
the message structure extraction module is used for extracting a message structure conforming to a preset rule from the target file;
the analysis function generation module is used for generating an analysis function for analyzing the message structure if the message structure conforming to the preset rule exists in the target file;
and the test module is used for responding to the test instruction aiming at the base station, analyzing the target message sent by the base station through the analysis function to obtain test result data, wherein the target message is returned by the base station aiming at the test instruction.
Optionally, the test module includes:
the compiling sub-module is used for compiling the analytic function to obtain a compiling code, wherein the compiling code comprises an analytic interface corresponding to the analytic function;
and the test sub-module is used for sending the compiled code to a test end so as to analyze the target message obtained by the test through an analysis interface in the compiled code to obtain test result data.
Optionally, the apparatus further comprises:
the test result file generation module is used for storing the test result data into a test result file according to a preset format, and the test result file comprises at least one of the following components: table files, text files, graphic files.
Optionally, the parsing function generation module includes:
the message structure storage sub-module is used for storing the message structure which accords with a preset rule if the message structure exists in the target file;
and the analysis function generation sub-module is used for generating an analysis function for analyzing the message structure for the stored message structure if the storage of the message structure is stopped.
Optionally, the target file obtaining module includes:
the target file acquisition sub-module is used for acquiring a target file in the base station according to target attribute information, wherein the target attribute information comprises at least one of the following: object extension, object type, object name.
Optionally, the apparatus further comprises:
and the prompting module is used for generating prompting information to prompt that the message structure which does not accord with the preset rule exists in the target file if the message structure which does not accord with the preset rule exists in the target file.
According to a third aspect of the present application, there is also provided an electronic device comprising a processor, a memory, a program or instructions stored on the memory and executable on said processor, which program or instructions when executed by the processor implement the steps of the above-described base station testing method.
According to a fourth aspect of the present application, there is also provided a readable storage medium having stored thereon a program or instructions which, when executed by a processor, implement the steps of the above-described base station testing method.
The embodiment of the application has the following advantages:
according to the base station testing method, the base station testing device, the electronic equipment and the storage medium, the target file in the base station can be directly obtained, the message structure conforming to the preset rule is extracted from the target file, so that the testing end can generate the analysis function of the message structure according to the preset rule, the analysis function is adopted to analyze the target message obtained by the test to obtain the test result, when any code file of the base station is changed, the analysis function can be regenerated, the problem that the base station and the testing end are not synchronous due to the use of the target file can be avoided, analysis failure or analysis error can be avoided, a manager of the base station can be prevented from manually merging the target file of the base station, and a developer of the testing end can be prevented from redevelopment, so that the labor cost is reduced; and the test end only needs to call the analysis function to analyze the target message, and byte comparison is not needed, so that the analysis efficiency can be improved.
The foregoing description is only an overview of the technical solutions of the present application, and may be implemented according to the content of the specification in order to make the technical means of the present application more clearly understood, and in order to make the above-mentioned and other objects, features and advantages of the present application more clearly understood, the following detailed description of the present application will be given.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 shows a flow chart of steps of an embodiment of a base station testing method according to the present application;
FIG. 2 shows a schematic diagram of a prior art test flow;
FIG. 3 shows a schematic diagram of a test flow of the present application;
FIG. 4 shows a schematic graph of a graphic file of the present application;
fig. 5 shows a block diagram of a base station testing apparatus according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a base station testing method according to the present application may specifically include the following steps:
step 101, obtaining a target file in a base station, wherein the target file comprises a message structure used for communication of the base station.
Embodiments of the present application may be applied to a base station, and it is understood that the steps of the present application may be performed by the base station.
In practical applications, a message sent by a base station to a mobile terminal during communication generally has a structure, which may be referred to as a message structure. The target file is any file containing the message structure, and the target file can be considered as a definition file of the message structure, and the target file is stored on the base station. The target file may be a file having certain characteristics. For example, the target file may be a file with a suffix of h, and the target file may also be a file with a file name containing a preset identifier, where the preset identifier may include at least one of the following: literal, numeric, alphabetic, special characters. For example, the preset identifier may be a character string "ALT" composed of letters.
And 102, extracting a message structure conforming to a preset rule from the target file.
The preset rule is used for limiting element items in the message structure so as to conveniently generate an analytic function. In practical application, the software of the base station is developed based on the C language, the message structure is defined by the C language specification, and the definition of the element items in the message structure is normalized by adopting a preset rule because the C language specification is flexible and changeable.
The preset rules may include, but are not limited to: rules based on the type of element item in the message structure, rules based on the format of the message structure. Wherein, the rule based on the element item type in the message structure is used for limiting the element item type in the message structure to be a unified type, the unified type is obtained by converting a basic type, and the conversion relationship between the basic type and the unified type can refer to table 1. Based on the unified type, if at least one element item type in one message structure is not the unified type, determining that the message structure does not accord with a preset rule; if all element item types in the message structure are uniform types, determining that the message structure accords with a preset rule. For example, for a message structure named UEINFO, three element items are included: MODE, IMSI, IMEI, MODE can be network type, IMSI (International Mobile Subscriber Identity ) is the identity of mobile phone card of the terminal, IMEI (International Mobile Equipment Identity ) is the identity of the terminal, if IMSI is of char type, it is not of unified type, thus judging that the message structure does not accord with preset rule.
In addition, table 2 also provides base types that are not allowed to be used, which do not have corresponding unified types. In addition, the rule based on the format of the message structure may be a limitation on the number of message structures defined in a single row, defining a line to define an element item, so as to determine that the message structure does not conform to a preset rule if two element items exist in a line in a message structure; if there is an element item in each row of the message structure, the multi-functional message structure accords with the preset rule. For example, if two element items a and b in a message structure are defined as follows: u32 a, b), this message structure is not in compliance with the preset rule, but it can be split into two rows to define two element items of the message structure:
u32 a;
u32 b;
the message structure of the element items defined in the mode accords with a preset rule.
TABLE 1
TABLE 2
In the application, the target file can be scanned, and when the message structure which does not accord with the preset rule exists in the target file, the prompt can be performed, so that the developer can conveniently and accurately position the target file and the message structure which do not accord with the preset rule, and the identification of the target file and the identification of the message structure can be prompted.
It can be understood that after the preset rule is defined, the development of the base station and the development of the testing end can be performed in parallel without mutual influence, and the development efficiency is effectively improved.
And step 103, if the message structure conforming to the preset rule exists in the target file, generating an analysis function for analyzing the message structure.
In the application, if a message structure conforming to a preset rule exists in the target file, generating an analysis function aiming at the message structure conforming to the preset rule, wherein the analysis function is used for carrying out message analysis according to the message structure so as to output message content corresponding to the message structure. Specifically, for each message structure, a name of the parsing function is first generated, the name may correspond to the name of the message structure, then the parsing function is constructed according to the name of the parsing function, and finally logic for parsing the message structure is implemented in the parsing function, for example, as the foregoing preset rule requires that only one element item can be defined for one line, so that the number of element items contained in the message structure may be determined according to the number of lines of the message structure, and a code for outputting the element item may be generated according to the type and name of each line.
And 104, sending the analysis function to a test end to analyze the target message obtained by the test to obtain test result data.
The target message is a message sent to the mobile terminal aiming at a test instruction base station, wherein the test instruction can be an instruction which is carried out by a tester on a test terminal and is used for requesting the test of the base station, and a user can select the base station to be tested from the test terminal and then click a test control to initiate the test instruction.
It can be understood that the target message is different according to the different test instructions, and if the test instruction is a test of the call, the target message may be a message containing call content and control information; if the test instruction is a test of radio bearer establishment, the target message may be information including an identification of the established radio bearer, or the like.
In the existing test flow shown in fig. 2, a manager of a base station needs to obtain a PL (Physical Layer) target file, a middle Layer code file and an HL (High Layer, also referred to as an application Layer) target file from the PL target file, the middle Layer target file and the HL target file respectively through a target file generating tool, and manually combine the PL target file, the middle Layer target file and the HL target file into a target file, then send the target file to a test end, a developer of the test end combines the target file to the test end, and the tester analyzes a target message through the target file to obtain test result data. When the error is analyzed, the method can feed back to the testing end, a developer at the testing end can detect the target file combined into the testing end, if the target file in the testing end is correct, the method feeds back to a manager of the base station, and the manager of the base station detects the target file of the base station to determine whether the target file is correct. Wherein the intermediate layer may include, but is not limited to: the data link layer, the network layer, the transport layer, the session layer and the presentation layer, the PL target file, the middle layer target file and the HL target file are respectively the target file in the PL, the target file in the middle layer and the target file in the HL layer, and the definition of the target file can be referred to in the detailed description in step 101.
It can be seen that if any one of the PL code file, the middle layer code file and the HL code file of the base station is changed, then a manager of the base station needs to regenerate the PL target file, the middle layer target file and the HL target file and recombine them into the target file, and a developer of the test end needs to recombine the target file to the test end, so that the manager of the base station and the developer of the test end are required to operate, and the labor cost is high.
And as shown in fig. 3, in the test flow of the application, the target file generating tool of the base station may obtain the target file from the PL code file, the middle layer code file and the HL code file, generate an analysis function according to the target file, issue the analysis function to the test end, and the tester may use the analysis function issued to the test end to analyze the target message to obtain test result data. In the process of generating the target file by the target file generation tool, if the analysis is wrong, analysis error feedback can be performed.
It can be seen that if any one of the PL code file, the middle layer code file and the HL code file of the base station is changed, the target file is regenerated, and the new analysis function is regenerated, so that the new analysis function is reissued to the testing end, a developer of the testing end does not need to update the testing end, and the labor cost is reduced. And moreover, a developer at the test end is not required to detect the file in the test end when analyzing errors, so that the labor cost is further reduced.
In addition, the method and the device can regenerate the analytic function when any one of the code files is changed, thereby realizing the purpose of updating the analytic function in time and avoiding the problem of analysis failure or analysis error caused by the update delay of the analytic function. The test end only needs to call the analysis function to analyze the target message, byte comparison is not needed, and analysis efficiency can be improved. When the analysis efficiency is low, the judgment of abnormality is often delayed, so that the problem can not be found timely.
The process of generating the analytic function can be realized through the generating tool, the function of generating the analytic function by the tool can be realized by developing codes in practical application, the development of the tool is not interfered with the existing development and test flow, and the development can be performed in parallel only by setting preset rules, so that the development efficiency is improved.
Optionally, the step of sending the parsing function to the testing end to parse the target message obtained by the testing to obtain testing result data includes steps 1041 to 1042:
step 1041, compiling the parsing function to obtain a compiled code, where the compiled code includes parsing interfaces corresponding to the parsing function.
Wherein the compiled code may be in the form of library files. Specifically, through automatically analyzing C++ codes and combining a public definition file provided during compiling in a base station, a compiling instruction of Visual Studio compiling software is utilized to directly generate a public library file, lib and dll of a resolvable code stream, and the compiled library files, lib and dll are added into a software version package of the base station after being compressed, so that the method is similar to a merging mode of MIB definition databases.
In practical application, after the software version of the base station is updated, one-time compiling can be triggered, so that not only can the software version of the base station be compiled, but also the analysis function can be compiled, and the analysis function and the software version of the base station are synchronized.
The test end can use C++ to realize the same software version of the base station, and when the message analysis is carried out, the analysis interfaces provided by the lib and dll library files generated by the automatic generation tool are called, and as the analysis interfaces are agreed in advance by the test end and the automatic generation tool, the analysis interfaces cannot change after being determined, for example, the analysis interfaces can be agreed to be: the port msgparer (const char chMsgData, const int nMsgLen, char pstrarr, port bHexFlag, port bHost2 NetFlag) so that the interface is always unchanged, and thus, after each upgrade, the system of the test terminal itself does not need any synchronous modification of the message analysis function.
After compiling, the test terminal can synchronize the library file from the software version package when logging in the base station, download the library file to the installation directory of the test terminal, decompress the library file, and then the test terminal can refer to the library file in the form similar to an open source code so as to call the analysis interface to analyze the target message.
According to the method and the device, the analysis function can be compiled into the compiled code through compiling, and the operation efficiency of the compiled code is higher than that of the source code, so that the analysis efficiency is improved, and in addition, compared with the source code, the security of the compiled file is better, and the compiled file is not easy to be deconstructed.
And step 1042, transmitting the compiled code to a testing end to analyze the target message obtained by the test through an analysis interface in the compiled code to obtain test result data.
Specifically, the target message may be used to match the message structure, and the parsing interface of the matched message structure is used to parse the target message.
According to the method and the device, the compiled code containing the analysis interface can be sent to the testing end to analyze the target message, and the message structure can not be obtained by means of anti-analysis of the compiled code, so that the safety of the message structure is further improved.
Optionally, after analyzing the target message obtained by the test to obtain the test result data, the method further includes step 105:
step 105, storing the test result data into a test result file according to a preset format, wherein the test result file comprises at least one of the following: table files, text files, graphic files.
It will be appreciated that the test result data is generated by the test terminal, and thus the test result data is stored by the test terminal.
Specifically, when the test result file is a table file, a message keyword in the message structure may be used as a header, and a message content may be used as a value of a column where the header is located, for example, a phone number and a connection may be marked as two message keywords, a mark "1" represents connection failure, and a mark "0" represents connection success, thereby obtaining the table file shown in table 3.
Telephone number Switch-on flag
135XXXXXXXX 1
138XXXXXXXX 0
136XXXXXXXX 1
139XXXXXXXX 1
TABLE 3 Table 3
When the test result file is a text file, the preset format may be to separate the message keyword and the message content with a preset separator, for example, table 3 may be to output the text file in the following format: telephone number: 135XXXXXXXX; the on-flag: 1, telephone number: 138XXXXXXXX; the on-flag: 0, telephone number: 136XXXXXXXX; the on-flag: 1, telephone number: 139XXXXXXXX; the on-flag: 1.
when the test result is a graph file, a graph curve is stored in the graph file, for example, as shown in fig. 4, the abscissa is the seconds from the preset time point, the ordinate is the uplink user throughput of the specified user of the specified cell obtained by the MAC (Measurement and Control) module, the specified cell is the cell with the cell identifier cell_index of 0, the specified user is the user with the user identifier ue_index of 0, and as can be seen from the graph, the current throughput thragout put and the cumulative average throughput of the specified user of the specified cell are both 0Mbit/s.
According to the method and the device, the test result can be output to the test result file through the preset format, so that a tester can conveniently and quickly find target data from the test result file, and the test efficiency is improved.
Optionally, if the target file has a message structure that meets a preset rule, generating an parsing function that parses the message structure, including substeps 1031 to 1032:
substep 1031, if there is a message structure in the target file that meets the preset rule, storing the message structure.
Specifically, the message structure meeting the preset rule may be stored in a file, and the file may be located in at least one of the following storage spaces: memory, hard disk, cache, external memory, and register.
Sub-step 1032, if the storing of the message structure is stopped, generating a parsing function for parsing the message structure for the stored message structure.
In the application, the message structure can be temporarily stored to generate the analytical functions for analyzing the message structure in batches, so that the generation efficiency of the analytical functions can be improved, and the message structure can be prevented from being missed.
Optionally, the acquiring the target file in the base station includes sub-step 1011:
sub-step 1011, obtaining a target file in a base station according to target attribute information, wherein the target attribute information comprises at least one of the following: object extension, object type, object name.
Optionally, after extracting the message structure meeting the preset rule from the target file, the method further includes step 106:
and 106, if the message structure which does not accord with the preset rule exists in the target file, generating prompt information to prompt that the message structure which does not accord with the preset rule exists in the target file.
Specifically, in order to facilitate the developer to accurately locate the target file and the message structure which do not conform to the preset rule, the identification of the target file and the identification of the message structure may be prompted.
According to the method and the device, when the target file has the message structure which does not accord with the preset rule, the prompt information is generated, so that a developer modifies the message structure, and after modification, an analysis function can be generated for the message structure to analyze the message structure, so that the analysis success rate is improved, and the resolvable message structure is increased.
In the embodiment of the application, the target file in the base station can be obtained, and the message structure conforming to the preset rule is extracted from the target file, so that the test end can generate the analysis function of the message structure according to the preset rule, and analyze the target message obtained by the test by adopting the analysis function to obtain the test result; and the test end only needs to call the analysis function to analyze the target message, and byte comparison is not needed, so that the analysis efficiency can be improved.
Referring to fig. 5, a block diagram of an embodiment of a base station testing apparatus according to the present application is shown, and may specifically include the following modules:
the object file obtaining module 201 is configured to obtain an object file in a base station, where the object file includes a message structure used for communication of the base station.
And the message structure extracting module 202 is configured to extract a message structure that meets a preset rule from the target file.
And the parsing function generating module 203 is configured to generate a parsing function for parsing the message structure if the message structure conforming to the preset rule exists in the target file.
And the test module 204 is configured to parse, by using the parsing function, a target message sent by the base station in response to a test instruction for the base station, to obtain test result data, where the target message is a message returned by the base station for the test instruction.
Optionally, the test module 204 includes a compiling sub-module and a test sub-module:
and the compiling sub-module is used for compiling the analytic function to obtain a compiling code, and the compiling code comprises an analytic interface corresponding to the analytic function.
And the test sub-module is used for sending the compiled code to a test end so as to analyze the target message obtained by the test through an analysis interface in the compiled code to obtain test result data.
Optionally, the device further comprises a test result file generating module:
the test result file generation module is used for storing the test result data into a test result file according to a preset format, and the test result file comprises at least one of the following components: table files, text files, graphic files.
Optionally, the parsing function generation module includes a message structure storage submodule and a parsing function generation submodule:
and the message structure storage sub-module is used for storing the message structure which accords with a preset rule if the message structure exists in the target file.
And the analysis function generation sub-module is used for generating an analysis function for analyzing the message structure for the stored message structure if the storage of the message structure is stopped.
Optionally, the target file obtaining module includes a target file obtaining sub-module:
the target file acquisition sub-module is used for acquiring a target file in the base station according to target attribute information, wherein the target attribute information comprises at least one of the following: object extension, object type, object name.
Optionally, the device further comprises a prompt module:
and the prompting module is used for generating prompting information to prompt that the message structure which does not accord with the preset rule exists in the target file if the message structure which does not accord with the preset rule exists in the target file.
In the embodiment of the application, the target file in the base station can be obtained, and the message structure conforming to the preset rule is extracted from the target file, so that the test end can generate the analysis function of the message structure according to the preset rule, and analyze the target message obtained by the test by adopting the analysis function to obtain the test result; and the test end only needs to call the analysis function to analyze the target message, and byte comparison is not needed, so that the analysis efficiency can be improved.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
The embodiment of the application also provides an electronic device, which comprises a processor, a memory, and a program or an instruction stored in the memory and capable of running on the processor, wherein the program or the instruction realizes each process of the base station testing method embodiment when being executed by the processor, and can achieve the same technical effect, and in order to avoid repetition, the description is omitted.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above embodiment of the base station testing method, and the same technical effects can be achieved, so that repetition is avoided, and no further description is given here.
Wherein the processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium such as a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general-purpose systems may also be used with the teachings herein. The required structure for a construction of such a system is apparent from the description above. In addition, the present application is not directed to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the present application as described herein, and the above description of specific languages is provided for disclosure of preferred embodiments of the present application.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the present application may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the above description of exemplary embodiments of the application, various features of the application are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the application and aiding in the understanding of one or more of the various application's aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., the claimed application requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this application.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the present application and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
Various component embodiments of the present application may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functions of some or all of the components in a base station testing apparatus according to embodiments of the present application may be implemented in practice using a microprocessor or Digital Signal Processor (DSP). The present application may also be embodied as a device or base station program (e.g., computer program and computer program product) for performing part or all of the methods described herein. Such a program embodying the present application may be stored on a computer readable medium, or may have the form of one or more signals. Such signals may be downloaded from an internet website, provided on a carrier signal, or provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the application, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several base stations, several of these base stations can be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names.

Claims (14)

1. A method for testing a base station, comprising:
acquiring a target file in a base station, wherein the target file comprises a message structure used for communication of the base station; the target file is obtained from a PL code file, a middle layer code file and an HL code file by using a target file tool of the base station;
extracting a message structure conforming to a preset rule from the target file;
if the message structure conforming to the preset rule exists in the target file, generating an analysis function for analyzing the message structure; the generating an parsing function for parsing the message structure includes: generating a name of the analytic function aiming at the message structure, and constructing the analytic function according to the name;
the analysis function is sent to a testing end to analyze the target message obtained by testing, so as to obtain testing result data; and when any one of the PL code file, the middle layer code file and the HL code file is changed, regenerating the target file, regenerating the analysis function and sending the analysis function to the test end.
2. The method of claim 1, wherein the sending the parsing function to the testing end to parse the target message obtained by the testing to obtain the test result data includes:
compiling the analytic function to obtain a compiled code, wherein the compiled code comprises an analytic interface corresponding to the analytic function;
and sending the compiled code to a testing end so as to analyze the target message obtained by the test through an analysis interface in the compiled code to obtain test result data.
3. The method according to claim 1, wherein after analyzing the target message obtained by the test to obtain the test result data, further comprises:
storing the test result data into a test result file according to a preset format, wherein the test result file comprises at least one of the following components: table files, text files, graphic files.
4. The method of claim 1, wherein generating an parsing function that parses the message structure if there is a message structure in the target file that meets a preset rule, comprises:
if the message structure conforming to the preset rule exists in the target file, storing the message structure;
and if the storage of the message structure is stopped, generating an analysis function for analyzing the message structure for the stored message structure.
5. The method of claim 1, wherein the obtaining the target file in the base station comprises:
obtaining a target file in a base station according to target attribute information, wherein the target attribute information comprises at least one of the following: object extension, object type, object name.
6. The method according to claim 1, wherein after extracting the message structure conforming to the preset rule from the target file, further comprising:
if the message structure which does not accord with the preset rule exists in the target file, generating prompt information to prompt that the message structure which does not accord with the preset rule exists in the target file.
7. A base station testing apparatus, comprising:
the target file acquisition module is used for acquiring a target file in a base station, wherein the target file comprises a message structure used for communication of the base station; the target file is obtained from a PL code file, a middle layer code file and an HL code file by using a target file tool of the base station;
the message structure extraction module is used for extracting a message structure conforming to a preset rule from the target file;
the analysis function generation module is used for generating an analysis function for analyzing the message structure if the message structure conforming to the preset rule exists in the target file; the generating an parsing function for parsing the message structure includes: generating a name of the analytic function aiming at the message structure, and constructing the analytic function according to the name;
the test module is used for responding to a test instruction aiming at the base station, analyzing a target message sent by the base station through the analysis function to obtain test result data, wherein the target message is returned by the base station aiming at the test instruction; and when any one of the PL code file, the middle layer code file and the HL code file is changed, regenerating the target file, regenerating the analysis function and sending the analysis function to a testing end.
8. The apparatus of claim 7, wherein the test module comprises:
the compiling sub-module is used for compiling the analytic function to obtain a compiling code, wherein the compiling code comprises an analytic interface corresponding to the analytic function;
and the test sub-module is used for sending the compiled code to a test end so as to analyze the target message obtained by the test through an analysis interface in the compiled code to obtain test result data.
9. The apparatus of claim 7, wherein the apparatus further comprises:
the test result file generation module is used for storing the test result data into a test result file according to a preset format, and the test result file comprises at least one of the following components: table files, text files, graphic files.
10. The apparatus of claim 7, wherein the parsing function generation module comprises:
the message structure storage sub-module is used for storing the message structure which accords with a preset rule if the message structure exists in the target file;
and the analysis function generation sub-module is used for generating an analysis function for analyzing the message structure for the stored message structure if the storage of the message structure is stopped.
11. The apparatus of claim 7, wherein the object file obtaining module comprises:
the target file acquisition sub-module is used for acquiring a target file in the base station according to target attribute information, wherein the target attribute information comprises at least one of the following: object extension, object type, object name.
12. The apparatus of claim 7, wherein the apparatus further comprises:
and the prompting module is used for generating prompting information to prompt that the message structure which does not accord with the preset rule exists in the target file if the message structure which does not accord with the preset rule exists in the target file.
13. An electronic device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the base station testing method of any of claims 1 to 6.
14. A readable storage medium, characterized in that the readable storage medium has stored thereon a program or instructions which, when executed by a processor, implement the steps of the base station testing method according to any of claims 1 to 6.
CN202010562183.1A 2020-06-18 2020-06-18 Base station testing method and device, electronic equipment and storage medium Active CN113825166B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010562183.1A CN113825166B (en) 2020-06-18 2020-06-18 Base station testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010562183.1A CN113825166B (en) 2020-06-18 2020-06-18 Base station testing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113825166A CN113825166A (en) 2021-12-21
CN113825166B true CN113825166B (en) 2024-03-01

Family

ID=78924489

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010562183.1A Active CN113825166B (en) 2020-06-18 2020-06-18 Base station testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113825166B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5963943A (en) * 1996-05-28 1999-10-05 Mci Communication Corporation System and method for storing and retrieving performance and topology information
CN1767453A (en) * 2004-10-31 2006-05-03 中兴通讯股份有限公司 Automatic test method and system
CN101159961A (en) * 2007-10-25 2008-04-09 中兴通讯股份有限公司 Method and system of implementing base station controlled test in mobile communication system
CN108255725A (en) * 2018-01-18 2018-07-06 银联商务股份有限公司 Test method and device
CN109614308A (en) * 2018-10-16 2019-04-12 深圳壹账通智能科技有限公司 Test data generating method, device and computer equipment based on crawler log

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11327114B2 (en) * 2018-06-15 2022-05-10 State Grid Hebei Electric Power Research Institute Fully-automatic closed-loop detection method and device for intelligent substation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5963943A (en) * 1996-05-28 1999-10-05 Mci Communication Corporation System and method for storing and retrieving performance and topology information
CN1767453A (en) * 2004-10-31 2006-05-03 中兴通讯股份有限公司 Automatic test method and system
CN101159961A (en) * 2007-10-25 2008-04-09 中兴通讯股份有限公司 Method and system of implementing base station controlled test in mobile communication system
CN108255725A (en) * 2018-01-18 2018-07-06 银联商务股份有限公司 Test method and device
CN109614308A (en) * 2018-10-16 2019-04-12 深圳壹账通智能科技有限公司 Test data generating method, device and computer equipment based on crawler log

Also Published As

Publication number Publication date
CN113825166A (en) 2021-12-21

Similar Documents

Publication Publication Date Title
CN109388417B (en) Communication protocol updating method, system and terminal equipment
CN110213113B (en) WEB configuration management method of base station and base station
CN113010378B (en) Log processing method and device of microservice module, storage medium and electronic device
CN111200523B (en) Method, device, equipment and storage medium for configuring middle platform system
CN111858113B (en) Application program repairing method and device, service system and storage medium
CN112154420A (en) Automatic intelligent cloud service testing tool
CN107347048A (en) The method, apparatus and system of data check
US20120315931A1 (en) Short message processing method and apparatus
CN107368334B (en) Business plug-in interaction system and method
CN107182078B (en) Method for analyzing circuit switched fallback test report of terminal, terminal and storage device
US11768759B2 (en) Method and system for automated testing of web service APIs
CN113407823A (en) IOS message pushing method and system
CN113825166B (en) Base station testing method and device, electronic equipment and storage medium
CN112235124A (en) Method and device for configuring pico-cell, storage medium and electronic device
CN110035436B (en) Information monitoring method, device, equipment and storage medium
CN105635225A (en) Method and system of using mobile terminal to access mobile internet-based server and mobile terminal
CN111488286B (en) Method and device for independently developing Android modules
US9160811B2 (en) Client provisioning with enhanced linking
CN107888772A (en) A kind of method, apparatus and storage medium for determining configuration information
CN114253441A (en) Target function starting method and device, storage medium and electronic device
CN109491699B (en) Resource checking method, device, equipment and storage medium of application program
CN113709177A (en) Method for processing message and external call gateway
US20160218941A1 (en) Processing method and apparatus for signaling tracing
CN114090112B (en) Method and device for loading configuration file, storage medium and electronic device
CN110881017A (en) Communication service registration method, system, electronic device, authentication method and server

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