WO2012089079A1 - Mobile terminal and method for processing test log thereof - Google Patents

Mobile terminal and method for processing test log thereof Download PDF

Info

Publication number
WO2012089079A1
WO2012089079A1 PCT/CN2011/084648 CN2011084648W WO2012089079A1 WO 2012089079 A1 WO2012089079 A1 WO 2012089079A1 CN 2011084648 W CN2011084648 W CN 2011084648W WO 2012089079 A1 WO2012089079 A1 WO 2012089079A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
file
storage device
message log
mobile terminal
Prior art date
Application number
PCT/CN2011/084648
Other languages
French (fr)
Chinese (zh)
Inventor
何琨
李建慧
Original Assignee
意法·爱立信半导体(北京)有限公司
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 意法·爱立信半导体(北京)有限公司 filed Critical 意法·爱立信半导体(北京)有限公司
Publication of WO2012089079A1 publication Critical patent/WO2012089079A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2268Logging of test results
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/10Monitoring; Testing of transmitters
    • H04B17/15Performance testing
    • H04B17/18Monitoring during normal operation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/24Arrangements for testing

Definitions

  • a communication protocol stack is one of the core components of the entire mobile terminal system.
  • the development of the communication protocol stack mainly requires two aspects of software development and actual testing.
  • it is necessary to perform various tests such as protocol consistency and interoperability.
  • the message log of the mobile terminal is fed back to the R&D personnel, so that the problem occurring in the test can be solved according to the message log. Therefore, the method of analyzing and processing according to the message of the mobile terminal has become the communication protocol stack.
  • the online message log storage refers to the need to connect the mobile communication terminal to the computer during the test, and configure and save the message log file by using the message log management tool on the computer.
  • the specific method is as follows: Universal Asynchronous Receiver/Transmitter (UART), or Universal Serial Bus (USB), or Ethernet (Ethernet) Transmission Control Protocol/Internet
  • UART Universal Asynchronous Receiver/Transmitter
  • USB Universal Serial Bus
  • Ethernet Ethernet
  • Transmission Control Protocol/Internet A connected device such as a protocol (Transfer Control Protocol I Internet Protocol, TCP/IP) connects the mobile communication terminal to be tested to the computer.
  • the message log management tool on the computer sends the configuration information to the mobile communication terminal to be tested, and the mobile communication terminal filters the message generated during the test according to the configuration information, so that the filtered message can be passed.
  • the above connected device is transmitted to the computer in real time, and the message log file is saved on the computer.
  • offline message log storage means that mobile communication terminals and computing are not required during testing.
  • the machine is connected. When only the offline message log storage function is configured, it needs to be connected to the computer.
  • the message log management tool on the computer is used to deliver the configuration command to the mobile communication terminal. After the completion, disconnect the terminal to be tested from the computer and restart the mobile communication terminal to activate the offline message log storage.
  • the mobile terminal After the mobile communication terminal is running, the mobile terminal can filter all the messages generated by the system according to the message filtering table to obtain the required messages, and then directly store the messages in the local memory of the mobile communication terminal. If the current message log file is full, subsequent messages will be discarded.
  • a portable computer for example, a portable computer
  • the connected device not only increases the workload of the test, but also makes it difficult for the tester to test. It also increases the cost of the test, reduces the efficiency of the test, and makes the test process less friendly and affects the user experience.
  • the present invention provides a method for processing a test log of a mobile terminal and a mobile terminal, which is capable of connecting a terminal to a computer and the like in a related art, which results in a large test workload, inconvenience in testing, and high test cost. Avoid connecting the terminal to equipment such as if in the process of testing the mobile terminal, reducing the test workload, facilitating the test, reducing the test cost, and improving the test friendliness.
  • a method of processing a mobile terminal test log includes: the mobile terminal searches for the first configuration file in the storage device, and parses the found first configuration file to obtain a message filtering rule, where the The message filtering rule is used to indicate the type of the message to be stored.
  • the mobile terminal stores the message in the testing process as a message log in the storage device according to the message filtering rule.
  • the method further includes: the mobile terminal searching for the second configuration file in the storage device, and searching for the second configuration file
  • the second configuration file is used for parsing, wherein the second configuration file is used to indicate whether the message log needs to be saved on the storage device; after parsing the second configuration file, if it is determined according to the second configuration file Saving the message log on the storage device, the mobile terminal determines that the first configuration file needs to be searched.
  • the storing, by the mobile terminal, the message in the test process as the message log according to the message filtering rule includes: the mobile terminal saves the message in the test process in the buffer area; the storage space in the buffer area is occupied In the case of full, the message in the buffer area is stored in the storage device; the buffer area is cleared, and the newly generated message during the test is continuously stored in the buffer area.
  • the storing, by the mobile terminal, the message in the test process as the message log according to the message filtering rule includes: creating a message log file and a message log index file in the storage device, and setting the message log file Writing a message in the cache area to the message log file for the message log file being stored, and saving the name of the message log file in the message log index file; When the occupied space reaches a predetermined value, a new message log file is created, the new message log file is set as a message log file being stored, and the message stored in the cache area during the test is continuously written.
  • the message log file in the message log index file Sorting the name, wherein the predetermined value is smaller than the storage of the storage device Space, and greater than or equal to the storage space of the buffer.
  • the method further includes: indexing the file according to the message log The sorting of the middle message log file deletes the earliest created message log file, creates a new message log file, sets the new message log file as a message log file being stored, and stores the message in the cache area to The new message log file.
  • the searching, by the mobile terminal, the first configuration file in the storage device includes: the mobile terminal storing the first identifier according to the predetermined identifier of the first configuration file, or storing the first A specified directory identifier of the configuration file, and the first configuration file is searched for in the storage device.
  • a mobile terminal includes a search and analysis module, a storage device, and a control module, wherein the search and analysis module is configured to search for a first configuration file in the storage device, and parse the first configuration file that is found. And obtaining a message filtering rule, where the message filtering rule is used to indicate a message type that needs to be recorded; the control module is configured to: during the testing process of the mobile terminal, the message in the testing process according to the message filtering rule Stored as a message log; the storage device is configured to store a message at a control of the control module.
  • the searching and parsing module is further configured to: after searching the first configuration file, look up a second configuration file in the storage device, and parse the found second configuration file, where The second configuration file is used to indicate whether the message log needs to be saved on the storage device. After parsing the second configuration file, if it is determined according to the second configuration file, it is determined that the message log needs to be saved on the storage device. And the lookup and parsing module determines that the first configuration file needs to be searched.
  • the mobile terminal further includes a buffer area
  • the control module is further configured to save the message in the test process in the buffer area, where the storage space of the buffer area is occupied, the control module
  • the message in the buffer is stored in the storage device, after which the buffer is emptied and the newly generated message during the test is stored to the buffer.
  • the searching and parsing module is configured to search for the first device in the storage device according to a predetermined identifier of the first configuration file or a specified directory identifier of the first configuration file in the storage device.
  • a configuration file is configured to search for the first device in the storage device according to a predetermined identifier of the first configuration file or a specified directory identifier of the first configuration file in the storage device.
  • the present invention proposes that the configuration file on the storage device is directly obtained and parsed by the mobile terminal, so that the message log in the test process is stored according to the instruction of the configuration file, so that the file is configured in advance by using a device such as a computer, and then the file is stored.
  • a device such as a computer
  • the test process can be easily tested without using a dedicated connection device or even carrying a computer. Carry out, reduce the cost and workload of the test, and improve test friendliness.
  • 1 is a flowchart of a method for processing a test log of a mobile terminal according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a process for storing a file and storing a log message in a method for processing a test log of a mobile terminal according to an embodiment of the present invention
  • FIG. 3 is a flowchart of processing for parsing a configuration file in a method for processing a test log of a mobile terminal according to an embodiment of the present invention
  • FIG. 4 is a flowchart of a process of saving a message to a message log file in a message cluster buffer in a method for processing a test log of a mobile terminal according to an embodiment of the present invention
  • FIG. 5 is a block diagram of a mobile terminal in accordance with an embodiment of the present invention. detailed description
  • the terminal test needs to connect the terminal with a computer, which results in a large test workload, inconvenience in testing, and high test cost.
  • the present invention proposes that the mobile terminal directly acquires and parses the configuration file on the storage device. Therefore, the message log during the testing process is stored according to the indication of the configuration file, so that the problem that the mobile terminal needs to be connected to the computer and the like can be avoided in the related art, so that the test process does not need a special connection.
  • Equipment even without carrying a computer, can facilitate the test, reduce the cost and workload of the test, and improve test friendliness.
  • a method for processing a mobile terminal test log is provided.
  • a method for processing a test log of a mobile terminal includes: Step Si01: A mobile terminal searches for a first configuration file in a storage device, and parses the found first configuration file to obtain a message. a filtering rule, where a message filtering rule is used to indicate a type of message that needs to be stored;
  • Step S103 During the testing process of the mobile terminal, the mobile terminal stores the message in the testing process as a message log in the storage device according to the message filtering rule.
  • the configuration file on the storage device is directly obtained and parsed by the mobile terminal, so that the message log during the testing process is stored according to the indication of the configuration file, so that the file configuration of the storage device is performed in advance by using a device such as a computer.
  • a device such as a computer.
  • the problem of testing can only be carried out after the device is connected, so that the testing process does not require special connection equipment, and even does not need to carry a computer, which can facilitate the test, reduce the cost and workload of the test, and improve the test friendliness.
  • the mobile terminal searches for the second configuration file in the storage device, and parses the found second configuration file, where the second configuration file is used to indicate whether the The message log is saved on the storage device. After the second configuration file is parsed, if it is determined according to the second configuration file that the message log needs to be saved on the storage device, the mobile terminal determines that the first configuration file needs to be searched. On the other hand, if the second configuration file is parsed and it is known that the message log of the test needs to be saved on a computer or the like, the subsequent processing of the present invention is not performed.
  • the mobile terminal may first save the message in the test process in the buffer area; if the storage space of the buffer area is occupied, The messages in the buffer are stored in the storage device; the buffer can then be emptied and the new messages generated during the test can continue to be stored in the cache. In this way, frequent access to the storage device can be avoided, and the efficiency of message logging can be improved.
  • the message log file and the message log index file may be first created in the storage device, and the message log file is set to be in progress.
  • the stored message log file (for example, can be marked by a pointer, etc.), when saving the log, the message in the buffer area can be written into the message log file, and the name of the message log file is saved in the message log index file;
  • a new message log file is created, the new message log file is set as a message log file being stored, and the message stored in the buffer area during the test is continuously written.
  • the new message log file Into the new message log file, and update the creation of the message log file in the message log index file, and sort the name of the message log file in the message log index file according to the creation time of the message log file, wherein, the reservation The value is less than the storage space of the storage device and is greater than or equal to the storage space of the cache area.
  • the present invention proposes In the case where the storage space of the storage device is full, such as If there is still a message that needs to be stored as a message log, the message log file that is created first may be deleted according to the sorting of the message log file in the message log index file, and a new message log file is created, and the new message log file is created. Set to a message log file that is being stored, and store the messages in the cache to the new message log file.
  • the storage space of the storage device used to record the message log is WMB (or can be understood as the storage space for storing message logs in the storage device is 10MB:), which stipulates that each message log file can occupy no more than MB.
  • the space in the buffer area is (I5MB).
  • the message is first saved in the buffer area.
  • the buffer area stores 0.5MB of the message, the buffer area is occupied. Store the messages in the cache to the storage device.
  • the buffer area is cleared; if the buffer area is filled by the message, the 0.5MB message in the buffer area is written into the file logl, and then , empty the buffer area.
  • the ⁇ cache area will be filled for the first time, and the file needs to be continuously written to the storage device. However, it will be judged that the size of the file logi has reached 1 MB. Continue to store the message to the file iogi. Since only 1MB of the message log file is stored in the storage device, it does not reach 10MB. Therefore, a new message log file can be created in the storage device.
  • the new message log file can be named log2, where The "2" in the name identifier is used to indicate that the file is the second created file, and the pointer points to the file log2.
  • the message log files logl and iog2 exist in the storage device, and the message log index file is required.
  • the message log index file can be queried to determine that the file log1 is created at the earliest time. In this case, the message log file in the storage device can be deleted. Create the message log file logl 1, update the message log index file, and point the pointer to the file logl l to continue writing the message in the buffer to iogU. If the file logl l is full, you need to delete the file iog2 and execute a similar Processing, through this way of loop storage, can ensure that new messages can be saved.
  • the first configuration file B is stored in the storage device, and the naming of the first configuration file may be uniformly standardized, or the directory name where the first configuration file is located may be uniformly standardized, so that the mobile terminal is in the storage device.
  • the first configuration file may be found in the storage device according to the name identifier of the first configuration file or the specified directory identifier of the first configuration file stored in the storage device.
  • the second profile it can also be stored in a similar manner for the mobile terminal to look up.
  • the file configuration and the message storage process in the processing method of the mobile terminal test log are as follows:
  • Step S2i using the message log management tool, can activate or deactivate the function of the message log local storage, and generate a corresponding configuration file, which describes whether to activate the function of the message local storage (ie, configuring the above
  • the second configuration file by configuring the second configuration file, can set whether to save the message log locally on the mobile terminal). In this step, you do not need to connect the computer to the mobile communication terminal to be tested. Just run the message log management tool on the if computer to complete the configuration.
  • the message log management tool is an application installed on a computer, and has various functions of configuring, parsing, displaying, and storing communication protocol messages.
  • Step S22 using a message log management tool, selecting a module that needs to output its message, and generating a corresponding configuration file (ie, the first configuration file described above), the configuration file is mainly used to describe which modules input messages need to be displayed. Which module's output messages need to be displayed, which modules' debug information needs to be displayed, and how these messages or messages are displayed. That is, the configuration file is used to describe the types of messages that need to be logged into the message log. Similar to step S21, in this step, it is also not necessary to connect the computer to the mobile communication terminal to be tested, as long as the calculation is run.
  • the message log management tool on the machine can be configured.
  • step S23 the above two configuration files are saved in the local storage of the mobile communication terminal (for example, can be inserted into the terminal).
  • the local storage here refers to a separate memory card, such as a Secure Digital Card (SD Card) and a Multimedia Card (MMC).
  • SD Card Secure Digital Card
  • MMC Multimedia Card
  • Step S24 when the mobile terminal is powered on, reading the two configuration files in the local storage, and performing parsing, thereby enabling or disabling the local storage function of the message log; if determined according to the second configuration file, the local storage function of the terminal If it is disabled, all the following steps are skipped; if it is determined according to the second configuration file that the local storage function is activated, the processing shown in FIG. 3 is continued.
  • Step S25 The terminal saves the message log file generated during the test in the buffer area, and once the buffer area is occupied, the message in the buffer area is stored in the storage device.
  • a cyclic storage method is adopted, and the specific process will be described below in conjunction with FIG.
  • Step S3 i When the system is started, the second configuration file is read and parsed to determine whether the local storage function needs to be activated. If yes, the local storage function is allowed to be started, and step S32 is executed otherwise, and all the following steps are skipped, and the processing ends;
  • Step S32 If the local storage function is started, continue to read the first configuration file and parse the first configuration file.
  • Step S33 and then configuring a message filtering table according to the parsing result; if it is determined that the message filtering table configuration is successful, step S34 is performed, otherwise step S35 is performed;
  • Step S34 starting a local storage function of the message log
  • step S35 it is checked whether there is a message filtering table that has been used before (preferably, it can be found whether there is a message filtering table that was correctly configured last time). If the message filtering table is found, step S36 is performed; otherwise, step 37 is performed. ; Step S36, the previously used message filtering table is enabled, and then step S34 is performed; Step S37, the default message filtering table is enabled (the message filtering table is set for the general case), and then step S34 is performed.
  • Fig. 4 shows the processing of storing the message in the buffer area to the message log file in the above step S25. As shown in Figure 4, the specific process is as follows:
  • Step S41 setting a local storage space for storing the message log and setting a size of the message log file, and the value of this space is called the maximum available space.
  • the maximum available space should be as large as possible so that message logs can be stored as much as possible;
  • a new message log file is created. Query all the space occupied by the existing message log file. If the value is less than the maximum available space, create a new message log file and set the newly created message log file to the current message log file. If the value is greater than The maximum available space, just query the message log index file, find the oldest message log file, delete the oldest message log file, and then create a new message log file, and the new message log file is set to current Message log file.
  • the message log files need to be numbered sequentially, and the corresponding file name is generated according to this number. For example, it can be named as message log.
  • Step S43 Create a message log index file, which is used to store the message log file name in ascending order according to the message log file number.
  • This message log index file can also be saved in the local storage of the terminal, so that the information of these message logs will not be lost after the system is rebooted.
  • Step S44 determining whether there is a debug message in the module or a message transmitted between the modules; if yes, calling the message filtering table, and executing step S45, otherwise continuing to wait for the message;
  • Step S45 determining whether the above message can be found in the filter table, and if yes, performing the step S46; otherwise, the message is not saved, and the other messages are continuously judged;
  • Step S46 the message is stored in the buffer area
  • Step S47 determining whether the buffer area is full. If the buffer area is full, executing step S48, otherwise returning to step S44, continuing to store the message to the buffer area;
  • Step S48 determining whether the currently stored message log file has sufficient remaining storage space, if the remaining space of the current log file is larger than the buffer storage space B, step S49 is performed; otherwise, step S50 is performed;
  • Step S49 writing the content of the buffer to the current message log file
  • Step S50 If the remaining space of the current message log file is smaller than the length of the buffer, fill the current message log file, and close the current message log file.
  • Step S51 creating a new message log file, and setting the file as a message log file currently being stored;
  • Step S52 Write the remaining message content in the buffer to the current message log file.
  • Step S53 Update the message log index file, that is, as long as the message log file is created or deleted, all the message log files are written into the message log index file in the order of their numbers.
  • the message log index file is first created. And then write the file names of all the message log files to the message log index file in the order of their numbers.
  • the message log can be taken out from the local storage (storage device) of the terminal according to the needs of the user, and decoded by the message log management tool.
  • the message log management tool uses the message log management tool on the computer to decode the message log file, making it an easy-to-read format, which can then be reflected in the message log. Analysis of problems in the testing process.
  • a mobile terminal is also provided.
  • the mobile terminal includes a lookup and parsing module 501, a storage device 502, and a control module 503, where
  • the search and analysis module 501 is connected to the storage device 502.
  • the search and analysis module 501 is configured to search the first configuration file in the storage device 502, and parse the first configuration file to obtain a message filtering rule, where the message filtering is performed.
  • the rule is used to indicate the type of the message to be recorded;
  • the control module 503 is connected to the search and parsing module 501 and the storage device 502, and is configured to store the message in the test process as a message log according to the message filtering rule during the testing process of the mobile terminal;
  • the storage device 502 is configured to store messages under the control of the control module 503.
  • the locating and parsing module is further configured to: after finding the first configuration file, look up the second configuration file in the storage device 502, and parse the found second configuration file, where the second configuration file indicates whether the The message log is saved on the storage device 502. After the second configuration file is parsed, if it is determined according to the second configuration file that the message log needs to be saved on the storage device, the search and parsing module 501 determines that the first configuration file needs to be searched.
  • the mobile terminal further includes a buffer area (shown) connected to the control module 503 and the storage device 502, and the control module 503 is further configured to save the message during the test in the buffer area, and the storage space in the buffer area is In the case of fullness, the control module 503 stores the message in the buffer area into the storage device 502, then clears the buffer area, and continues to store the newly generated message during the test to the buffer area.
  • a buffer area shown
  • the control module 503 stores the message in the buffer area into the storage device 502, then clears the buffer area, and continues to store the newly generated message during the test to the buffer area.
  • the lookup and parsing module 501 may specifically look up the first configuration file in the storage device 502 according to the predetermined identifier of the first configuration file or the specified directory identifier of the first configuration file stored in the storage device 502.
  • control module can also control the process of the above-mentioned cyclic storage of the buffer area and the storage device.
  • the specific execution manner has been described before and will not be repeated here.
  • the configuration file on the storage device is directly obtained and parsed by the mobile terminal, so that the message log in the test process is stored according to the indication of the configuration file, so that The device and other devices perform file configuration on the storage device in advance.
  • the problem of testing can be carried out after the mobile terminal is connected to a computer, etc., so that the test process does not require special connection equipment, and even does not need to carry a computer, which can facilitate the test, reduce the cost and workload of the test, and improve the test.

Landscapes

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

Abstract

Disclosed are a mobile terminal and a method for processing a test log thereof. The method includes: searching, by the mobile terminal, for a first configuration file in a storage device and parsing the discovered first configuration file to obtain a message filter rule, wherein the message filter rule is used for indicating the message type to be stored; and storing, by the mobile terminal, messages during the test thereof in the storage device as a messages log according to the message filter rule. By means of the present invention, the problem that the test can be carried out only after the mobile terminal is connected to a device such as a computer in the relevant art can be avoided, as a result, the test can be carried out without a dedicated connection device or even without a computer, which can bring convenience to the test, reduce the cost and workload during the test and improve the friendliness degree of the test.

Description

i试日志的处理方法和移
Figure imgf000003_0001
i test log processing method and shift
Figure imgf000003_0001
在移动通信系统中,通信协议栈是整个移动终端系统核心组成部分之一。 通信协议栈的开发主要需要借助软件开发和实际测试两个方面。 在通信协议 栈的开发过程中, 需要对其进行协议的一致性、 互操作性等多种测试。 为了 对測试中出现的问题进行分析研究, 就需要在现场测试过程中保存移动终端 的消息日志。 然后将出现过问题的消息日志反馈给研发人员, 这样就能够根 据消息日志对测试中出现的问题进行研究解决, 因此, 这种根据移动终端消 息曰志进行分析处理的方式已经成为了通信协议栈开发的主要调试方法之 目前在移动通信终端通信协议栈软件的研发过程中, 通常对通信协议的 消息流程进行分析的方法主要包括以下两种: ( 1 ) 在线消息日志存储; (2) 离线消息日志存储。 In a mobile communication system, a communication protocol stack is one of the core components of the entire mobile terminal system. The development of the communication protocol stack mainly requires two aspects of software development and actual testing. In the development process of the communication protocol stack, it is necessary to perform various tests such as protocol consistency and interoperability. In order to analyze the problems in the test, it is necessary to save the message log of the mobile terminal during the field test. Then, the message log of the problem is fed back to the R&D personnel, so that the problem occurring in the test can be solved according to the message log. Therefore, the method of analyzing and processing according to the message of the mobile terminal has become the communication protocol stack. The main debugging methods developed Currently, in the development process of the communication protocol stack software of the mobile communication terminal, the methods for analyzing the message flow of the communication protocol mainly include the following two types: (1) online message log storage; (2) offline message Log storage.
其中, 在线消息日志存储指的是在测试时需要将移动通信终端与计算机 相连, 禾用计算机上的消息日志管理工具进行配置和保存消息日志文件。 具 体方式如下: 使用通用非同步收发传输器 ( Universal Asynchronous Receiver/Transmitter ,简称为 UART )、或者通用串行总线 ( Universal Serial Bus, 简称为 USB)、 或者以太网 (Ethernet) 的传输控制协议 /网际协议 (Transfer Control Protocol I Internet Protocol, TCP/IP) 等连接设备, 将待测试的移动通 信终端和 算机相连。 利 ^什算机上的消息日志管理工具将配置信息发送给 待测试的移动通信终端, 移动通信终端根据此配置信息, 对测试过程中生成 的消息进行过滤, 这样就可以将过滤后得到的消息通过上述的连接设备实时 传输给计算机, 将消息日志文件保存在 算机上。  Among them, the online message log storage refers to the need to connect the mobile communication terminal to the computer during the test, and configure and save the message log file by using the message log management tool on the computer. The specific method is as follows: Universal Asynchronous Receiver/Transmitter (UART), or Universal Serial Bus (USB), or Ethernet (Ethernet) Transmission Control Protocol/Internet A connected device such as a protocol (Transfer Control Protocol I Internet Protocol, TCP/IP) connects the mobile communication terminal to be tested to the computer. The message log management tool on the computer sends the configuration information to the mobile communication terminal to be tested, and the mobile communication terminal filters the message generated during the test according to the configuration information, so that the filtered message can be passed. The above connected device is transmitted to the computer in real time, and the message log file is saved on the computer.
另外, 离线消息日志存储指的是在测试时不需要将移动通信终端与计算 机相连, 仅配置离线消息日志存储功能的时候需要和计算机相连, 利用计算 机上的消息日志管理工具下发配置命令给移动通信终端。 完成之后, 断开待 测终端与 算机连接, 并重新启动移动通信终端, 这样才能激活离线消息日 志存储。 当移动通信终端运行之后, 移动终端就能够根据消息过滤表对系统 产生所有消息进行过滤, 丛而得到所需要的消息, 然后再将这些消息直接存 储到移动通信终端的本地存储器中。 如果当前的消息日志文件存满的话, 之 后的消息就会被丢弃。 In addition, offline message log storage means that mobile communication terminals and computing are not required during testing. The machine is connected. When only the offline message log storage function is configured, it needs to be connected to the computer. The message log management tool on the computer is used to deliver the configuration command to the mobile communication terminal. After the completion, disconnect the terminal to be tested from the computer and restart the mobile communication terminal to activate the offline message log storage. After the mobile communication terminal is running, the mobile terminal can filter all the messages generated by the system according to the message filtering table to obtain the required messages, and then directly store the messages in the local memory of the mobile communication terminal. If the current message log file is full, subsequent messages will be discarded.
在采用上述的在线消息日志存储或离线消息日志存储方法时, 如果需要 对待测移动通信终端进行测试, 需要携带计算机 (例如, 可以是便携式计算 机) 作为测试配置工具、 以及移动通信终端与计算机之间的连接设备, 不仅 会增加测试的工作量, 不便于測试人员进行測试, 而且会增加测试的成本, 降低测试的效率, 导致測试过程不够友好, 影响用户体验。  In the above-mentioned online message log storage or offline message log storage method, if the mobile communication terminal to be tested is required to be tested, a portable computer (for example, a portable computer) is required as a test configuration tool, and between the mobile communication terminal and the computer. The connected device not only increases the workload of the test, but also makes it difficult for the tester to test. It also increases the cost of the test, reduces the efficiency of the test, and makes the test process less friendly and affects the user experience.
针对相关技术中终端测试需要将终端与讦算机等设备进行连接而导致测 试工作量大、 不便于进行测试、 测试成本高的问题, 目前尚未提出有效的解 决方案。  In view of the fact that the terminal test in the related art requires connecting the terminal with a computer such as a computer, resulting in a large test workload, inconvenience in testing, and high test cost, an effective solution has not been proposed yet.
针对相关技术中终端测试需要将终端与计算机等设备进行连接而导致测 试工作量大、 不便于进行测试、 测试成本高的问题, 本发明提出一种移动终 端测试日志的处理方法和移动终端, 能够避免在对移动终端进行测试的过程 中需要将终端与 if算机等设备连接, 减少测试工作量、 方便测试的进行、 降 低测试成本、 提高测试友好度的目的。 The present invention provides a method for processing a test log of a mobile terminal and a mobile terminal, which is capable of connecting a terminal to a computer and the like in a related art, which results in a large test workload, inconvenience in testing, and high test cost. Avoid connecting the terminal to equipment such as if in the process of testing the mobile terminal, reducing the test workload, facilitating the test, reducing the test cost, and improving the test friendliness.
本发明的技术方案是这样实现的:  The technical solution of the present invention is implemented as follows:
根据本发明的一个方面, 提供了一种移动终端测试日志的处理方法。 根据本发明实施例的移动终端测试日志的处理方法包括: 移动终端在存 储设备中查找第一配置文件, 并对查找到的所述第一配置文件进行解析, 得 到消息过滤规则, 其中, 所述消息过滤规则用于指示需要存储的消息类型; 在所述移动终端的测试过程中, 所述移动终端根据所述消息过滤规则将测试 过程中的消息作为消息日志存储在所述存储设备中。 其中, 在所述移动终端在所述存储设备中查找第一配置文件之前, 所述 方法进一步包括: 所述移动终端在所述存储设备中查找第二配置文件, 并对 查找到的所述第二配置文件进行解析, 其中, 所述第二配置文件用于指示是 否需要在所述存储设备上保存消息日志; 在对所述第二配置文件解析后, 如 果根据所述第二配置文件确定需要在所述存储设备上保存消息日志, 则所述 移动终端确定需要查找所述第一配置文件。 According to an aspect of the present invention, a method of processing a mobile terminal test log is provided. The processing method of the mobile terminal test log according to the embodiment of the present invention includes: the mobile terminal searches for the first configuration file in the storage device, and parses the found first configuration file to obtain a message filtering rule, where the The message filtering rule is used to indicate the type of the message to be stored. During the testing process of the mobile terminal, the mobile terminal stores the message in the testing process as a message log in the storage device according to the message filtering rule. Before the mobile terminal searches for the first configuration file in the storage device, the method further includes: the mobile terminal searching for the second configuration file in the storage device, and searching for the second configuration file The second configuration file is used for parsing, wherein the second configuration file is used to indicate whether the message log needs to be saved on the storage device; after parsing the second configuration file, if it is determined according to the second configuration file Saving the message log on the storage device, the mobile terminal determines that the first configuration file needs to be searched.
另外, 所述移动终端根据所述消息过滤规则将测试过程中的消息存储为 消息日志包括: 所述移动终端将测试过程中的消息保存在缓存区中; 在所述 缓存区的存储空间被占满的情况下, 将所述缓存区中的消息存储至所述存储 设备中; 清空所述缓存区, 并继续将测试过程中新产生的消息存储至所述缓 存区。  In addition, the storing, by the mobile terminal, the message in the test process as the message log according to the message filtering rule includes: the mobile terminal saves the message in the test process in the buffer area; the storage space in the buffer area is occupied In the case of full, the message in the buffer area is stored in the storage device; the buffer area is cleared, and the newly generated message during the test is continuously stored in the buffer area.
并且, 优选地, 所述移动终端根据所述消息过滤规则将测试过程中的消 息存储为消息日志包括: 在所述存储设备中创建消息日志文件和消息日志索 引文件, 将所述消息日志文件置为正在进行存储的消息日志文件, 将所述缓 存区中的消息写入所述消息日志文件中, 并在所述消息日志索引文件中保存 所述消息日志文件的名称; 在所述消息日志文件所占的空间达到预定值的情 况下, 创建新的消息日志文件, 将所述新的消息日志文件置为正在进行存储 的消息日志文件, 继续将测试过程中所述缓存区中存储的消息写入所述新的 消息日志文件中, 并在所述消息日志索引文件中对消息日志文件的创建情况 进行更新, 并根据消息日志文件的创建时间对所述消息日志索引文件中消息 曰志文件的名称进行排序, 其中, 所述预定值小于所述存储设备的存储空间, 并 大于或等于所述缓存区的存储空间。  And, the storing, by the mobile terminal, the message in the test process as the message log according to the message filtering rule includes: creating a message log file and a message log index file in the storage device, and setting the message log file Writing a message in the cache area to the message log file for the message log file being stored, and saving the name of the message log file in the message log index file; When the occupied space reaches a predetermined value, a new message log file is created, the new message log file is set as a message log file being stored, and the message stored in the cache area during the test is continuously written. Entering into the new message log file, and updating the creation of the message log file in the message log index file, and according to the creation time of the message log file, the message log file in the message log index file Sorting the name, wherein the predetermined value is smaller than the storage of the storage device Space, and greater than or equal to the storage space of the buffer.
并且, 优选地, 在所述存储设备的存储空间被占满的情况下, 如果所述 缓存区中还存在需要作为消息日志存储的消息, 则所述方法进一步包括: 根 据所述消息日志索引文件中消息日志文件的排序将最早创建的消息日志文件 删除, 创建新的消息日志文件, 将该新的消息日志文件置为正在进行存储的 消息日志文件, 并将所述缓存区中的消息存储至该新的消息日志文件。  And, preferably, in a case that the storage space of the storage device is full, if there is still a message that needs to be stored as a message log in the buffer area, the method further includes: indexing the file according to the message log The sorting of the middle message log file deletes the earliest created message log file, creates a new message log file, sets the new message log file as a message log file being stored, and stores the message in the cache area to The new message log file.
此外, 所述移动终端在所述存储设备中查找第一配置文件包括: 所述移 动终端根据所述第一配置文件的预定标识、 或所述存储设备中存储所述第一 配置文件的指定目录标识, 在所述存储设备中查找所述第一配置文件。 In addition, the searching, by the mobile terminal, the first configuration file in the storage device includes: the mobile terminal storing the first identifier according to the predetermined identifier of the first configuration file, or storing the first A specified directory identifier of the configuration file, and the first configuration file is searched for in the storage device.
根据本发明的另一方面, 提供了一种移动终端。 该移动终端包括查找和 解析模块、 存储设备以及控制模块, 其中, 所述查找和解析模块用于在所述 存储设备中查找第一配置文件, 并对查找到的所述第一配置文件进行解析, 得到消息过滤规则, 其中, 所述消息过滤规则用于指示需要记录的消息类型; 所述控制模块用于在所述移动终端的测试过程中, 根据所述消息过滤规则将 测试过程中的消息存储为消息日志; 所述存储设备用于在所述控制模块的控 制卜存储消息。  According to another aspect of the present invention, a mobile terminal is provided. The mobile terminal includes a search and analysis module, a storage device, and a control module, wherein the search and analysis module is configured to search for a first configuration file in the storage device, and parse the first configuration file that is found. And obtaining a message filtering rule, where the message filtering rule is used to indicate a message type that needs to be recorded; the control module is configured to: during the testing process of the mobile terminal, the message in the testing process according to the message filtering rule Stored as a message log; the storage device is configured to store a message at a control of the control module.
另外, 所述查找和解析模块还用于在查找所述第一配置文件之前, 在所 述存储设备中查找第二配置文件,并对查找到的所述第二配置文件进行解析, 其中,所述第二配置文件用于指示是否需要在所述存储设备上保存消息日志; 在对所述第二配置文件解析后, 如果根据所述第二配置文件确定需要在所述 存储设备上保存消息日志, 则所述查找和解析模块确定需要查找所述第一配 置文件。  In addition, the searching and parsing module is further configured to: after searching the first configuration file, look up a second configuration file in the storage device, and parse the found second configuration file, where The second configuration file is used to indicate whether the message log needs to be saved on the storage device. After parsing the second configuration file, if it is determined according to the second configuration file, it is determined that the message log needs to be saved on the storage device. And the lookup and parsing module determines that the first configuration file needs to be searched.
该移动终端还包括缓存区, 并且, 所述控制模块还用于将测试过程中的 消息保存在缓存区中, 在所述缓存区的存储空间被占满的情况下, 所述控制 模块将所述缓存区中的消息存储至所述存储设备中, 之后清空所述缓存区, 并继续将测试过程中新产生的消息存储至所述缓存区。  The mobile terminal further includes a buffer area, and the control module is further configured to save the message in the test process in the buffer area, where the storage space of the buffer area is occupied, the control module The message in the buffer is stored in the storage device, after which the buffer is emptied and the newly generated message during the test is stored to the buffer.
优选地, 所述查找和解析模块用于根据所述第一配置文件的预定标识、 或所述存储设备中存储所述第一配置文件的指定目录标识, 在所述存储设备 中查找所述第一配置文件。  Preferably, the searching and parsing module is configured to search for the first device in the storage device according to a predetermined identifier of the first configuration file or a specified directory identifier of the first configuration file in the storage device. A configuration file.
本发明提出由移动终端直接获取并解析存储设备上的配置文件, 从而根 据配置文件的指示来存储测试过程中的消息日志, 这样, 只要借助计算机等 设备预先对存储设备进行文件配置, 之后将存储设备与终端连接, 就能够避 免相关技术中需要将移动终端与什算机等设备连接后才能够进行测试的问 题, 因此使得测试的过程无需借助专门的连接设备, 甚至无需携带计算机, 能够方便测试的进行, 降低测试的成本和工作量, 提高测试友好度。 图 1是根据本发明实施例的移动终端测试日志的处理方法的流程图; 图 2是根据本发明实施例的移动终端测试日志的处理方法中文件配置和 日志消息存储的处理流程图; The present invention proposes that the configuration file on the storage device is directly obtained and parsed by the mobile terminal, so that the message log in the test process is stored according to the instruction of the configuration file, so that the file is configured in advance by using a device such as a computer, and then the file is stored. By connecting the device to the terminal, it is possible to avoid the problem that the related art needs to connect the mobile terminal with a computer such as a computer, so that the test process can be easily tested without using a dedicated connection device or even carrying a computer. Carry out, reduce the cost and workload of the test, and improve test friendliness. 1 is a flowchart of a method for processing a test log of a mobile terminal according to an embodiment of the present invention; FIG. 2 is a flowchart of a process for storing a file and storing a log message in a method for processing a test log of a mobile terminal according to an embodiment of the present invention;
图 3是根据本发明实施例的移动终端测试日志的处理方法中对配置文件 进行解析的处理流程图;  3 is a flowchart of processing for parsing a configuration file in a method for processing a test log of a mobile terminal according to an embodiment of the present invention;
图 4是根据本发明实施例的移动终端测试日志的处理方法中将消息丛缓 存区中保存至消息日志文件的处理流程图;  4 is a flowchart of a process of saving a message to a message log file in a message cluster buffer in a method for processing a test log of a mobile terminal according to an embodiment of the present invention;
图 5是根据本发明实施例的移动终端的框图。 具体实施方式  FIG. 5 is a block diagram of a mobile terminal in accordance with an embodiment of the present invention. detailed description
针对相关技术中终端测试需要将终端与计算机等设备进行连接而导致测 试工作量大、 不便于进行测试、 测试成本高的问题, 本发明提出由移动终端 直接获取并解析存储设备上的配置文件, 从而根据配置文件的指示来存储测 试过程中的消息日志, 这样, 就能够避免相关技术中需要将移动终端与计算 机等设备连接后才能够进行测试的问题, 因此使得测试的过程无需借助专门 的连接设备, 甚至无需携带 算机, 能够方便测试的进行, 降低测试的成本 和工作量, 提高测试友好度。  In the related art, the terminal test needs to connect the terminal with a computer, which results in a large test workload, inconvenience in testing, and high test cost. The present invention proposes that the mobile terminal directly acquires and parses the configuration file on the storage device. Therefore, the message log during the testing process is stored according to the indication of the configuration file, so that the problem that the mobile terminal needs to be connected to the computer and the like can be avoided in the related art, so that the test process does not need a special connection. Equipment, even without carrying a computer, can facilitate the test, reduce the cost and workload of the test, and improve test friendliness.
下面将详细描述本发明的实施例。  Embodiments of the present invention will be described in detail below.
根据本发明的实施例, 提供了一种移动终端测试日志的处理方法。  According to an embodiment of the present invention, a method for processing a mobile terminal test log is provided.
如图 I所示, 根据本发明实施例的移动终端测试日志的处理方法包括: 步骤 Si01, 移动终端在存储设备中查找第一配置文件, 并对查找到的第 一配置文件进行解析, 得到消息过滤规则, 其中, 消息过滤规则用于指示需 要存储的消息类型;  As shown in FIG. 1, a method for processing a test log of a mobile terminal according to an embodiment of the present invention includes: Step Si01: A mobile terminal searches for a first configuration file in a storage device, and parses the found first configuration file to obtain a message. a filtering rule, where a message filtering rule is used to indicate a type of message that needs to be stored;
步骤 S103 , 在移动终端的测试过程中, 移动终端根据消息过滤规则将测 试过程中的消息作为消息日志存储在存储设备中。  Step S103: During the testing process of the mobile terminal, the mobile terminal stores the message in the testing process as a message log in the storage device according to the message filtering rule.
借助于上述处理, 由移动终端直接获取并解析存储设备上的配置文件, 从而根据配置文件的指示来存储测试过程中的消息日志, 这样, 只要借助计 算机等设备预先对存储设备进行文件配置, 在测试时仅需将存储设备与终端 连接即可完成消息日志的保存, 避免相关技术中需要将移动终端与计算机等 设备连接后才能够进行测试的问题, 因此使得测试的过程无需借助专门的连 接设备, 甚至无需携带计算机, 能够方便测试的进行, 降低测试的成本和工 作量, 提高測试友好度。 By means of the foregoing processing, the configuration file on the storage device is directly obtained and parsed by the mobile terminal, so that the message log during the testing process is stored according to the indication of the configuration file, so that the file configuration of the storage device is performed in advance by using a device such as a computer. In the test, you only need to connect the storage device to the terminal to complete the message log storage, avoiding the need to connect the mobile terminal and the computer in related technologies. The problem of testing can only be carried out after the device is connected, so that the testing process does not require special connection equipment, and even does not need to carry a computer, which can facilitate the test, reduce the cost and workload of the test, and improve the test friendliness.
在移动终端在存储设备中查找第一配置文件之前, 移动终端在存储设备 中查找第二配置文件, 并对查找到的第二配置文件进行解析, 其中, 第二配 置文件用于指示是否需要在存储设备上保存消息日志; 在对第二配置文件解 析后, 如果根据第二配置文件确定需要在存储设备上保存消息日志, 则移动 终端确定需要查找第一配置文件。 另一方面, 如果对第二配置文件解析后, 得知本次测试的消息日志需要保存在计算机等设备上, 则不进行本发明后续 的处理。  Before the mobile terminal searches for the first configuration file in the storage device, the mobile terminal searches for the second configuration file in the storage device, and parses the found second configuration file, where the second configuration file is used to indicate whether the The message log is saved on the storage device. After the second configuration file is parsed, if it is determined according to the second configuration file that the message log needs to be saved on the storage device, the mobile terminal determines that the first configuration file needs to be searched. On the other hand, if the second configuration file is parsed and it is known that the message log of the test needs to be saved on a computer or the like, the subsequent processing of the present invention is not performed.
在移动终端根据消息过滤规则将測试过程中的消息存储为消息日志时, 移动终端可以首先将测试过程中的消息保存在缓存区中; 在缓存区的存储空 间被占满的情况下, 将缓存区中的消息存储至存储设备中; 然后可以清空缓 存区, 并继续将测试过程中新产生的消息存储至缓存区。 这样, 能够避免对 存储设备进行频繁访问, 并—目.还能够提高消息日志记录的效率。  When the mobile terminal stores the message in the test process as the message log according to the message filtering rule, the mobile terminal may first save the message in the test process in the buffer area; if the storage space of the buffer area is occupied, The messages in the buffer are stored in the storage device; the buffer can then be emptied and the new messages generated during the test can continue to be stored in the cache. In this way, frequent access to the storage device can be avoided, and the efficiency of message logging can be improved.
优选地, 在移动终端根据消息过滤规则将测试过程中的消息存储为消息 曰志的过程中, 可以首先在存储设备中创建消息日志文件和消息日志索引文 件, 将该消息日志文件置为正在进行存储的消息日志文件 (例如, 可以通过 指针等方式进行标记), 在保存日志时, 可以将缓存区中的消息写入消息日志 文件中, 并在消息日志索引文件中保存消息日志文件的名称;  Preferably, in the process that the mobile terminal stores the message in the test process as a message according to the message filtering rule, the message log file and the message log index file may be first created in the storage device, and the message log file is set to be in progress. The stored message log file (for example, can be marked by a pointer, etc.), when saving the log, the message in the buffer area can be written into the message log file, and the name of the message log file is saved in the message log index file;
在消息日志文件所占的空间达到预定值的情况下, 创建新的消息日志文 件, 将新的消息日志文件置为正在进行存储的消息日志文件, 继续将测试过 程中缓存区中存储的消息写入新的消息日志文件中, 并在消息日志索引文件 中对消息日志文件的创建情况进行更新, 并根据消息日志文件的创建时间对 消息日志索引文件中消息日志文件的名称进行排序, 其中, 预定值小于存储 设备的存储空间, 并且大于或等于缓存区的存储空间。  When the space occupied by the message log file reaches a predetermined value, a new message log file is created, the new message log file is set as a message log file being stored, and the message stored in the buffer area during the test is continuously written. Into the new message log file, and update the creation of the message log file in the message log index file, and sort the name of the message log file in the message log index file according to the creation time of the message log file, wherein, the reservation The value is less than the storage space of the storage device and is greater than or equal to the storage space of the cache area.
在相关技术中, 一旦存储设备被占满, 则不对存储设备继续写入消息日 志, 这样就会导致很多消息日志不能存入存储设备中, 出现消息丢失的问题, 为了解决该问题, 本发明提出, 在存储设备的存储空间被占满的情况下, 如 果缓存区中还存在需要作为消息日志存储的消息, 则可以根据消息日志索引 文件中消息日志文件的排序将最早创建的消息日志文件删除, 创建新的消息 日志文件, 将该新的消息日志文件置为正在进行存储的消息日志文件, 并将 缓存区中的消息存储至该新的消息日志文件。 In the related art, once the storage device is occupied, the message log is not continuously written to the storage device, which causes many message logs to be stored in the storage device, and the message is lost. In order to solve the problem, the present invention proposes In the case where the storage space of the storage device is full, such as If there is still a message that needs to be stored as a message log, the message log file that is created first may be deleted according to the sorting of the message log file in the message log index file, and a new message log file is created, and the new message log file is created. Set to a message log file that is being stored, and store the messages in the cache to the new message log file.
例如, 假设用于记录消息日志的存储设备的存储空间为 WMB (或者可 以理解为存储设备中用于存储消息日志的存储空间为 10MB:), 规定每个消息 日志文件所占空间最多不能超过 MB, 缓存区的空间为 (I5MB , 此时, 在将 消息写入存储设备时, 首先将消息保存在缓存区中, 在缓存区存储了 0.5MB 的消息时, 缓存区被占满, 此时需要将缓存区中的消息存储到存储设备中。  For example, suppose the storage space of the storage device used to record the message log is WMB (or can be understood as the storage space for storing message logs in the storage device is 10MB:), which stipulates that each message log file can occupy no more than MB. The space in the buffer area is (I5MB). At this time, when the message is written to the storage device, the message is first saved in the buffer area. When the buffer area stores 0.5MB of the message, the buffer area is occupied. Store the messages in the cache to the storage device.
此时, 可以在存储设备中创建一个消息日志文件, 假设该消息日志文件 的名称标识为 iogl, 同时需要创建消息日志索引文件, 在消息日志索引文件 中写入 k)gl, 其中名称标识中的 " 1 "用于表示该文件是第一个创建的文件, 并设置指针指向消息日志文件 logl (例如, 可以指向文件 log 在存储设备中 所在的地址), 表示当前需要将消息写入消息日志文件 logl 中, 将缓存区中 0.5MB的消息存入消息日志文件 log 中之后, 清空缓存区; 如果缓存区之后 被消息占满, 将此时缓存区中 0.5MB的消息写入文件 logl中, 之后, 清空缓 存区。  At this point, you can create a message log file in the storage device. Assume that the name of the message log file is iogl, and you need to create a message log index file. Write k) gl in the message log index file, where the name is identified. " 1 " is used to indicate that the file is the first file created, and the pointer is pointed to the message log file logl (for example, it can point to the address where the file log is located in the storage device), indicating that the message needs to be written to the message log file. In logl, after storing the 0.5MB message in the buffer area in the message log file log, the buffer area is cleared; if the buffer area is filled by the message, the 0.5MB message in the buffer area is written into the file logl, and then , empty the buffer area.
如果缓存区中继续写入 0.5MB的消息, 此^缓存区会被第≡次占满, 需 要继续将文件写入存储设备中, 但是此时会判断出文件 logi的大小已经达到 1 MB, 无法继续向文件 iogi 存储消息, 由于此时存储设备中仅存储了 1MB 消息日志文件, 未达到 10MB, 因此, 可以在存储设备中创建新的消息日志 文件, 新的消息日志文件可以命名为 log2, 其中名称标识中的 " 2 "用于表示 该文件是第二个创建的文件, 并使指针指向文件 log2 , 在增加了 log2后, 存 储设备中存在消息日志文件 logl和 iog2,需要对消息日志索引文件进行更新, 将名称 k)g2更新到消息日志索引文件中; 优选地, 为了保证消息日志索引文 件与实际消息日志文件之间的同步, 可以清空消息日志索引文件, 查找当前 的消息日志文件包括 iogi和 k)g2, 并将名称 iogi和 log2写入消息日志索引 文件中, 并在消息日志索引文件中对 iogi和 log2进行排序, 认而表示 log2 的创建时间晚于 logi , 依此类推, 直至创建消息日志文件 iogiO并将 iogiO 存满 1MB, 此时。 If the 0.5MB message continues to be written in the buffer area, the ^ cache area will be filled for the first time, and the file needs to be continuously written to the storage device. However, it will be judged that the size of the file logi has reached 1 MB. Continue to store the message to the file iogi. Since only 1MB of the message log file is stored in the storage device, it does not reach 10MB. Therefore, a new message log file can be created in the storage device. The new message log file can be named log2, where The "2" in the name identifier is used to indicate that the file is the second created file, and the pointer points to the file log2. After the log2 is added, the message log files logl and iog2 exist in the storage device, and the message log index file is required. Update, update the name k)g2 to the message log index file; preferably, in order to ensure synchronization between the message log index file and the actual message log file, the message log index file can be cleared, and the current message log file is included, including iogi And k)g2, and write the names iogi and log2 to the message log index file, and index the message log Sort iogi and log2 in the file, which means that log2 is created later than logi, and so on, until the message log file iogiO is created and iogiO Store 1MB at this time.
之后, 如果缓存区中仍有需要保存到存储设备中的消息, 则可以查询消 息日志索引文件, 确定文件 logl的创建时间最早, 此时, 可以将存储设备中 的消息日志文件】 og】 删除, 创建消息日志文件 logl 1, 更新消息日志索引文 件, 并使指针指向文件 logl l , 继续向 iogU写入缓存区中的消息, 如果文件 logl l被写满, 则需要删除文件 iog2, 并执行类似的处理, 通过这种循环存储 的方式, 能够保证新的消息能够得到保存。  After that, if there is still a message in the cache that needs to be saved to the storage device, the message log index file can be queried to determine that the file log1 is created at the earliest time. In this case, the message log file in the storage device can be deleted. Create the message log file logl 1, update the message log index file, and point the pointer to the file logl l to continue writing the message in the buffer to iogU. If the file logl l is full, you need to delete the file iog2 and execute a similar Processing, through this way of loop storage, can ensure that new messages can be saved.
优选地, 在上述的存储设备中存储第一配置文件 B寸, 可以对第一配置文 件的命名进行统一规范, 或对第一配置文件所在的目录名进行统一规范, 这 样移动终端在存储设备中查找第一配置文件时, 就能够根据第一配置文件的 名称标识、 或存储设备中存储第一配置文件的指定目录标识, 在存储设备中 查找到第一配置文件。 类似地, 对于第二配置文件, 同样可以采用类似的方 式进行存储, 以便移动终端进行查找。  Preferably, the first configuration file B is stored in the storage device, and the naming of the first configuration file may be uniformly standardized, or the directory name where the first configuration file is located may be uniformly standardized, so that the mobile terminal is in the storage device. When the first configuration file is searched, the first configuration file may be found in the storage device according to the name identifier of the first configuration file or the specified directory identifier of the first configuration file stored in the storage device. Similarly, for the second profile, it can also be stored in a similar manner for the mobile terminal to look up.
下面将结合图 2至图 5详细描述本发明的处理过程。  The processing of the present invention will be described in detail below with reference to Figs. 2 through 5.
如图 2所示, 上述移动终端测试日志的处理方法中文件配置、 以及消息 存储的过程如下:  As shown in FIG. 2, the file configuration and the message storage process in the processing method of the mobile terminal test log are as follows:
步骤 S2i, 利用消息日志管理工具, 可以激活或者去激活消息日志本地 存储的功能, 并以此生成对应的配置文件, 该配置文件描述了是否激活消息 曰志本地存储的功能 (即, 配置上述的第二配置文件, 通过配置第二配置文 件, 可以设置是否在移动终端本地保存消息日志)。 在该步骤中, 不需要将计 算机与待测的移动通信终端连接, 只要运行 if算机上的消息日志管理工具即 可完成配置。 其中, 消息日志管理工具是安装于计算机上的一个应用, 具有 对通信协议消息进行配置、 解析、 显示、 存储等各种功能。  Step S2i, using the message log management tool, can activate or deactivate the function of the message log local storage, and generate a corresponding configuration file, which describes whether to activate the function of the message local storage (ie, configuring the above The second configuration file, by configuring the second configuration file, can set whether to save the message log locally on the mobile terminal). In this step, you do not need to connect the computer to the mobile communication terminal to be tested. Just run the message log management tool on the if computer to complete the configuration. The message log management tool is an application installed on a computer, and has various functions of configuring, parsing, displaying, and storing communication protocol messages.
步骤 S22, 利用消息日志管理工具, 选择需要输出其消息的模块, 并以 此生成对应的配置文件(即, 上述的第一配置文件), 该配置文件主要用于描 述哪些模块的输入消息需要显示, 哪些模块的输出消息需要显示, 哪些模块 的调试信息需要显示, 以及这些消息或者信息的显示方式, 也就是说, 该配 置文件用于描述需要记录到消息日志中的消息的类型。 与步骤 S21类似, 在 该步骤中, 同样不需要将计算机与待测的移动通信终端连接, 只要运行计算 机上的消息日志管理工具即可完成配置。 Step S22, using a message log management tool, selecting a module that needs to output its message, and generating a corresponding configuration file (ie, the first configuration file described above), the configuration file is mainly used to describe which modules input messages need to be displayed. Which module's output messages need to be displayed, which modules' debug information needs to be displayed, and how these messages or messages are displayed. That is, the configuration file is used to describe the types of messages that need to be logged into the message log. Similar to step S21, in this step, it is also not necessary to connect the computer to the mobile communication terminal to be tested, as long as the calculation is run. The message log management tool on the machine can be configured.
步骤 S23 , 将上述两个配置文件保存在移动通信终端的本地存储器 (例 如, 可以是能够插入终端的) 中。 这里的本地存储器指的是分离式存储卡, 如安全数字卡(Secure Digital Card,简称为 SD Card)和多媒体卡(Multimedia Card, 简称为 MMC)。 在这一过程中, 同样不需要将计算机与待测的移动通 信终端连接, 只需要将上述存储设备丛通信终端上拔出, 插入 算机的读卡 器中, 就可以将这两个配置文件拷贝到存储卡中, 然后将存储卡再放入移动 通信终端, 就能够在不连接终端与计算机的前提下完成配置文件的写入。  In step S23, the above two configuration files are saved in the local storage of the mobile communication terminal (for example, can be inserted into the terminal). The local storage here refers to a separate memory card, such as a Secure Digital Card (SD Card) and a Multimedia Card (MMC). In this process, it is also unnecessary to connect the computer to the mobile communication terminal to be tested, and only need to unplug the above-mentioned storage device cluster communication terminal and insert it into the card reader of the computer, and then the two configuration files can be After copying to the memory card and then putting the memory card into the mobile communication terminal, the configuration file can be written without connecting the terminal and the computer.
步骤 S24, 移动终端开机时, 读取本地存储器中的上述两个配置文件, 并迸行解析, 从而启动或者禁止消息日志的本地存储功能; 如果根据上述第 二配置文件确定, 终端的本地存储功能被禁止, 则跳过以下所有的步骤; 如 果根据上述第二配置文件确定本地存储功能被激活, 则继续执行图 3所示的 处理过程。  Step S24, when the mobile terminal is powered on, reading the two configuration files in the local storage, and performing parsing, thereby enabling or disabling the local storage function of the message log; if determined according to the second configuration file, the local storage function of the terminal If it is disabled, all the following steps are skipped; if it is determined according to the second configuration file that the local storage function is activated, the processing shown in FIG. 3 is continued.
步骤 S25 , 终端将测试过程中生成的消息日志文件保存在缓存区中, 一 但缓存区被占满, 则将缓存区中的消息存储到存储设备中。 为了保证在消息 曰志中不丢失有用的消息, 采用了一种循环存储的方式, 具体过程将在下文 中结合图 4进行描述。  Step S25: The terminal saves the message log file generated during the test in the buffer area, and once the buffer area is occupied, the message in the buffer area is stored in the storage device. In order to ensure that no useful messages are lost in the message, a cyclic storage method is adopted, and the specific process will be described below in conjunction with FIG.
如图 3所示, 对配置文件进行解析的具体过程如下:  As shown in Figure 3, the process of parsing the configuration file is as follows:
步骤 S3 i, 系统启动时, 读取上述的第二配置文件, 并进行解析, 判断 是否需要激活本地存储功能。 如果是, 则允许启动本地存储功能, 执行步骤 S32 否则禁止, 跳过以下所有的步骤, 处理结束;  Step S3 i: When the system is started, the second configuration file is read and parsed to determine whether the local storage function needs to be activated. If yes, the local storage function is allowed to be started, and step S32 is executed otherwise, and all the following steps are skipped, and the processing ends;
步骤 S32 , 在本地存储功能已启动的情况下, 继续读取上述的第一配置 文件, 并进行解析;  Step S32: If the local storage function is started, continue to read the first configuration file and parse the first configuration file.
步骤 S33, 然后根据解析结果配置消息过滤表; 如果判断消息过滤表配 置成功, 则执行步骤 S34, 否则执行歩骤 S35 ;  Step S33, and then configuring a message filtering table according to the parsing result; if it is determined that the message filtering table configuration is successful, step S34 is performed, otherwise step S35 is performed;
步骤 S34, 启动消息日志的本地存储功能;  Step S34, starting a local storage function of the message log;
步骤 S35, 查看是否存在之前使用过的消息过滤表 (优选地, 可以查找 是否存在上一次正确配置的消息过滤表), 如果查找到该消息过滤表, 则执行 歩骤 S36; 否则, 执行步骤 37 ; 步骤 S36, 启用之前使用的消息过滤表, 之后执行步骤 S34; 步骤 S37 , 启用默认的消息过滤表 (该消息过滤表是针对一般的情况设 定的), 之后执行步骤 S34。 In step S35, it is checked whether there is a message filtering table that has been used before (preferably, it can be found whether there is a message filtering table that was correctly configured last time). If the message filtering table is found, step S36 is performed; otherwise, step 37 is performed. ; Step S36, the previously used message filtering table is enabled, and then step S34 is performed; Step S37, the default message filtering table is enabled (the message filtering table is set for the general case), and then step S34 is performed.
图 4示出了在上述步骤 S25中, 将缓存区中的消息存储至消息日志文件 的处理过程。 如图 4所示, 具体过程如下:  Fig. 4 shows the processing of storing the message in the buffer area to the message log file in the above step S25. As shown in Figure 4, the specific process is as follows:
步骤 S41 , 设定用于存储消息日志的本地存储空间并设定消息日志文件 的大小, 这个空间的值称为最大可用空间。 另外, 最大可用空间应当尽可能 大, 这样可以尽量多地存储消息日志;  Step S41, setting a local storage space for storing the message log and setting a size of the message log file, and the value of this space is called the maximum available space. In addition, the maximum available space should be as large as possible so that message logs can be stored as much as possible;
步骤 S42, 创建一个新的消息日志文件。 查询现有的消息日志文件占用 的全部空间, 如果这个值小于最大可用空间, 就创建一个新的消息日志文件, 并将该新创建的消息日志文件设为当前的消息日志文件; 如果这个值大于最 大可用空间, 就去查询消息日志索引文件, 找到最旧的消息日志文件, 将最 旧的消息日志文件删除掉, 然后再创建一个新的消息日志文件, 并该新建的 消息日志文件设为当前的消息日志文件。 消息日志文件需要按照顺序编号, 并根据这个编号生成对应的文件名, 例如, 可以命名为消息日志 1、 消息日 心 寸寸  In step S42, a new message log file is created. Query all the space occupied by the existing message log file. If the value is less than the maximum available space, create a new message log file and set the newly created message log file to the current message log file. If the value is greater than The maximum available space, just query the message log index file, find the oldest message log file, delete the oldest message log file, and then create a new message log file, and the new message log file is set to current Message log file. The message log files need to be numbered sequentially, and the corresponding file name is generated according to this number. For example, it can be named as message log.
在创建消息日志文件时, 需要给消息日志文件分配一个序号, ^于对消 息曰志文件的命名。 这时分两种情况:  When creating a message log file, you need to assign a sequence number to the message log file, ^ to name the message file. There are two situations at this time:
情况 1 , 如果消息日志索引文件还没有创建的话, 这个序号就为 1 。  Case 1 : If the message log index file has not been created yet, the sequence number is 1 .
情况 2, 如果消息日志索引文件己经创建的话, 就去查询消息日志索引 文件, 找到最旧的消息日志文件的序号, 将这个序号加 1 得到的就是新的消 息曰志文件的序号。  Case 2: If the message log index file has been created, query the message log index file, find the serial number of the oldest message log file, and add 1 to the serial number of the new message file.
步骤 S43, 创建消息日志索引文件, 这个文件用来按照消息日志文件编 号以从小到大的顺序存储消息日志文件名。 这个消息日志索引文件同样可以 保存在终端的本地存储器中, 这样系统重新开机之后, 这些消息日志的信息 也不会丢失。  Step S43: Create a message log index file, which is used to store the message log file name in ascending order according to the message log file number. This message log index file can also be saved in the local storage of the terminal, so that the information of these message logs will not be lost after the system is rebooted.
步骤 S44, 判断是否存在模块内的调试消息或者模块之间传递的消息; 如果有, 则调用消息过滤表, 并执行歩骤 S45 , 否则继续等待消息;  Step S44, determining whether there is a debug message in the module or a message transmitted between the modules; if yes, calling the message filtering table, and executing step S45, otherwise continuing to wait for the message;
步骤 S45, 判断过滤表中是否能够找到上述消息, 如果是, 则执行步骤 S46; 否则不保存该消息, 并继续判断其他消息; Step S45, determining whether the above message can be found in the filter table, and if yes, performing the step S46; otherwise, the message is not saved, and the other messages are continuously judged;
步骤 S46, 将该消息存入缓存区中;  Step S46, the message is stored in the buffer area;
步骤 S47, 判断缓存区是否已满, 如果缓存区已满, 则执行步骤 S48 , 否 则返回步骤 S44, 继续向缓存区存储消息;  Step S47, determining whether the buffer area is full. If the buffer area is full, executing step S48, otherwise returning to step S44, continuing to store the message to the buffer area;
步骤 S48 , 判断当前迸行存储的消息日志文件是否有足够的剩余存储空 间, 如果当前的日志文件的剩余空间大于缓冲区的存储空间 B寸, 则执行步骤 S49; 否则执行步骤 S50;  Step S48, determining whether the currently stored message log file has sufficient remaining storage space, if the remaining space of the current log file is larger than the buffer storage space B, step S49 is performed; otherwise, step S50 is performed;
步骤 S49 , 将缓冲区的内容写入到当前消息日志文件中;  Step S49, writing the content of the buffer to the current message log file;
步骤 S50, 在当前的消息日志文件的剩余空间小于缓冲区的长度的情况 下, 写满当前的消息日志文件, 关闭当前的消息日志文件;  Step S50: If the remaining space of the current message log file is smaller than the length of the buffer, fill the current message log file, and close the current message log file.
步骤 S51, 创建一个新的消息日志文件, 并将该文件设置为当前进行存 储的消息日志文件;  Step S51, creating a new message log file, and setting the file as a message log file currently being stored;
步骤 S52, 将缓冲区中剩余的消息内容写入到当前的消息日志文件。 步骤 S53 , 更新消息日志索引文件, 也就是说, 只要有消息日志文件被 创建或者删除, 就要将所有的消息日志文件按其编号的先后顺序写到消息日 志索引文件中。  Step S52: Write the remaining message content in the buffer to the current message log file. Step S53: Update the message log index file, that is, as long as the message log file is created or deleted, all the message log files are written into the message log index file in the order of their numbers.
其中, 在创建或删除消息日志文件的情况下, 如果消息日志索引文件还 没有创建 (例如, 存储设备保存了消息日志文件, 但是消息日志索引文件丢 失或被删除), 则首先创建消息日志索引文件, 然后将所有的消息日志文件的 文件名按其编号的先后顺序写到消息日志索引文件中。  Wherein, in the case of creating or deleting a message log file, if the message log index file has not been created yet (for example, the storage device saves the message log file, but the message log index file is lost or deleted), the message log index file is first created. And then write the file names of all the message log files to the message log index file in the order of their numbers.
如果消息日志索引文件已经存在, 先将消息日志索引文件清空, 然后将 所有的消息日志文件的文件名按其编号的先后顺序写到消息日志索引文件 中。  If the message log index file already exists, first clear the message log index file, and then write the file names of all message log files to the message log index file in the order of their numbers.
这样, 通过以上存储的消息日志, 可以根据用户的需要, 认终端的本地 存储器 (存储设备) 中取出消息日志, 并以用消息日志管理工具进行解码。 在提取存储的消息日志时, 同样不需要连接待测的移动通信终端, 只需要将 存储设备认通信终端上拔出, 插入什算机的读卡器中, 就可以将全部的消息 日志文件拷贝到 i†算机中, 操作人员利用 算机上的消息日志管理工具对消 息日志文件进行解码, 使其变为一种易读的格式, 之后即可消息日志体现的 测试过程出现的问题进行分析。 In this way, through the message log stored above, the message log can be taken out from the local storage (storage device) of the terminal according to the needs of the user, and decoded by the message log management tool. When extracting the stored message log, it is also unnecessary to connect the mobile communication terminal to be tested, and only need to unplug the storage device from the communication terminal and insert it into the card reader of the computer to copy all the message log files. In the computer, the operator uses the message log management tool on the computer to decode the message log file, making it an easy-to-read format, which can then be reflected in the message log. Analysis of problems in the testing process.
根据本发明的实施例, 还提供了一种移动终端。  According to an embodiment of the present invention, a mobile terminal is also provided.
如图 5所示, 根据本发明实施例的移动终端包括查找和解析模块 501、 存储设备 502以及控制模块 503, 其中,  As shown in FIG. 5, the mobile terminal according to the embodiment of the present invention includes a lookup and parsing module 501, a storage device 502, and a control module 503, where
查找和解析模块 501连接至存储设备 502 , 查找和解析模块 501用于在 存储设备 502中查找第一配置文件, 并对查找到的第一配置文件进行解析, 得到消息过滤规则, 其中, 消息过滤规则用于指示需要记录的消息类型; 控制模块 503连接至查找和解析模块 501和存储设备 502, 用于在移动 终端的测试过程中,根据消息过滤规则将测试过程中的消息存储为消息日志; 存储设备 502用于在控制模块 503的控制下存储消息。  The search and analysis module 501 is connected to the storage device 502. The search and analysis module 501 is configured to search the first configuration file in the storage device 502, and parse the first configuration file to obtain a message filtering rule, where the message filtering is performed. The rule is used to indicate the type of the message to be recorded; the control module 503 is connected to the search and parsing module 501 and the storage device 502, and is configured to store the message in the test process as a message log according to the message filtering rule during the testing process of the mobile terminal; The storage device 502 is configured to store messages under the control of the control module 503.
查找和解析模块 还用于在查找第一配置文件之前, 在存储设备 502中 查找第二配置文件, 并对查找到的第二配置文件进行解析, 其中, 第二配置 文件 ^于指示是否需要在存储设备 502上保存消息日志; 在对第二配置文件 解析后, 如果根据第二配置文件确定需要在存储设备上保存消息日志, 则查 找和解析模块 501确定需要查找第一配置文件。  The locating and parsing module is further configured to: after finding the first configuration file, look up the second configuration file in the storage device 502, and parse the found second configuration file, where the second configuration file indicates whether the The message log is saved on the storage device 502. After the second configuration file is parsed, if it is determined according to the second configuration file that the message log needs to be saved on the storage device, the search and parsing module 501 determines that the first configuration file needs to be searched.
该移动终端还包括缓存区 (来示出), 与控制模块 503以及存储设备 502 连接, 并且, 控制模块 503还用于将测试过程中的消息保存在缓存区中, 在 缓存区的存储空间被占满的情况下, 控制模块 503将缓存区中的消息存储至 存储设备 502中, 之后清空缓存区, 并继续将测试过程中新产生的消息存储 至缓存区。  The mobile terminal further includes a buffer area (shown) connected to the control module 503 and the storage device 502, and the control module 503 is further configured to save the message during the test in the buffer area, and the storage space in the buffer area is In the case of fullness, the control module 503 stores the message in the buffer area into the storage device 502, then clears the buffer area, and continues to store the newly generated message during the test to the buffer area.
查找和解析模块 501具体可以根据第一配置文件的预定标识、 或存储设 备 502中存储第一配置文件的指定目录标识, 在存储设备 502中查找第一配 置文件。  The lookup and parsing module 501 may specifically look up the first configuration file in the storage device 502 according to the predetermined identifier of the first configuration file or the specified directory identifier of the first configuration file stored in the storage device 502.
另外, 控制模块同样能够控制缓存区和存储设备进行上述循环存储的过 程, 具体执行方式之前已经描述, 这里不再重复。  In addition, the control module can also control the process of the above-mentioned cyclic storage of the buffer area and the storage device. The specific execution manner has been described before and will not be repeated here.
综上所述, 借助于本发明的上述技术方案, 由移动终端直接获取并解析 存储设备上的配置文件, 从而根据配置文件的指示来存储测试过程中的消息 日志, 这样, 只要借助 i†算机等设备预先对存储设备进行文件配置, 在测试 时仅需将存储设备与终端连接即可完成消息日志的保存, 避免相关技术中需 要将移动终端与计算机等设备连接后才能够进行测试的问题, 因此使得测试 的过程无需借助专门的连接设备, 甚至无需携带计算机, 能够方便测试的进 行, 降低测试的成本和工作量, 提高測试友好度; 并且, 通过采用循环存储 的方式, 可以充分利用移动通信终端有限的存储器空间, 保证在消息日志中 不丢失有用的消息, 并 ϋ能够避免对存储设备进行频繁访问, 提高日志保存 的效率。 In summary, with the above technical solution of the present invention, the configuration file on the storage device is directly obtained and parsed by the mobile terminal, so that the message log in the test process is stored according to the indication of the configuration file, so that The device and other devices perform file configuration on the storage device in advance. In the test, only the storage device and the terminal need to be connected to complete the message log storage, so as to avoid the need in related technologies. The problem of testing can be carried out after the mobile terminal is connected to a computer, etc., so that the test process does not require special connection equipment, and even does not need to carry a computer, which can facilitate the test, reduce the cost and workload of the test, and improve the test. Try to be friendly; and, by adopting the method of cyclic storage, the limited memory space of the mobile communication terminal can be fully utilized, the useful message is not lost in the message log, and the frequent access to the storage device can be avoided, and the log storage is improved. effectiveness.
以上所述仅为本发明的较佳实施例而己, 并不用以限制本发明, 凡在本 发明的精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在 本发明的保护范围之内。  The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., which are within the spirit and scope of the present invention, should be included in the present invention. Within the scope of protection.

Claims

1. 一种移动终端測试日志的处理方法, 其特征在于, 所述方法包括: 移动终端在存储设备中查找第一配置文件, 并对查找到的所述第一配置 文件进行解析, 得到消息过滤规则, 其中, 所述消息过滤规则用于指示需要 存储的消息类型; A method for processing a test log of a mobile terminal, the method comprising: the mobile terminal searching for a first configuration file in the storage device, parsing the first configuration file that is found, and obtaining a message a filtering rule, where the message filtering rule is used to indicate a message type to be stored;
在所述移动终端的測试过程中, 所述移动终端根据所述消息过滤规则将 测试过程中的消息作为消息日志存储在所述存储设备中。  During the testing process of the mobile terminal, the mobile terminal stores the message in the testing process as a message log in the storage device according to the message filtering rule.
2. 根据权利要求 1所述的处理方法, 其特征在于, 在所述移动终端在所 述存储设备中查找第一配置文件之前, 所述方法进一步包括:  The processing method according to claim 1, wherein before the mobile terminal searches for the first configuration file in the storage device, the method further includes:
所述移动终端在所述存储设备中查找第二配置文件, 并对查找到的所述 第二配置文件进行解析, 其中, 所述第二配置文件用于指示是否需要在所述 存储设备上保存消息日志;  The mobile terminal searches for a second configuration file in the storage device, and parses the found second configuration file, where the second configuration file is used to indicate whether it needs to be saved on the storage device. Message log
在对所述第二配置文件解析后, 如果根据所述第二配置文件确定需要在 所述存储设备上保存消息日志, 则所述移动终端确定需要查找所述第一配置 文件。  After parsing the second configuration file, if it is determined according to the second configuration file that a message log needs to be saved on the storage device, the mobile terminal determines that the first configuration file needs to be searched.
3. 根据权利要求 i所述的处理方法, 其特征在于, 所述移动终端根据所 述消息过滤规则将测试过程中的消息存储为消息日志包括:  The processing method according to claim 1, wherein the storing, by the mobile terminal, the message in the test process as the message log according to the message filtering rule includes:
所述移动终端将测试过程中的消息保存在缓存区中;  The mobile terminal saves the message during the test in the buffer area;
在所述缓存区的存储空间被占满的情况下, 将所述缓存区中的消息存储 至所述存储设备中;  And storing, in the storage area of the buffer area, a message in the buffer area to the storage device;
清空所述缓存区,并继续将测试过程中新产生的消息存储至所述缓存区。  The buffer is emptied and the newly generated message during the test is continued to be stored in the buffer.
4. 根据权利要求 3所述的处理方法, 其特征在于, 所述移动终端根据所 述消息过滤规则将测试过程中的消息存储为消息日志包括:  The processing method according to claim 3, wherein the storing, by the mobile terminal, the message in the test process as the message log according to the message filtering rule includes:
在所述存储设备中创建消息日志文件和消息日志索引文件, 将所述消息 日志文件置为正在进行存储的消息日志文件, 将所述缓存区中的消息写入所 述消息日志文件中, 并在所述消息日志索引文件中保存所述消息日志文件的 名称;  Creating a message log file and a message log index file in the storage device, setting the message log file as a message log file being stored, writing a message in the buffer area to the message log file, and Saving the name of the message log file in the message log index file;
在所述消息日志文件所占的空间达到预定值的情况下, 创建新的消息日 志文件, 将所述新的消息日志文件置为正在进行存储的消息日志文件, 继续 将测试过程中所述缓存区中存储的消息写入所述新的消息日志文件中, 并在 所述消息日志索引文件中对消息日志文件的创建情况进行更新, 并根据消息 日志文件的创建时间对所述消息日志索引文件中消息日志文件的名称进行排 序, 其中, 所述预定值小于所述存储设备的存储空间, 并且大于或等于所述 缓存区的存储空间。 Create a new message day if the space occupied by the message log file reaches a predetermined value And the new message log file is set as a message log file being stored, and the message stored in the buffer area in the test process is continuously written into the new message log file, and the message is The log index file is updated, and the name of the message log file in the message log index file is sorted according to the creation time of the message log file, where the predetermined value is smaller than that of the storage device. Storage space, and greater than or equal to the storage space of the buffer area.
5. 根据权利要求 4所述的处理方法, 其特征在于, 在所述存储设备的存 储空间被占满的情况下, 如果所述缓存区中还存在需要作为消息日志存储的 消息, 则所述方法进一步包括:  The processing method according to claim 4, wherein, in a case that a storage space of the storage device is full, if there is still a message in the buffer area that needs to be stored as a message log, The method further includes:
根据所述消息日志索引文件中消息日志文件的排序将最早创建的消息日 志文件删除, 创建新的消息日志文件, 将该新的消息日志文件置为正在进行 存储的消息日志文件,并将所述缓存区中的消息存储至该新的消息日志文件。  Deleting the earliest created message log file according to the sorting of the message log file in the message log index file, creating a new message log file, and setting the new message log file as a message log file being stored, and Messages in the cache are stored to the new message log file.
6. 根据权利要求 i所述的处理方法, 其特征在于, 所述移动终端在所述 存储设备中查找第一配置文件包括:  The processing method of claim 1, wherein the searching, by the mobile terminal, the first configuration file in the storage device comprises:
所述移动终端根据所述第一配置文件的预定标识、 或所述存储设备中存 储所述第一配置文件的指定目录标识, 在所述存储设备中查找所述第一配置 t杜  The mobile terminal searches for the first configuration in the storage device according to the predetermined identifier of the first configuration file or the specified directory identifier of the first configuration file in the storage device.
7, 一种移动终端, 其特征在于, 所述移动终端包括查找和解析模块、 存 储设备以及控制模块, 其中,  A mobile terminal, comprising: a search and analysis module, a storage device, and a control module, wherein
所述查找和解析模块用于在所述存储设备中查找第一配置文件, 并对查 找到的所述第一配置文件进行解析, 得到消息过滤规则, 其中, 所述消息过 滤规则用于指示需要记录的消息类型;  The searching and parsing module is configured to search for the first configuration file in the storage device, and parse the first configuration file that is found, to obtain a message filtering rule, where the message filtering rule is used to indicate a need The type of message logged;
所述控制模块 ^于在所述移动终端的测试过程中, 根据所述消息过滤规 则将测试过程中的消息存储为消息日志;  The control module stores the message in the test process as a message log according to the message filtering rule during the testing process of the mobile terminal;
所述存储设备用于在所述控制模块的控制下存储消息。  The storage device is configured to store a message under control of the control module.
8, 根据权利要求 7所述的移动终端, 其特征在于, 所述查找和解析模块 还用于在查找所述第一配置文件之前,在所述存储设备中查找第二配置文件, 并对查找到的所述第二配置文件进行解析, 其中, 所述第二配置文件用于指 示是否需要在所述存储设备上保存消息日志;在对所述第二配置文件解析后, 如果根据所述第二配置文件确定需要在所述存储设备上保存消息日志, 则所 述查找和解析模块确定需要查找所述第一配置文件。 The mobile terminal according to claim 7, wherein the searching and parsing module is further configured to: after searching for the first configuration file, searching for a second configuration file in the storage device, and searching for The second configuration file is parsed, where the second configuration file is used to indicate whether a message log needs to be saved on the storage device; after parsing the second configuration file, If it is determined according to the second configuration file that a message log needs to be saved on the storage device, the lookup and parsing module determines that the first configuration file needs to be searched.
9. 根据权利要求 7所述的移动终端, 其特征在于, 还包括缓存区, 并且, 所述控制模块还用于将测试过程中的消息保存在缓存区中, 在所述缓存区的 存储空间被占满的情况下, 所述控制模块将所述缓存区中的消息存储至所述 存储设备中, 之后清空所述缓存区, 并继续将测试过程中新产生的消息存储 至所述缓存区。  The mobile terminal according to claim 7, further comprising a buffer area, and wherein the control module is further configured to save the message during the test in the buffer area, and the storage space in the buffer area In the case of being full, the control module stores the message in the buffer area into the storage device, then clears the buffer area, and continues to store the newly generated message in the test process to the buffer area. .
10. 根据权利要求 7 所述的移动终端, 其特征在于, 所述查找和解析模 块用于根据所述第一配置文件的预定标识、 或所述存储设备中存储所述第一 配置文件的指定目录标识, 在所述存储设备中查找所述第一配置文件。  The mobile terminal according to claim 7, wherein the searching and parsing module is configured to: according to a predetermined identifier of the first configuration file, or a specification for storing the first configuration file in the storage device a directory identifier, searching for the first configuration file in the storage device.
PCT/CN2011/084648 2010-12-27 2011-12-26 Mobile terminal and method for processing test log thereof WO2012089079A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2010106217856A CN102096626A (en) 2010-12-27 2010-12-27 Mobile terminal and processing method of test log thereof
CN201010621785.6 2010-12-27

Publications (1)

Publication Number Publication Date
WO2012089079A1 true WO2012089079A1 (en) 2012-07-05

Family

ID=44129729

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/084648 WO2012089079A1 (en) 2010-12-27 2011-12-26 Mobile terminal and method for processing test log thereof

Country Status (2)

Country Link
CN (1) CN102096626A (en)
WO (1) WO2012089079A1 (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096626A (en) * 2010-12-27 2011-06-15 意法·爱立信半导体(北京)有限公司 Mobile terminal and processing method of test log thereof
CN102355515A (en) * 2011-10-13 2012-02-15 广东欧珀移动通信有限公司 Automatic test method of cell phone file operation
CN102457401B (en) * 2012-01-06 2014-07-30 北京星网锐捷网络技术有限公司 Method, device and server for log simulation generation
CN102968366B (en) * 2012-11-30 2015-10-28 广东欧珀移动通信有限公司 The local storage means of a kind of Blu-ray player daily record and device
CN103577308B (en) * 2013-11-15 2017-01-18 惠州Tcl移动通信有限公司 Method for obtaining log files of mobile device
CN103995265A (en) * 2014-05-28 2014-08-20 广州南方卫星导航仪器有限公司 Method and device for storing records in GNSS measuring device in automatic circulated mode
CN104199785B (en) * 2014-08-22 2017-12-12 惠州Tcl移动通信有限公司 A kind of method and its system based on test condition dynamic memory log
CN105577445A (en) * 2015-12-30 2016-05-11 北京京东尚科信息技术有限公司 Method and device for collecting and reporting logs
CN109446172A (en) * 2017-10-12 2019-03-08 贵阳朗玛信息技术股份有限公司 Log storing method, read method and device
CN110515898B (en) * 2019-07-31 2022-04-22 济南浪潮数据技术有限公司 Log processing method and device
CN111427854B (en) * 2020-03-23 2024-01-30 深圳震有科技股份有限公司 Stack structure realizing method, device, equipment and medium for supporting storage batch data
CN111865718A (en) * 2020-07-16 2020-10-30 深圳云里物里科技股份有限公司 Gateway offline data storage method, device, equipment and medium
CN113015203B (en) * 2021-03-22 2022-08-16 Oppo广东移动通信有限公司 Information acquisition method, device, terminal, system and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1976527A (en) * 2006-12-04 2007-06-06 华为技术有限公司 Method and system for mobile terminal test
CN101394646A (en) * 2008-11-06 2009-03-25 北京天碁科技有限公司 Software test method and system
CN101478769A (en) * 2009-01-22 2009-07-08 北京天碁科技有限公司 Method for protocol message log off-line storage and mobile communication terminal
CN102096626A (en) * 2010-12-27 2011-06-15 意法·爱立信半导体(北京)有限公司 Mobile terminal and processing method of test log thereof

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1159649C (en) * 2000-12-28 2004-07-28 中兴通讯股份有限公司 Automatic circular daily record information storing method and system
CN101645031A (en) * 2009-06-30 2010-02-10 卡斯柯信号有限公司 Method for dynamically outputting log file according to time

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1976527A (en) * 2006-12-04 2007-06-06 华为技术有限公司 Method and system for mobile terminal test
CN101394646A (en) * 2008-11-06 2009-03-25 北京天碁科技有限公司 Software test method and system
CN101478769A (en) * 2009-01-22 2009-07-08 北京天碁科技有限公司 Method for protocol message log off-line storage and mobile communication terminal
CN102096626A (en) * 2010-12-27 2011-06-15 意法·爱立信半导体(北京)有限公司 Mobile terminal and processing method of test log thereof

Also Published As

Publication number Publication date
CN102096626A (en) 2011-06-15

Similar Documents

Publication Publication Date Title
WO2012089079A1 (en) Mobile terminal and method for processing test log thereof
WO2017167171A1 (en) Data operation method, server, and storage system
JP5781685B2 (en) Log management computer and log management method
US9690796B2 (en) Non-transitory computer-readable media storing file management program, file management apparatus, and file management method
WO2013010414A1 (en) Index constructing method, search method, device and system
CN111813756B (en) Log retrieval system, method and device, electronic equipment and storage medium
JP6020291B2 (en) Communication monitoring method, communication monitoring apparatus, communication monitoring program
JP2012089094A5 (en)
CN112988916B (en) Full and incremental synchronization method, apparatus and storage medium for Clickhouse
CN104160397A (en) Location independent files
CN110008197A (en) A kind of data processing method, system and electronic equipment and storage medium
CN103473169B (en) A kind of log file collection method and device
CN110417892B (en) Message analysis-based data replication link optimization method and device
CN111831691B (en) Data reading and writing method and device, electronic equipment and storage medium
CN115509440A (en) Storage system and data processing method
CN109558270A (en) Method and apparatus, the method and apparatus of data convert of data backup
CN110765125B (en) Method and device for storing data
CN109117091A (en) A kind of SSD equipment mount point acquisition methods and relevant apparatus
CN113625952B (en) Object storage method, device, equipment and storage medium
CN118120212A (en) File deduplication method, device and equipment
KR101093019B1 (en) System for restoring transmission data using main memory direct control of mobile communications terminal and method provide therefor
JP2008182416A (en) Image forming apparatus
JP5941823B2 (en) Consistency confirmation method and system
CN110809013B (en) Monitoring data acquisition method and device, electronic equipment and storage medium
CN113064869B (en) Log processing method, device, transmitting end, receiving end equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11852985

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 10/10/2013)

122 Ep: pct application non-entry in european phase

Ref document number: 11852985

Country of ref document: EP

Kind code of ref document: A1