Data processing method and device, terminal equipment and computer readable storage medium
By analyzing the target format file and obtaining user interaction instructions, the automatic acquisition of log data in the Android system is achieved, and the problem of cumbersome and insufficient flexibility in the log crawling process in the existing technology is solved, and the efficiency and convenience of log acquisition are improved.
Patent Information
- Application Number
- CN202411999061.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-06
AI Technical Summary
When the existing technology adds a log crawling scenario to the Android system, it is necessary to recompile the APK file. The process is cumbersome and cannot meet the flexibility of adding an exception log crawling needs at any time.
Provide a data processing method, by obtaining the log data extraction instructions of the target program, analyzing the target format file, displaying the target display interface of each module, and automatically storing the log data of the target module according to the user's interactive instructions.
Automatic acquisition of exception logs for target modules is realized, avoiding the cumbersomeness and lack of flexibility in the log acquisition process, and improving the efficiency and convenience of log acquisition.
Smart Images

Figure CN119938474A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data processing method, apparatus, terminal device and computer-readable storage medium. Background Art
[0002] In the prior art, if you want to capture logs, you need to set up corresponding scripts and use the scripts to capture logs. However, it should be noted that in the Android system, if you want to capture logs for additional scenarios, you also need to recompile the APK (Android Package Kit) file to achieve it. This process is not only cumbersome, but also cannot meet the flexibility of adding new abnormal log capture requirements at any time. For example, when developers need to capture logs for specific abnormal scenarios, they must republish the APK containing the new log capture command, and this log acquisition method is inefficient. Summary of the invention
[0003] The present application relates to a data processing method, which can effectively obtain log data.
[0004] In a first aspect, the present application provides a data processing method, the method comprising:
[0005] Obtain log data extraction instructions of the target program;
[0006] According to the log data extraction instruction, the target format file is parsed to obtain a target display interface for displaying each module;
[0007] Acquire a target interaction instruction corresponding to a target module in the target display interface;
[0008] According to the target interaction instruction, the log data corresponding to the target module is stored in the target storage area.
[0009] In some embodiments of the present application, parsing the target format file according to the log data extraction instruction includes:
[0010] Determining version information of the target program according to the log data extraction instruction;
[0011] If the version information of the target program is the target version information, switching to the target environment mode;
[0012] In the target environment mode, the target format file is parsed.
[0013] In some embodiments of the present application, the acquiring the target interaction instruction corresponding to the target module in the target display interface includes:
[0014] If multiple initial interaction instructions are obtained within the target time period, determining the timing information of each of the initial interaction instructions;
[0015] The target interaction instruction is determined from each of the initial interaction instructions according to the timing information of each of the initial interaction instructions.
[0016] In some embodiments of the present application, storing the log data corresponding to the target module in the target storage area according to the target interaction instruction includes:
[0017] Determining a target data volume of the log data according to the target interaction instruction;
[0018] If the target data volume is less than the data volume threshold, the log data corresponding to the target module is stored in the target storage area.
[0019] In some embodiments of the present application, storing the log data corresponding to the target module in the target storage area includes:
[0020] Determining whether the target data volume is greater than the storage capacity of the target storage area;
[0021] If the target data volume is greater than the storage capacity, clear the target file with the oldest storage time in the target storage area until the target data volume is less than or equal to the storage capacity, and store the log data corresponding to the target module in the target storage area;
[0022] If the target data volume is less than or equal to the storage capacity, the log data corresponding to the target module is directly stored in the target storage area.
[0023] In some embodiments of the present application, before storing the log data corresponding to the target module in the target storage area according to the target interaction instruction, the method further includes:
[0024] Detecting the stored files in the target storage area, and determining whether the stored files include files that have not been successfully compressed;
[0025] If the stored files include the unsuccessfully compressed file, the unsuccessfully compressed file is deleted.
[0026] In some embodiments of the present application, before obtaining the log data extraction instruction of the target program, the method further includes:
[0027] Acquire target operation data during the target program test operation;
[0028] Detecting whether the target operation data is abnormal;
[0029] If the target operation data is abnormal, uploading the target operation data to the target server;
[0030] If there is no abnormality in the target operation data, the target operation data is periodically uploaded to the target server.
[0031] In a second aspect, the present application further provides a data processing device, the device comprising:
[0032] An acquisition module, used to obtain log data extraction instructions of a target program;
[0033] A processing module, used to extract instructions from the log data, parse the target format file, and obtain a target display interface for displaying each module;
[0034] The acquisition module is also used to acquire a target interaction instruction corresponding to the target module in the target display interface;
[0035] The processing module is further configured to store the log data corresponding to the target module into a target storage area according to the target interaction instruction.
[0036] In a third aspect, the present application also provides a terminal device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in any one of the data processing methods described.
[0037] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the steps in any one of the data processing methods described.
[0038] The data processing method provided by the present application can parse the target format file and display the interactive display interface of each module after obtaining the log data extraction instruction of the target program. Afterwards, the function of capturing abnormal logs of the target module can be realized according to the specific module specified by the user, and the automatic log acquisition corresponding to the target module can be provided to avoid the problem of difficulty in obtaining the specified log. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0040] Figure 1is a scenario schematic diagram of a data processing system provided in an embodiment of the present application;
[0041] Figure 2 This is a flow chart of an embodiment of a data processing method in an embodiment of the present application;
[0042] Figure 3 This is a schematic diagram of the effect of an embodiment of the data processing method in the embodiment of the present application;
[0043] Figure 4 is a functional module schematic diagram of a data processing device in an embodiment of the present application;
[0044] Figure 5 It is a schematic diagram of the structure of the terminal device in the embodiment of the present application. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0046] In the description of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the feature. In the description of the present application, "plurality" means two or more, unless otherwise clearly and specifically defined.
[0047] In this application, the word "exemplary" is used to mean "used as an example, illustration or description". Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. At the same time, it is to be understood that in the specific implementation of this application, when user information, user data and other related data are involved, when the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data shall comply with relevant laws, regulations and standards of relevant countries and regions.
[0048] In order to enable any person skilled in the art to implement and use the present application, the following description is provided. In the following description, details are listed for the purpose of explanation. It should be understood that those of ordinary skill in the art will recognize that the present application can be implemented without using these specific details. In other examples, known structures and processes will not be elaborated in detail to avoid unnecessary details that make the description of the present application obscure. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest range of principles and features disclosed in the present application.
[0049] The present application provides a data processing method, apparatus, device and storage medium, which are described in detail below.
[0050] See also Figure 1 , Figure 1 Schematic diagram of a data processing system provided in an embodiment of the present application. The data processing system may include a terminal device 100 and a storage device 200. The terminal device 100 may transmit data to the storage device 200. Figure 1 The terminal device 100 can obtain the user's operation instructions and execute the data processing method in this application according to the user's operation instructions, that is, store the obtained logs in the storage device 200.
[0051] In the embodiment of the present application, the terminal device 100 includes but is not limited to a desktop computer, a portable computer, a network server, a PDA (Personal Digital Assistant), a tablet computer, a wireless terminal device, an embedded device, etc.
[0052] In the embodiments of the present application, the terminal device 100 and the storage device 200 can communicate with each other through any communication method, including but not limited to mobile communications based on the 3rd Generation Partnership Project (3GPP), Long Term Evolution (LTE), Worldwide Interoperability for Microwave Access (WiMAX), or computer network communications based on the TCP / IP Protocol Suite (TCP / IP), User Datagram Protocol (UDP), etc. It should be noted that the storage device 200 can also be built into the terminal device 100, and the specific embodiments of the present application are not limited thereto.
[0053] It should be noted that Figure 1The scenario diagram of the data processing system shown is merely an example. The data processing system and scenario described in the embodiments of the present application are intended to more clearly illustrate the technical solution of the embodiments of the present application, and do not constitute a limitation on the technical solution provided in the embodiments of the present application. A person of ordinary skill in the art will appreciate that with the evolution of the data processing system and the emergence of new business scenarios, the technical solution provided in the embodiments of the present application is equally applicable to similar technical problems.
[0054] like Figure 2 As shown, Figure 2 This is a flow chart of an embodiment of a data processing method in an embodiment of the present application. The data processing method may include the following steps 201 to 204:
[0055] 201. Obtain log data extraction instructions of a target program.
[0056] In the embodiment of the present application, the target program can be any application program in the system, and the specific embodiment of the present application does not limit it. At the same time, when the program is running, it will generate corresponding log data, and these generated log data are the data that need to be automatically obtained.
[0057] The log data extraction instruction is a log extraction instruction issued by relevant personnel through the relevant log retrieval interface. After that, the interface can extract the relevant logs according to the received log extraction instruction.
[0058] 202. According to the log data extraction instruction, the target format file is parsed to obtain a target display interface for displaying each module.
[0059] However, there are different scenarios when the program is running, and the status of the program in different scenarios is also different. In order to collect problems that correspond to the program scenarios so that the corresponding specific problems can be solved later based on the logs, the log data generated by the application in different scenarios needs to be differentiated. At present, in the solution for troubleshooting problems based on logs, the relevant personnel usually capture the log files generated by the program for troubleshooting.
[0060] Among them, the newly added log capture usually needs to be achieved by re-publishing the Android APK (Android Package Kit) file. This process is not only cumbersome, but also cannot meet the flexibility of adding new abnormal log capture needs at any time. For example, when relevant personnel need to capture logs for a specific abnormal scenario, they must re-publish the APK containing the new log capture command, which not only wastes time, but may also cause version management confusion.
[0061] Based on this, in the embodiment of the present application, the system can parse the relevant target format files, such as parsing the json (JavaScript Object Notation) format files corresponding to the target program, to determine which specific running scenarios the target program includes, that is, to determine different scenario modules, which can be specifically as follows: Figure 3 shown. Figure 3 In the , applications, image quality, sound quality, peripherals, etc. can be regarded as different modules. Figure 3 As a whole, it can be regarded as a UI (User Interface) display interface for user interaction after parsing the json file.
[0062] 203. Obtain a target interaction instruction corresponding to a target module in a target display interface.
[0063] After the corresponding UI display interface is displayed, relevant personnel can click on any module on the UI display interface to generate the target interaction instruction corresponding to the target module. At this time, the system can determine which specific scenario module the user wants to obtain the corresponding log data.
[0064] 204. According to the target interaction instruction, the log data corresponding to the target module is stored in the target storage area.
[0065] After determining the log data in the specific target scenario mode that the user wants to extract, the system can send the log data capture task to the underlying service through the socket protocol, such as DFT Service (Design for Test) to complete the log capture and store it in the newly created tmp file directory in the specified data partition, that is, the target storage area. After storing in the target storage area, relevant personnel can directly view the relevant log data in the target storage area without manually extracting logs.
[0066] The specified data partition can be a storage area in a local storage medium or a storage area in an external storage medium, and the specific embodiments of the present application do not limit it. At the same time, logs corresponding to different modules can generate different storage paths, such as generating different tmp directories, so as to realize the classified storage of log data corresponding to different modules, which is convenient for relevant personnel to view.
[0067] The data processing method provided by the present application can parse the target format file and display the interactive display interface of each module after obtaining the log data extraction instruction of the target program. Afterwards, the function of capturing abnormal logs of the target module can be realized according to the specific module specified by the user, and the automatic log acquisition corresponding to the target module can be provided to avoid the problem of difficulty in obtaining the specified log.
[0068] In order to better implement the embodiment of the present application, in one embodiment of the present application, according to the log data extraction instruction, parsing the target format file includes:
[0069] According to the log data extraction instruction, the version information of the target program is determined; if the version information of the target program is the target version information, the target environment mode is switched; in the target environment mode, the target format file is parsed.
[0070] The above embodiment provides a method for obtaining logs. However, in the actual process, when the target program is running, the generated logs include not only the distinctions under different scenario modes, but also the distinctions between different versions. For example: the target program will generate logs under version 1 and also under version 2. However, usually, the occurrence of problems is strongly correlated with the corresponding versions, so if you need to troubleshoot the problem, you need to clarify which version of the program the logs were generated by. Based on this, the embodiment of the present application also provides a method.
[0071] Specifically, the program is usually released after being tested, and only then can the user use the program. In the testing phase, the frequency of program problems is the highest. Therefore, in the embodiment of the present application, it can be detected whether the target program is a test version. If the program is a test version, it is the target version information. At this time, if it is the target version information, it proves that the program needs to be run in a relatively complex scenario. The specific reason is that the more complex the operating environment is, the easier it is to test problems. For example: when the system load is too large, the more unstable the program runs, the easier it is to have problems. Therefore, if it is the target version, the current test environment can be changed to a certain extent, such as switching to the target environment mode. Among them, the target environment mode can be a high-load mode, a high-latency mode, etc., and the specific embodiment of the present application is not limited. When the mode is switched, the program is running, and the log of the corresponding module will be generated in the target environment mode. On this basis, the log obtained later has particularity, which can more effectively help relevant personnel determine whether there is a problem.
[0072] It should be noted that the subsequent method of storing the logs in the corresponding storage area is the same as that in the above embodiment, and will not be described in detail here.
[0073] In order to better implement the embodiment of the present application, in one embodiment of the present application, obtaining a target interaction instruction corresponding to a target module in a target display interface includes:
[0074] If multiple initial interaction instructions are obtained within the target time period, the timing information of each initial interaction instruction is determined; and according to the timing information of each initial interaction instruction, the target interaction instruction is determined from each initial interaction instruction.
[0075] According to the above embodiment, relevant personnel need to interact with the UI display interface when obtaining logs. In some cases, when clicking a button on the UI display interface, it may be clicked multiple times in a short period of time, which will cause the program to be abnormal. For example: after the relevant personnel clicks button 1 on the UI display interface, a corresponding dialog box will pop up to respond to the user's instructions, such as a confirmation dialog box. However, if the user clicks multiple times within a target time period such as 1 second, 2 seconds, and 3 seconds, multiple confirmation dialog boxes will pop up, causing UI errors. At the same time, if the user clicks multiple times, the program will also store log data in the relevant area multiple times, thereby occupying storage space. Therefore, if it is determined that the user interacts with the UI interface multiple times in a short period of time, some of the user's interaction instructions will be ignored. Therefore, it is equivalent to obtaining multiple initial interaction instructions within the target time period in the above description. At this time, it can be determined which specific interaction instructions to respond to according to the order of clicking the UI interface buttons, that is, the time sequence information. For example: only respond to the interaction instructions of the user's last 1, 2, etc. clicks on the UI interface button as the target interaction instruction. In this way, too many dialog boxes will not pop up on the UI display interface, and too many logs will not be stored at the same time.
[0076] In order to better implement the embodiment of the present application, in one embodiment of the present application, according to the target interaction instruction, the log data corresponding to the target module is stored in the target storage area, including:
[0077] According to the target interaction instruction, the target data volume of the log data is determined; if the target data volume is less than the data volume threshold, the log data corresponding to the target module is stored in the target storage area.
[0078] In the above embodiment, a scheme for storing logs in a target storage area is provided. In the actual process, the storage space of the target storage area may be fully occupied. At this time, if the log data continues to be stored, a storage error will occur. Therefore, in order to avoid this situation, the embodiment of the present application also provides a corresponding scheme.
[0079] Specifically, when determining which specific log data needs to be stored, the target data volume corresponding to the specific log data can be first determined with a data volume threshold. Specifically, existing storage media will retain a certain storage margin to prevent the storage space from being fully occupied. Therefore, the storage margin can be understood as a data volume threshold. For example: the storage space can be set, for example, the storage margin is set to 100MB. When a file is stored in the storage medium, if the storage is completed, the storage margin will be less than 100MB. At this time, the storage medium will block the storage task. The storage space usually occupied by log data is small, so the embodiment of the present application can modify the storage strategy of the storage medium. When the log data is less than the margin data, it can be directly stored.
[0080] Based on this, if the target data volume corresponding to the current log is less than the data volume threshold, the representation log can be successfully stored. At this time, the storage process can be executed.
[0081] In order to better implement the embodiment of the present application, in one embodiment of the present application, storing the log data corresponding to the target module in the target storage area includes:
[0082] Determine whether the target data volume is greater than the storage capacity of the target storage area; if the target data volume is greater than the storage capacity, clear the target file with the oldest storage time in the target storage area until the target data volume is less than or equal to the storage capacity, and store the log data corresponding to the target module in the target storage area; if the target data volume is less than or equal to the storage capacity, directly store the log data corresponding to the target module in the target storage area.
[0083] The above embodiment provides a storage solution, but there is also a situation where the log data is relatively large. For example, the storage margin is 100MB, and the setting data is set in advance and is not a dynamic data. When the log data stored each time is less than the storage margin, multiple storages will cause the actual storage space to be fully occupied. Therefore, in this case, the storage space needs to be cleaned up to complete the subsequent log storage work.
[0084] Based on this, if the data volume corresponding to the log data is less than a certain data volume threshold, it is also necessary to determine whether the current storage capacity can still support log storage. Therefore, if the storage of log data is not supported, that is, the target data volume is greater than the storage capacity, the clearing action is performed first, and then the storage action is performed. If the storage of log data is supported, it can be directly stored. Specifically, the way to clear the file can refer to any method, and the embodiments of the present application do not limit it.
[0085] In order to better implement the embodiment of the present application, in one embodiment of the present application, before storing the log data corresponding to the target module in the target storage area according to the target interaction instruction, the method further includes:
[0086] Detect the stored files in the target storage area to determine whether the stored files include files that are not successfully compressed; if the stored files include files that are not successfully compressed, delete the files that are not successfully compressed.
[0087] The above embodiment provides a solution for performing storage space detection before storing logs, and executing the storage process only when the log data is less than the remaining storage space. Based on this, the embodiment of the present application also provides a solution for real-time monitoring of storage space before storage, so as to perform a certain degree of file cleaning in advance to avoid the problem of subsequent log storage failure.
[0088] Specifically, the stored files in the target storage area can be detected in real time. In actual situations, when users use the target storage area for file storage, files that fail to be compressed may appear. Files that fail to be compressed are damaged files. Based on this, if files that fail to be compressed appear, the system can start an automatic cleaning program to delete the files that fail to be compressed, thereby alleviating the storage space of the target storage area and avoiding subsequent log storage failures. Among them, detecting whether there are files that fail to be compressed in the target storage area can be determined by detecting the file format of temporary files. At the same time, the cleaning program can also refer to any technology, and the embodiments of the present application are not limited to it.
[0089] In order to better implement the embodiment of the present application, in one embodiment of the present application, before obtaining the log data extraction instruction of the target program, the method further includes:
[0090] Obtain target operation data during the target program test run; detect whether the target operation data is abnormal; if the target operation data is abnormal, upload the target operation data to the target server; if the target operation data is not abnormal, periodically upload the target operation data to the target server.
[0091] The above embodiment provides a solution for obtaining and storing logs. However, the purpose of obtaining logs is to help relevant personnel determine whether there is a problem with the program through log analysis, and how to quickly find a targeted solution if there is a problem. Therefore, in order to enable relevant personnel to better detect problems based on the data generated by the program, the embodiment of the present application also provides a solution.
[0092] Specifically, during the test run of the target program, the local test terminal can also send the data generated in real time during the test run to the target server, so that the server can make statistics based on the test data sent by the local test device for relevant personnel to view.
[0093] For example: If the CPU occupancy rate of the target program suddenly drops during the test process, resulting in abnormal target operating data such as program freezing, the local test device can upload the program's operating data to the target server. Alternatively, when the target program crashes during the test run, the local test device can also upload the crashed target operating data to the server. Program freezing, crashing and other operating data are all abnormal manifestations. It can be seen that when the target operating data of the target program is abnormal, the system needs to upload the abnormal target operating data to the target server. Based on this, the embodiments of the present application do not limit abnormal situations.
[0094] In addition, it should be noted that if there is no abnormal target running data during the test of the target program, the local test equipment can also send the running target running data to the target server so that relevant personnel can view the specific code running status, which is convenient for relevant personnel to update and iterate.
[0095] In order to better implement the data processing method in the embodiment of the present application, in addition to the data processing method, the embodiment of the present application also provides a data processing device, such as Figure 4 As shown, the device 300 includes:
[0096] The acquisition module 301 is used to acquire the log data extraction instruction of the target program;
[0097] Processing module 302, used to extract instructions according to log data, parse the target format file, and obtain the target display interface for displaying each module;
[0098] The acquisition module 301 is also used to acquire a target interaction instruction corresponding to a target module in a target display interface;
[0099] The processing module 302 is further configured to store the log data corresponding to the target module into the target storage area according to the target interaction instruction.
[0100] The data processing device provided by the present application can parse the target format file and display the interactive display interface of each module after the log data extraction instruction of the target program is obtained by the acquisition module 301. After that, the function of capturing abnormal logs of the target module can be realized according to the specific module specified by the user, and the automatic log acquisition corresponding to the target module can be provided to avoid the problem of difficulty in obtaining the specified log.
[0101] In some embodiments of the present application, the processing module 302 is specifically used to:
[0102] Extract instructions based on log data and determine version information of the target program;
[0103] If the version information of the target program is the target version information, switch to the target environment mode;
[0104] In target environment mode, parse the target format file.
[0105] In some embodiments of the present application, the acquisition module 301 is specifically used to:
[0106] If multiple initial interaction instructions are obtained within the target time period, determining the timing information of each initial interaction instruction;
[0107] According to the timing information of each initial interaction instruction, a target interaction instruction is determined from each initial interaction instruction.
[0108] In some embodiments of the present application, the processing module 302 is further configured to:
[0109] Determine the target data volume of log data according to the target interaction instruction;
[0110] If the target data volume is less than the data volume threshold, the log data corresponding to the target module is stored in the target storage area.
[0111] In some embodiments of the present application, the processing module 302 is further configured to:
[0112] Determine whether the target data volume is greater than the storage capacity of the target storage area;
[0113] If the target data volume is larger than the storage capacity, clear the target file with the oldest storage time in the target storage area until the target data volume is less than or equal to the storage capacity, and store the log data corresponding to the target module in the target storage area;
[0114] If the target data volume is less than or equal to the storage capacity, the log data corresponding to the target module is directly stored in the target storage area.
[0115] In some embodiments of the present application, the processing module 302 is further configured to:
[0116] Detecting the stored files in the target storage area and determining whether the stored files include files that have not been successfully compressed;
[0117] If the stored files include files that have not been compressed successfully, delete the files that have not been compressed successfully.
[0118] In some embodiments of the present application, the processing module 302 is further configured to:
[0119] Obtain target running data during the target program test run;
[0120] Check whether the target operation data is abnormal;
[0121] If the target operation data is abnormal, the target operation data is uploaded to the target server;
[0122] If there is no abnormality in the target operation data, the target operation data will be uploaded to the target server periodically.
[0123] The present application also provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps of any data processing method in the present application. The terminal device integrates any data processing method provided in the present application. Figure 5As shown, it shows a schematic diagram of the structure of the terminal device involved in the embodiment of the present application, specifically:
[0124] The terminal device may include one or more processing core processors 401, one or more computer-readable storage media memories 402, a power supply 403, an input unit 404 and other components. Those skilled in the art will appreciate that Figure 5 The terminal device structure shown in the figure does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
[0125] The processor 401 is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device. By running or executing software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, the processor 401 executes various functions of the terminal device and processes data, thereby monitoring the terminal device as a whole. Optionally, the processor 401 may include one or more processing cores; the processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, the user interface and the application program, etc., and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.
[0126] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0127] The terminal device also includes a power supply 403 for supplying power to each component. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, power consumption management and other functions through the power management system. The power supply 403 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0128] The terminal device may further include an input unit 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0129] Although not shown, the terminal device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 401 in the terminal device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, thereby realizing various functions, such as:
[0130] Obtain log data extraction instructions of the target program;
[0131] According to the log data extraction instructions, the target format file is parsed to obtain the target display interface of each module;
[0132] Obtaining a target interaction instruction corresponding to a target module in a target display interface;
[0133] According to the target interaction instruction, the log data corresponding to the target module is stored in the target storage area.
[0134] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0135] To this end, an embodiment of the present application provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any data processing method provided in the embodiment of the present application. For example, the computer program is loaded by a processor to execute the following steps:
[0136] Obtain log data extraction instructions of the target program;
[0137] According to the log data extraction instructions, the target format file is parsed to obtain the target display interface of each module;
[0138] Obtaining a target interaction instruction corresponding to a target module in a target display interface;
[0139] According to the target interaction instruction, the log data corresponding to the target module is stored in the target storage area.
[0140] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above, and will not be repeated here.
[0141] In specific implementation, the above units or structures can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units or structures can refer to the previous method embodiments, which will not be repeated here.
[0142] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0143] The above is a detailed introduction to a data processing method and device provided in an embodiment of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A data processing method, characterized in that: The method comprises: Obtain log data extraction instructions of the target program; According to the log data extraction instruction, the target format file is parsed to obtain a target display interface for displaying each module; Acquire a target interaction instruction corresponding to a target module in the target display interface; According to the target interaction instruction, the log data corresponding to the target module is stored in the target storage area.
2. The data processing method according to claim 1, characterized in that: The step of parsing the target format file according to the log data extraction instruction includes: Determining version information of the target program according to the log data extraction instruction; If the version information of the target program is the target version information, switching to the target environment mode; In the target environment mode, the target format file is parsed.
3. The data processing method according to claim 1, characterized in that: The acquiring of the target interaction instruction corresponding to the target module in the target display interface includes: If multiple initial interaction instructions are obtained within the target time period, determining the timing information of each of the initial interaction instructions; The target interaction instruction is determined from each of the initial interaction instructions according to the timing information of each of the initial interaction instructions.
4. The data processing method according to claim 1, characterized in that: According to the target interaction instruction, storing the log data corresponding to the target module into the target storage area includes: Determining a target data volume of the log data according to the target interaction instruction; If the target data volume is less than the data volume threshold, the log data corresponding to the target module is stored in the target storage area.
5. The data processing method according to claim 4, characterized in that: The storing the log data corresponding to the target module into the target storage area includes: Determining whether the target data volume is greater than the storage capacity of the target storage area; If the target data volume is greater than the storage capacity, clear the target file with the oldest storage time in the target storage area until the target data volume is less than or equal to the storage capacity, and store the log data corresponding to the target module in the target storage area; If the target data volume is less than or equal to the storage capacity, the log data corresponding to the target module is directly stored in the target storage area.
6. The data processing method according to claim 1, characterized in that: Before storing the log data corresponding to the target module in the target storage area according to the target interaction instruction, the method further includes: Detecting the stored files in the target storage area, and determining whether the stored files include files that have not been successfully compressed; If the stored files include the unsuccessfully compressed file, the unsuccessfully compressed file is deleted.
7. The data processing method according to claim 1, characterized in that: Before obtaining the log data extraction instruction of the target program, the method further includes: Acquire target operation data during the target program test operation; Detecting whether the target operation data is abnormal; If the target operation data is abnormal, uploading the target operation data to the target server; If there is no abnormality in the target operation data, the target operation data is periodically uploaded to the target server.
8. A data processing device, characterized in that: The device comprises: An acquisition module, used to obtain log data extraction instructions of a target program; A processing module, used to extract instructions from the log data, parse the target format file, and obtain a target display interface for displaying each module; The acquisition module is also used to acquire a target interaction instruction corresponding to the target module in the target display interface; The processing module is further configured to store the log data corresponding to the target module into a target storage area according to the target interaction instruction.
9. A terminal device, characterized in that: The terminal device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps in the data processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in the data processing method according to any one of claims 1 to 7.