CN113015203A - Information acquisition method, device, terminal, system and storage medium - Google Patents

Information acquisition method, device, terminal, system and storage medium Download PDF

Info

Publication number
CN113015203A
CN113015203A CN202110302942.5A CN202110302942A CN113015203A CN 113015203 A CN113015203 A CN 113015203A CN 202110302942 A CN202110302942 A CN 202110302942A CN 113015203 A CN113015203 A CN 113015203A
Authority
CN
China
Prior art keywords
message
subscription
information
specified
log
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110302942.5A
Other languages
Chinese (zh)
Other versions
CN113015203B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202110302942.5A priority Critical patent/CN113015203B/en
Publication of CN113015203A publication Critical patent/CN113015203A/en
Application granted granted Critical
Publication of CN113015203B publication Critical patent/CN113015203B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic

Abstract

The embodiment of the application provides an information acquisition method, an information acquisition device, a terminal, a system and a storage medium, and relates to the technical field of Internet. The method comprises the following steps: the log tool receives a subscription message sent by the test module, wherein the subscription message is used for requesting to acquire the specified information of the test terminal; the log tool acquires the specified information from the log file of the test terminal based on the subscription message; and the log tool sends a reply message corresponding to the subscription message to the test module, wherein the reply message carries the specified information. The embodiment of the application provides a subscription mechanism, so that the efficiency of the test module for acquiring the internal state information of the test terminal is improved, and the instantaneity of the test module for acquiring the internal state information of the test terminal is further improved.

Description

Information acquisition method, device, terminal, system and storage medium
Technical Field
The embodiment of the application relates to the technical field of internet, in particular to an information acquisition method, an information acquisition device, an information acquisition terminal, an information acquisition system and a storage medium.
Background
Currently, User Equipment (UE) needs to be tested before it is put on the market.
In the related art, in a test procedure of the UE, the control terminal reads an internal state of the UE, such as whether the UE is in a flight mode, a frequency point, a UE capability, network residence information, and the like, through an at (attention) command.
Referring to fig. 1, the interaction flow between the automatic test system and the UE is as follows: step 101, an automatic test system sends an AT command to UE; 102, the UE obtains the relevant state information based on the AT command, and 103, the UE returns a reply message carrying the relevant state information to the automatic test system.
Disclosure of Invention
The embodiment of the application provides an information acquisition method, an information acquisition device, a terminal, a system and a storage medium. The technical scheme is as follows:
in one aspect, an embodiment of the present application provides an information obtaining method, where the method includes:
the log tool receives a subscription message sent by the test module, wherein the subscription message is used for requesting to acquire the specified information of the test terminal;
the log tool acquires the specified information from the log file of the test terminal based on the subscription message;
and the log tool sends a reply message corresponding to the subscription message to the test module, wherein the reply message carries the specified information.
In one aspect, an embodiment of the present application provides an information obtaining apparatus, where the apparatus includes:
the communication submodule is used for receiving a subscription message sent by the test module, and the subscription message is used for requesting to acquire the specified information of the test terminal;
the information acquisition module is used for acquiring the specified information from the log file of the test terminal based on the subscription message;
the communication submodule is further configured to send a reply message corresponding to the subscription message to the test module, where the reply message carries the specified information.
In another aspect, an embodiment of the present application provides an information acquisition system, where the information acquisition system includes a first terminal and a second terminal, the first terminal includes a test module, and the second terminal includes a logging tool;
the test module is used for sending a subscription message to the log tool, wherein the subscription message is used for requesting to acquire the specified information of the test terminal;
the log tool is used for acquiring the specified information from the log file of the test terminal based on the subscription message, and sending a reply message corresponding to the subscription message to the test module, wherein the reply message carries the specified information.
In yet another aspect, an embodiment of the present application provides a terminal, where the terminal includes a processor and a memory, where the memory stores a computer program, and the computer program is loaded and executed by the processor to implement the information acquisition method according to the aspect.
In yet another aspect, the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program is loaded and executed by a processor to implement the information acquisition method according to the aspect.
In yet another aspect, embodiments of the present application provide a computer program product, the computer program product or computer program including computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the information acquisition method.
The technical scheme provided by the embodiment of the application can bring the beneficial effects of at least comprising:
by providing a subscription mechanism, the test module is allowed to subscribe the designated information from the log tool, and after the log tool receives the subscription information, the designated information is analyzed from the log file of the test terminal and returned to the test module, on one hand, the test terminal can obtain the internal state information of the test terminal as required, the information analyzed from the log file is not required to be filtered and screened, and the processing resources of the test terminal are saved, on the other hand, the log tool only needs to analyze the designated information subscribed by the test module and does not need to analyze all log files, so that the processing resources required by analyzing all log files are saved, the efficiency of the test module for obtaining the internal state information of the test terminal is improved, and the real-time of the test module for obtaining the internal state information of the test terminal is improved.
Drawings
Fig. 1 is a flowchart of an information acquisition method provided in the related art;
fig. 2 is a schematic structural diagram of a control terminal provided in the related art;
fig. 3 is a flowchart of another information acquisition method provided by the related art;
FIG. 4 is a schematic diagram of an implementation environment provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of another implementation environment provided by embodiments of the present application;
FIG. 6 is a schematic structural diagram of a test module provided in an embodiment of the present application;
FIG. 7 is a schematic structural diagram of a logging tool provided in an embodiment of the present application;
fig. 8 is a flowchart of an information obtaining method provided in an embodiment of the present application;
FIG. 9 is a flowchart of obtaining a decoded file according to an embodiment of the present application;
FIG. 10 is a schematic diagram of information acquisition provided by an embodiment of the present application;
fig. 11 is a block diagram of an information acquisition apparatus provided in an embodiment of the present application;
fig. 12 is a block diagram of a terminal provided in an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The related art also provides an information acquisition method, and referring to fig. 2, the method is applied to a test module and a log tool in a control terminal, and the test module includes a terminal information control submodule and a log analysis submodule. The logging tool is connected to the UE through a first interface, the state information of the UE is obtained through the first interface, and the state information of the UE is stored to obtain a log file. In addition, the test module is connected with the UE through a second interface, and the UE sends the AT command through the second interface.
In the method, the interactive flow of the test module and the logging tool refers to fig. 3, and the interactive flow includes the following steps.
Step 301, the test module sends a start command to the sunflower tool.
Step 302, the logging tool starts running to generate a log file.
Step 303, the test module checks if a log file exists.
And step 304, the test module analyzes the log file through the log analysis submodule under the condition that the log file exists.
Optionally, the parsing log sub-module obtains each message in the log file, and decodes the message based on the decoding file.
And 305, the test module receives the information sent by the analysis log submodule through the terminal information control submodule.
The first related art described above has the following drawbacks: on one hand, the control terminal usually receives the return value of the previous AT command and then sends the next AT command, on the other hand, the sending period of the AT command is in the second level, the efficiency of the control terminal for obtaining the internal state information of the test terminal is low, and the internal state information of the test terminal which is evanescent immediately before can not be obtained.
The second related art described above has the following drawbacks: the log analysis submodule needs to analyze all log files for the test module to use, the process is long in consumed time, and the instantaneity of the control terminal for obtaining the internal state information of the test terminal is reduced.
Based on this, the embodiments of the present application provide an information obtaining method, which provides a subscription mechanism, that is, allows the test module to subscribe to the specified information from the logging tool, and after the logging tool receives the subscription information, analyzing the designated information from the log file of the test terminal and returning the information to the test module, so that the test terminal can obtain the internal state information of the test terminal as required without filtering and screening the analyzed information of the log file, thereby saving the processing resources of the test terminal, and the log tool only needs to analyze the designated information subscribed by the test module, without analyzing all log files, saves processing resources required for analyzing all log files, and the efficiency of the test module for acquiring the internal state information of the test terminal is improved, and the instantaneity of the test module for acquiring the internal state information of the test terminal is further improved.
FIG. 4 is a schematic illustration of an implementation environment provided by an embodiment of the present application. The implementation environment includes a control terminal 41 and a test terminal 42.
The control terminal 41 includes a test module and a logging tool. The control terminal may be: a smartphone, a tablet, a laptop, or a desktop computer.
The test module and the log module are communicated in a preset communication mode. Optionally, the preset communication mode is a socket mode. Optionally, the log tool includes a socket server, the test module includes a socket client, and the socket server communicates with the socket client, that is, the log tool communicates with the test module.
The test module is used for executing the test flow of the test terminal 42. In this embodiment, if the internal state information of the test terminal 42 needs to be obtained in the test flow, the test module sends a subscription message to the logging tool to request to obtain the internal state information of the test terminal 42 required by itself from the logging tool.
The log tool is used for acquiring the internal state information of the test terminal 42 and generating a log file. In the embodiment of the application, the log tool has a log file analysis function, analyzes the log file after receiving the subscription message sent by the test module, acquires the message content subscribed by the subscription message from the analysis result, and then sends the subscribed message content to the test module.
The test terminals 42 may be: a smartphone, a tablet, an MP3 player, an MP4 player, a laptop, or a desktop computer.
FIG. 5 is a schematic illustration of an implementation environment provided by another embodiment of the present application. Unlike the implementation environment shown in fig. 4, the test module and the logging tool are deployed on different devices, and the implementation environment includes a first terminal 51, a second terminal 52 and a test terminal 53.
The first terminal 51 comprises a test module and the second terminal 52 comprises a logging tool. Alternatively, the first terminal 51 comprises a logging tool and the second terminal 52 comprises a test module. The first terminal 51 and the second terminal 52 communicate with each other in a preset communication manner. Optionally, the preset communication mode is a socket mode.
In this implementation environment, when the technician tests the test terminal 53 through the first terminal 51 and the second terminal 52, the technician may break through the equipment limitation and the site limitation, and realize the remote test.
Fig. 6 shows a schematic structural diagram of a test module according to an embodiment of the present application. The test module comprises a UE message control submodule which runs a first thread and a second thread, is provided with a socket client and a third cache queue, and the socket client receives a message sent by a socket server (a log analysis submodule arranged on a log tool) through the first thread and stores the received message to the third cache queue. The second thread is used for reading the message from the third cache queue and sending the message to the testing main thread.
Fig. 7 shows a schematic structural diagram of a logging tool provided in an embodiment of the present application. The log tool comprises a communication submodule, a message processing submodule, a configuration submodule, a log analysis submodule, a filtering submodule and a log generating submodule.
The communication sub-module is used for communicating with the test module, for example, receiving a subscription message, a configuration message, a start or stop command and the like sent by the test module. The communication submodule is provided with a socket server side, and the socket server side is communicated with the test module. The communication submodule is also used for forwarding the received message to the message processing submodule.
The message processing submodule is used for determining the type of the message sent by the test module, and if the message is a subscription message, the message processing submodule informs the log analysis submodule to start a log analysis process; if the configuration message is the configuration message, informing the configuration submodule to apply the configuration carried in the configuration message; and if the command is a starting or logging command, controlling the log generation submodule to start generating the log file or stop generating the log file.
And the log analysis submodule is used for analyzing the log file and storing an analysis result to the second cache queue. And the filtering submodule reads the analysis result from the second cache queue, filters the analysis result according to the filtering condition provided by the subscription message, stores the analysis result meeting the filtering condition as a filtering result in a third cache queue, then the message processing submodule reads the filtering result from the third cache queue, encapsulates the filtering result into a reply message according to the message format agreed by the test module and the log tool, stores the reply message in a sending queue of the communication submodule, and then the communication module reads the reply message from the sending queue and sends the reply message to the test module.
Fig. 8 is a flowchart illustrating an information obtaining method provided by an embodiment of the present application, where the method is applied to a logging tool. The method comprises the following steps:
step 801, receiving a subscription message sent by a test module.
The subscription message is used for requesting to acquire the specified information of the test terminal. Optionally, the subscription message comprises a combination of one or more of: specifying message identification, subscription fields, and frequency of transmission.
The specified message identification is used for identifying the specified message subscribed by the test terminal. The specified message identification is also referred to as message _ name. The subscription field, also referred to as parameter _ list, is used to indicate the message content that the test terminal desires to retrieve from a specified message. The sending frequency refers to the frequency of sending the reply message corresponding to the subscription message to the test terminal by the logging tool, and is also called frequency.
In one example, the subscription message is as follows:
{
(message_name_1:[
parameter_1,
parameter_2,
]:1s);
(message_name_2:[
all,
]:2s);
}
the codes indicate that the test module subscribes to two messages of the test terminal, and the names are message _ name _1 and message _ name _2 respectively. For message _ name _1, two fields within the message are subscribed, namely, parameter _1 and parameter _2, respectively, and the sending frequency of the message is 1 s. For message _ name _2, all fields subscribed to the message are denoted by "all", and the message is transmitted with a frequency of 2 seconds.
Optionally, the log tool receives the subscription message sent by the test module in a socket communication mode. Optionally, the log tool is deployed with a socket server, and the test module is deployed with a socket client.
Step 802, based on the subscription message, obtaining the specified information from the log file of the test terminal.
The log file of the test terminal refers to a record file or a file set for recording the operation event of the test terminal, and can be divided into an event log and a message log, and has important functions of processing historical data, tracing a diagnostic problem, understanding the activity of a system and the like.
Optionally, step 802 comprises the sub-steps of:
step 802a, the log parsing submodule parses the designated message corresponding to the designated message identifier to obtain the message content of the designated message.
Optionally, the log tool includes a log parsing submodule, where the log parsing submodule is configured to parse the specified message to obtain a message content of the specified message. For example, if the subscription message is used to request to obtain the MAC layer status information of the test terminal, the log parsing sub-module decodes the log message of the MAC layer of the test terminal.
Step 802b, the log parsing submodule stores the message content of the specified message in a first buffer queue.
Optionally, the log parsing sub-module stores the message content of the specified message in a first buffer queue, which is also referred to as a filtering sub-module queue.
In step 803c, the filtering sub-module obtains the message content of the specified message from the first buffer queue.
And step 804d, the filtering submodule acquires the specified information from the message content of the specified message based on the subscription field.
The specifying information includes specifying field contents of subscription fields in the message. Optionally, the specific information further includes a timestamp for reporting the specific message by the test terminal.
Optionally, the logging tool comprises a filtering sub-module, by which the specified information is obtained from the message content of the specified message.
Optionally, the filtering sub-module obtains the specified information from the message content of the specified message based on the subscription message. Taking the subscription message shown in the above embodiment as an example, the filter submodule obtains the field contents of two fields, namely, parameter _1 and parameter _2, in the message _ name _1 and the entire content of the message _ name _2 as the specifying information. Optionally, the filtering sub-module stores the message content of the specified message into a third buffer queue, which is also referred to as a message processing sub-module queue.
In other possible implementations, the filtering submodule receives message content of the specified message sent at the log parsing submodule.
Step 803, a reply message corresponding to the subscription message is sent to the test module.
The reply message carries the specified information. The reply message corresponding to the subscription message includes: specifying the message identity, the field contents of the subscription field, the timestamp. The timestamp refers to the time when the test terminal reports the specified message corresponding to the specified message identifier, and is also referred to as time _ stamp.
In one example, the subscription message is as follows:
{
(message_name_1:[
parameter_1,
parameter_2,
]:2020/11/13 09:57:36:453);
(message_name_2:[
parameter_1,
parameter_2,
parameter_3,
]:2020/11/13 09:57:39:321;
}
the code indicates that the logging tool sends two reply messages to the test module, and the names of the two reply messages are message _ name _1 and message _ name _2 respectively. For the message _ name _1, the reply message carries the field contents of the two fields subscribed by the subscription message and a timestamp of 2020/11/1309:57:36: 453. For the message _ name _2, the reply message carries the field contents of all the fields subscribed by the subscription message and a timestamp of 2020/11/1309:57: 39: 321.
Optionally, the logging tool periodically sends a reply message to the test module according to the sending frequency included in the subscription message.
Optionally, the log tool includes a message processing sub-module, and before sending the reply message, the message processing sub-module obtains the specified information from the second cache queue, and encapsulates the specified information according to a preset format to obtain the reply message. Optionally, the preset format refers to a format agreed by the test module and the logging tool. Optionally, after the message processing sub-module packages the reply message, the reply message is stored in a communication queue for the communication sub-module to read.
In summary, the technical solution provided by the embodiment of the present application allows the test module to subscribe to the specific information from the logging tool by providing a subscription mechanism, and after the logging tool receives the subscription information, analyzing the designated information from the log file of the test terminal and returning the information to the test module, so that the test terminal can obtain the internal state information of the test terminal as required without filtering and screening the analyzed information of the log file, thereby saving the processing resources of the test terminal, and the log tool only needs to analyze the designated information subscribed by the test module, without analyzing all log files, saves processing resources required for analyzing all log files, and the efficiency of the test module for acquiring the internal state information of the test terminal is improved, and the instantaneity of the test module for acquiring the internal state information of the test terminal is further improved.
In the related art, the log parsing submodule is deployed in the test module and maintains a decoding file required for parsing the log file, when the decoding file is matched with the version information of the test terminal, the log parsing submodule can successfully parse the log file, and when the decoding file is not matched with the version information of the test terminal, the log parsing submodule parses error messages and contents, however, because the log parsing submodule is separated from the log tool, the probability that the decoding file is not matched with the version information of the test terminal is high. Based on this, the embodiment of the present application further provides a method for obtaining a decoded file in advance, so as to reduce the probability that the version information of the decoded file is not matched with that of the test terminal, and increase the success rate of analyzing the log file through the decoded file.
In an optional embodiment provided based on the embodiment shown in fig. 8, the information obtaining method further includes the following steps:
step 91, inquiring version information of the test terminal.
Optionally, the logging tool sends an AT command for querying version information of the test terminal to the single test unit, and the test terminal obtains the version information based on the AT command and then sends the version information to the logging tool.
Step 92, the decoded file matched with the version information is obtained from the server.
And the log tool sends a decoding file acquisition request to the server, the decoding file acquisition request carries the version information of the test terminal, and the server transmits a decoding file matched with the version information to the log tool side based on the decoding file acquisition request.
Optionally, before the log tool acquires the decoded file matched with the version information from the server, the log tool detects whether the decoded file maintained by the log parsing sub-module is matched with the version information of the test terminal, and if not, executes a step of acquiring the decoded file matched with the version information from the server.
Step 93, the decoded file is loaded.
The log tool loads the decoded file to the log analysis submodule, so that the log analysis submodule can perform log analysis on the basis of the decoded file matched with the version information of the test terminal, and the success rate of analyzing the log file through the decoded file is increased.
Referring to fig. 9, a flowchart for acquiring a decoded file according to an embodiment of the present application is shown. The method comprises the following steps:
step 901, sending a version information query command to the test terminal.
Step 902, receiving version information sent by the test terminal.
Step 903, downloading the decoding file matched with the version information from the decoding file server.
Step 904, apply the above decoded file.
To sum up, according to the technical scheme provided by the embodiment of the application, the log analysis submodule is deployed in the log tool, and the decoding file matched with the version information of the test terminal is obtained in advance before the log file is analyzed, so that the situation of decoding failure caused by mismatch of the version information of the test terminal and the decoding file is reduced, and the success rate of analyzing the log file through the decoding file is increased.
Fig. 10 is a schematic diagram of an information acquisition process according to an embodiment of the present application. The information acquisition process includes the following steps.
1. And the UE message control submodule of the test module sends subscription messages to the communication submodule of the log tool.
2. And the communication submodule forwards the subscription message to the message processing submodule.
3. And the message processing submodule informs the log analysis submodule to analyze the log.
4. And the log analysis submodule carries out log analysis to obtain an analysis result.
5. And the log analysis submodule stores the analysis result in a first cache queue.
6. And the filtering submodule acquires an analysis result from the first cache queue.
7. And the filtering submodule filters the specified information from the analysis result.
8. And the filtering submodule stores the specified information into a second cache queue.
9. And the message processing submodule acquires the specified information from the second cache queue.
10. And the message processing submodule encapsulates the specified information into a reply message.
11. And the message processing submodule stores the reply message to a communication queue.
And 12, the communication submodule sends a reply message to the UE message control submodule.
In summary, the technical solution provided by the embodiment of the present application allows the test module to subscribe to the specific information from the logging tool by providing a subscription mechanism, and after the logging tool receives the subscription information, analyzing the designated information from the log file of the test terminal and returning the information to the test module, so that the test terminal can obtain the internal state information of the test terminal as required without filtering and screening the analyzed information of the log file, thereby saving the processing resources of the test terminal, and the log tool only needs to analyze the designated information subscribed by the test module, without analyzing all log files, saves processing resources required for analyzing all log files, and the efficiency of the test module for acquiring the internal state information of the test terminal is improved, and the instantaneity of the test module for acquiring the internal state information of the test terminal is further improved.
In the following, embodiments of the apparatus of the present application are described, and for portions of the embodiments of the apparatus not described in detail, reference may be made to technical details disclosed in the above-mentioned method embodiments.
Referring to fig. 11, a block diagram of an information acquisition apparatus according to an exemplary embodiment of the present application is shown. The information acquisition means may be implemented as all or a part of the terminal by software, hardware, or a combination of both. The information acquisition apparatus includes:
the communication sub-module 1101 is configured to receive a subscription message sent by the test module, where the subscription message is used to request to acquire the specific information of the test terminal.
An information obtaining module 1102, configured to obtain the specified information from the log file of the test terminal based on the subscription message.
The communication sub-module 1101 is further configured to send a reply message corresponding to the subscription message to the test module, where the reply message carries the specified information.
In summary, the technical solution provided by the embodiment of the present application allows the test module to subscribe to the specific information from the logging tool by providing a subscription mechanism, and after the logging tool receives the subscription information, analyzing the designated information from the log file of the test terminal and returning the information to the test module, so that the test terminal can obtain the internal state information of the test terminal as required without filtering and screening the analyzed information of the log file, thereby saving the processing resources of the test terminal, and the log tool only needs to analyze the designated information subscribed by the test module, without analyzing all log files, saves processing resources required for analyzing all log files, and the efficiency of the test module for acquiring the internal state information of the test terminal is improved, and the instantaneity of the test module for acquiring the internal state information of the test terminal is further improved.
In an optional embodiment provided based on the embodiment shown in fig. 11, the subscription message carries a combination of at least one or more of the following: appointing a message identifier, a subscription field and a sending frequency; the specified message identification is used for identifying the specified message subscribed by the test terminal; the subscription field is used for indicating the message content which the test terminal desires to obtain from the specified message; the sending frequency refers to the frequency of sending the reply message corresponding to the subscription message to the test module by the logging tool.
Optionally, the information obtaining module 1102 includes a log parsing sub-module and a filtering sub-module (not shown in fig. 11).
The log parsing submodule is used for: analyzing the specified message to obtain the message content of the specified message; and storing the message content of the specified message to a first buffer queue.
The filtering submodule is used for: reading the message content of the specified message from the first cache queue; and acquiring the specified information from the message content of the specified message based on the subscription field.
In an alternative embodiment provided based on the embodiment shown in fig. 11, the reply message corresponding to the subscription message includes: specifying a message identifier, field content of a subscription field, and a timestamp; the specified message identification is used for identifying the specified message subscribed by the test terminal; and the time stamp is used for indicating the time of the test terminal reporting the specified message.
In an alternative embodiment provided based on the embodiment shown in fig. 11, the information obtaining module further includes a message processing sub-module (not shown in fig. 11).
A message processing sub-module for: reading the specified information from the second cache queue; packaging the designated information according to a preset format to obtain the reply message corresponding to the subscription message; and storing the reply message to a communication queue.
The communication sub-module 1102 is specifically configured to: reading the reply message from the communication queue; and sending the reply message to the test module.
In an alternative embodiment provided based on the embodiment shown in fig. 11, the logging tool further comprises a file retrieval module (not shown in fig. 11).
A file acquisition module to:
inquiring version information of the test terminal;
acquiring a decoding file matched with the version information from a server;
and loading the decoding file.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the apparatus may be divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
In an exemplary embodiment, an information acquisition system is also provided. The information acquisition system comprises a first terminal and a second terminal. The first terminal includes a test module. The second terminal includes a logging tool.
The test module is used for sending subscription information to the log tool, and the subscription information is used for requesting to acquire the specified information of the test terminal. The logging tool is used to perform the various steps described above in the embodiment of fig. 8, as well as in the alternative embodiment provided based on the embodiment shown in fig. 8.
Fig. 12 is a block diagram illustrating a structure of a terminal according to an exemplary embodiment of the present application. A terminal in the present application may include one or more of the following components: a processor 1210 and a memory 1220.
Processor 1210 may include one or more processing cores. The processor 1210, which connects various parts within the overall terminal using various interfaces and lines, performs various functions of the terminal and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1220, and calling data stored in the memory 1220. Alternatively, the processor 1210 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). Processor 1210 may incorporate one or a combination of Central Processing Units (CPUs), modems, and the like. Wherein, the CPU mainly processes an operating system, an application program and the like; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 1210, but may be implemented by a single chip.
Alternatively, the processor 1210, when executing the program instructions in the memory 1220, implements the information acquisition methods provided by the various method embodiments described below.
The Memory 1220 may include a Random Access Memory (RAM) or a Read-Only Memory (ROM). Optionally, the memory 1220 includes a non-transitory computer-readable medium. The memory 1220 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 1220 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the various method embodiments described above, and the like; the storage data area may store data created according to the use of the terminal, and the like.
The structure of the terminal is only illustrative, and in actual implementation, the terminal may include more or less components, which is not limited in this embodiment.
Those skilled in the art will appreciate that the configuration shown in fig. 12 is not intended to be limiting of terminal 1200 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
In an exemplary embodiment, a computer-readable storage medium is also provided, in which a computer program is stored, the computer program being loaded and executed by a processor of a computer device to implement the information acquisition method in the above-described method embodiments.
Alternatively, the computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product is also provided, and the computer program product includes computer instructions stored in a computer-readable storage medium, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions to cause the computer device to execute the information acquisition method provided in the foregoing aspect or various optional implementations of the aspect.
The above description is only exemplary of the present application and is not intended to limit the present application, and any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. An information acquisition method, characterized in that the method comprises:
the log tool receives a subscription message sent by the test module, wherein the subscription message is used for requesting to acquire the specified information of the test terminal;
the log tool acquires the specified information from the log file of the test terminal based on the subscription message;
and the log tool sends a reply message corresponding to the subscription message to the test module, wherein the reply message carries the specified information.
2. The method of claim 1, wherein the subscription message carries a combination of at least one or more of: appointing a message identifier, a subscription field and a sending frequency;
the specified message identification is used for identifying the specified message subscribed by the test terminal; the subscription field is used for indicating the message content which the test terminal desires to obtain from the specified message; the sending frequency refers to the frequency of sending the reply message corresponding to the subscription message to the test module by the logging tool.
3. The method of claim 2, wherein the logging tool comprises a log parsing submodule and a filtering submodule;
the logging tool obtains the specified information from the log file of the test terminal based on the subscription message, and the method comprises the following steps:
the log analysis submodule analyzes the specified message to obtain the message content of the specified message;
the log analysis submodule stores the message content of the specified message to a first cache queue;
the filtering submodule reads the message content of the specified message from the first cache queue;
and the filtering submodule acquires the specified information from the message content of the specified message based on the subscription field.
4. The method of claim 1, wherein the reply message corresponding to the subscription message comprises: specifying a message identifier, field content of a subscription field, and a timestamp;
the specified message identification is used for identifying the specified message subscribed by the test terminal; and the time stamp is used for indicating the time of the test terminal reporting the specified message.
5. The method of claim 1, wherein the logging tool comprises: the message processing sub-module and the communication sub-module;
before the logging tool sends a reply message corresponding to the subscription message to the test module, the logging tool further includes:
the message processing sub-module reads the specified information from the second cache queue;
the message processing submodule encapsulates the designated information according to a preset format to obtain the reply message corresponding to the subscription message;
the message processing sub-module stores the reply message to a communication queue;
the logging tool sending a reply message corresponding to the subscription message to the test module, including:
the communication sub-module reads the reply message from the communication queue;
and the communication sub-module sends the reply message to the test module.
6. The method according to any one of claims 1 to 5, wherein before the logging tool obtains the specific information from the log file of the test terminal based on the subscription message, the method further comprises:
inquiring version information of the test terminal;
acquiring a decoding file matched with the version information from a server;
and loading the decoding file.
7. An information acquisition apparatus, characterized in that the apparatus comprises:
the communication submodule is used for receiving a subscription message sent by the test module, and the subscription message is used for requesting to acquire the specified information of the test terminal;
the information acquisition module is used for acquiring the specified information from the log file of the test terminal based on the subscription message;
the communication submodule is further configured to send a reply message corresponding to the subscription message to the test module, where the reply message carries the specified information.
8. An information acquisition system is characterized by comprising a first terminal and a second terminal, wherein the first terminal comprises a test module, and the second terminal comprises a log tool;
the test module is used for sending a subscription message to the log tool, wherein the subscription message is used for requesting to acquire the specified information of the test terminal;
the log tool is used for acquiring the specified information from the log file of the test terminal based on the subscription message, and sending a reply message corresponding to the subscription message to the test module, wherein the reply message carries the specified information.
9. A terminal characterized in that it comprises a processor and a memory, said memory storing a computer program that is loaded by said processor and that executes an information acquisition method according to any one of claims 1 to 6.
10. A computer-readable storage medium, in which a computer program is stored, the computer program being loaded and executed by a processor to implement the information acquisition method according to any one of claims 1 to 6.
CN202110302942.5A 2021-03-22 2021-03-22 Information acquisition method, device, terminal, system and storage medium Active CN113015203B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110302942.5A CN113015203B (en) 2021-03-22 2021-03-22 Information acquisition method, device, terminal, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110302942.5A CN113015203B (en) 2021-03-22 2021-03-22 Information acquisition method, device, terminal, system and storage medium

Publications (2)

Publication Number Publication Date
CN113015203A true CN113015203A (en) 2021-06-22
CN113015203B CN113015203B (en) 2022-08-16

Family

ID=76404391

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110302942.5A Active CN113015203B (en) 2021-03-22 2021-03-22 Information acquisition method, device, terminal, system and storage medium

Country Status (1)

Country Link
CN (1) CN113015203B (en)

Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050049945A1 (en) * 2003-08-27 2005-03-03 International Business Machines Corporation Database log capture program that publishes transactions to multiple targets to handle unavailable targets by separating the publishing of subscriptions and subsequently recombining the publishing
US20090061860A1 (en) * 2003-08-05 2009-03-05 John Yue Jun Jiang Predictive intelligence
CN102096626A (en) * 2010-12-27 2011-06-15 意法·爱立信半导体(北京)有限公司 Mobile terminal and processing method of test log thereof
CN103401704A (en) * 2013-07-24 2013-11-20 佳都新太科技股份有限公司 Implementation scheme of distributed log collecting server
US20140164208A1 (en) * 2012-12-06 2014-06-12 Miami International Securities Exchange, LLC Systems and Methods for Testing a Financial Trading System
CN105191211A (en) * 2013-12-09 2015-12-23 北京新媒传信科技有限公司 Log extraction method under server cluster and server cluster
CN107038162A (en) * 2016-02-03 2017-08-11 滴滴(中国)科技有限公司 Real time data querying method and system based on database journal
CN107480277A (en) * 2017-08-22 2017-12-15 北京京东尚科信息技术有限公司 Method and device for web log file collection
CN107704522A (en) * 2017-09-11 2018-02-16 郑州云海信息技术有限公司 A kind of violation log-rank management method and system
CN108600300A (en) * 2018-03-06 2018-09-28 北京思空科技有限公司 Daily record data processing method and processing device
CN108874558A (en) * 2018-05-31 2018-11-23 康键信息技术(深圳)有限公司 News subscribing method, electronic device and the readable storage medium storing program for executing of distributed transaction
CN110347520A (en) * 2019-06-28 2019-10-18 北京大米科技有限公司 Method, apparatus, electronic equipment and the medium of message distribution
CN110765085A (en) * 2019-10-12 2020-02-07 捷开通讯(深圳)有限公司 Log information writing method, system, storage medium and mobile terminal
CN110795412A (en) * 2019-10-10 2020-02-14 北京达佳互联信息技术有限公司 Log information processing method and device and storage medium
CN111241078A (en) * 2020-01-07 2020-06-05 网易(杭州)网络有限公司 Data analysis system, data analysis method and device
CN111309694A (en) * 2018-12-12 2020-06-19 北京奇虎科技有限公司 Log file acquisition method, server, device and system
CN111309696A (en) * 2020-03-20 2020-06-19 中电长城网际系统应用有限公司 Log processing method and device, electronic equipment and readable medium
CN111343045A (en) * 2020-02-14 2020-06-26 青岛聚看云科技有限公司 Method and device for adjusting heartbeat frequency
CN111865631A (en) * 2019-04-28 2020-10-30 普天信息技术有限公司 Fault information reporting method and device, electronic equipment and readable storage medium
CN112395157A (en) * 2020-11-13 2021-02-23 广州至真信息科技有限公司 Audit log obtaining method and device, computer equipment and storage medium

Patent Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090061860A1 (en) * 2003-08-05 2009-03-05 John Yue Jun Jiang Predictive intelligence
US20050049945A1 (en) * 2003-08-27 2005-03-03 International Business Machines Corporation Database log capture program that publishes transactions to multiple targets to handle unavailable targets by separating the publishing of subscriptions and subsequently recombining the publishing
CN102096626A (en) * 2010-12-27 2011-06-15 意法·爱立信半导体(北京)有限公司 Mobile terminal and processing method of test log thereof
US20140164208A1 (en) * 2012-12-06 2014-06-12 Miami International Securities Exchange, LLC Systems and Methods for Testing a Financial Trading System
CN103401704A (en) * 2013-07-24 2013-11-20 佳都新太科技股份有限公司 Implementation scheme of distributed log collecting server
CN105191211A (en) * 2013-12-09 2015-12-23 北京新媒传信科技有限公司 Log extraction method under server cluster and server cluster
CN107038162A (en) * 2016-02-03 2017-08-11 滴滴(中国)科技有限公司 Real time data querying method and system based on database journal
CN107480277A (en) * 2017-08-22 2017-12-15 北京京东尚科信息技术有限公司 Method and device for web log file collection
CN107704522A (en) * 2017-09-11 2018-02-16 郑州云海信息技术有限公司 A kind of violation log-rank management method and system
CN108600300A (en) * 2018-03-06 2018-09-28 北京思空科技有限公司 Daily record data processing method and processing device
CN108874558A (en) * 2018-05-31 2018-11-23 康键信息技术(深圳)有限公司 News subscribing method, electronic device and the readable storage medium storing program for executing of distributed transaction
CN111309694A (en) * 2018-12-12 2020-06-19 北京奇虎科技有限公司 Log file acquisition method, server, device and system
CN111865631A (en) * 2019-04-28 2020-10-30 普天信息技术有限公司 Fault information reporting method and device, electronic equipment and readable storage medium
CN110347520A (en) * 2019-06-28 2019-10-18 北京大米科技有限公司 Method, apparatus, electronic equipment and the medium of message distribution
CN110795412A (en) * 2019-10-10 2020-02-14 北京达佳互联信息技术有限公司 Log information processing method and device and storage medium
CN110765085A (en) * 2019-10-12 2020-02-07 捷开通讯(深圳)有限公司 Log information writing method, system, storage medium and mobile terminal
CN111241078A (en) * 2020-01-07 2020-06-05 网易(杭州)网络有限公司 Data analysis system, data analysis method and device
CN111343045A (en) * 2020-02-14 2020-06-26 青岛聚看云科技有限公司 Method and device for adjusting heartbeat frequency
CN111309696A (en) * 2020-03-20 2020-06-19 中电长城网际系统应用有限公司 Log processing method and device, electronic equipment and readable medium
CN112395157A (en) * 2020-11-13 2021-02-23 广州至真信息科技有限公司 Audit log obtaining method and device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
付戈等: "面向多应用多租户的消息数据订阅关键技术研究", 《信息网络安全》 *
邢东旭等: "基于消息中间件的订阅/发布系统的研究与设计", 《计算机与信息技术》 *

Also Published As

Publication number Publication date
CN113015203B (en) 2022-08-16

Similar Documents

Publication Publication Date Title
CN112788128B (en) Business information pushing method and device, storage medium and electronic device
CN101667932B (en) Method of network element equipment log management and device
CN111311142B (en) Customized real-time data efficient pushing method and system
CN115114044A (en) Message pushing method, device, equipment and medium
CN113658591A (en) Voice interaction adaptation system for smart home
CN115622906A (en) Application log capturing system and method
CN111723019A (en) Interface debugging method and system
WO2021068959A1 (en) Data processing method and apparatus
CN113015203B (en) Information acquisition method, device, terminal, system and storage medium
CN112235124B (en) Method and device for configuring pico-cell, storage medium and electronic device
CN113992644B (en) Internet of things system based on no-service technology and data processing method thereof
CN115473858A (en) Data transmission method and streaming data transmission system
CN113032054B (en) Service execution method and device, storage medium and electronic device
JP7416936B2 (en) Data acquisition method and equipment
CN114338347A (en) Ampere platform-based fault information out-of-band acquisition method and device
CN115883639A (en) Web real-time message pushing method and device, equipment and storage medium
CN111625412A (en) Flume-based data acquisition method, system, device and storage medium
CN110233747B (en) Data reporting method and cloud platform
CN114079909A (en) Network slice information processing method and device and network equipment
CN111681397A (en) Distribution network automation short message sending method, sending system and storage medium
JP5502051B2 (en) Method for processing step execution results in software application control managed objects
CN115314559B (en) Network service system, abnormal response method thereof, service unit, scheduling processing unit, electronic device and computer storage medium
CN112383924B (en) Base station equipment management method, device and system
CN114003410A (en) Message-based flink real-time service scheduling configuration method and system
CN116431359A (en) Message routing method, system and electronic 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