Log processing method and device, electronic equipment and computer readable storage medium
By creating child threads in the main thread and separating log processing, the problem of log generation causing main thread congestion in chip tests is solved, and the testing efficiency is improved.
Patent Information
- Application Number
- CN202411517491.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-28
AI Technical Summary
In digital chip testing, the main thread is prone to congestion when generating logs, resulting in long wait time and low test efficiency.
By creating a child thread in the main thread, the main thread obtains the CSV file of the automatic test device in real time, generates the first-level log and stores it, and starts the child thread in response to preset conditions to generate the second-level log, realizing asynchronous processing.
Reduces the risk of main thread congestion when generating logs and improves testing efficiency.
Smart Images

Figure CN119537334A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of chip testing technology, and in particular to a log processing method, device, electronic device and computer-readable storage medium. Background Art
[0002] In digital chip testing, detecting the performance of the chip requires a large amount of test data to judge the stability and practicality of the chip. Each manufacturer will use automatic test equipment to troubleshoot chip problems and perform performance analysis based on the data provided, so log recording and log processing are very important. However, in the related technology, in the process of generating logs, the main thread is congested, resulting in long waiting time and low test efficiency. Summary of the invention
[0003] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a log processing method, device, electronic device and computer-readable storage medium, which can reduce the risk of main thread congestion when generating logs, thereby improving test efficiency.
[0004] According to the first aspect of the present application, the log processing method includes:
[0005] Create a child thread in the main thread;
[0006] Acquire, in real time through the main thread, a comma-separated value CSV file of the automatic test device during the test process; the CSV file represents the test data of the automatic test device;
[0007] Generate a first level log according to the CSV file through the main thread, and store the first level log in a preset database;
[0008] In response to a preset condition, the sub-thread is started through the main thread, a second-level log of the automatic test equipment during the test is generated through the sub-thread, and the second-level log is stored in the preset database.
[0009] According to the log processing method of the embodiment of the present application, at least the following beneficial effects are achieved: the log processing method of the embodiment of the present application first creates a child thread in the main thread, and then obtains the comma-separated value CSV file of the automatic test device in the test process in real time through the main thread, generates a first-level log according to the CSV file through the main thread, and stores the first-level log in a preset database. In response to the preset condition, the child thread is started by the main thread, and the second-level log of the automatic test device in the test process is generated by the child thread, and the second-level log is stored in the preset database. In this way, the first-level log is more important than the second-level log, and the first-level log is generated in real time in the main thread and stored in the preset database, while the second-level log is generated by the child thread, and the child thread is started when responding to the preset condition, realizing the asynchronous processing of the second-level log. Therefore, the first-level log with higher importance is processed in the main thread, and the second-level log with lower importance is processed in the child thread. Therefore, the main thread only processes the first-level log, which can reduce the risk of congestion of the main thread when generating logs, thereby improving the test efficiency.
[0010] According to some embodiments of the present application, generating a first level log according to the CSV file through the main thread includes:
[0011] Extract test data from said CSV file;
[0012] Fill the test data into a preset table row by row;
[0013] The number of filled rows of the preset table is detected, and when the number of filled rows reaches a preset threshold, the first level log is generated based on the preset table.
[0014] According to some embodiments of the present application, the preset table is generated by the following steps:
[0015] Get the header configuration information;
[0016] The preset table is generated based on the table header configuration information.
[0017] According to some embodiments of the present application, before generating the first level log according to the CSV file through the main thread and storing the first level log in a preset database, the method further includes:
[0018] Obtaining server path information, and determining a preset location from the server path information;
[0019] The storing the first level log to a preset database includes:
[0020] The first level log is stored in the preset location of the preset database.
[0021] According to some embodiments of the present application, in detecting the number of filled rows in the preset form, before generating the first level log based on the preset form when the number of filled rows reaches a preset threshold, the process further includes:
[0022] When the main thread detects an abnormality, the first level log is generated based on the preset table, and the first level log is uploaded to the preset database.
[0023] According to some embodiments of the present application, the preset condition is:
[0024] The CPU usage of the main thread is lower than a preset usage threshold.
[0025] According to some embodiments of the present application, the second level log includes a test process log of the automatic testing equipment.
[0026] A second aspect of the present application provides a log processing device, including:
[0027] Create a module to create a child thread in the main thread;
[0028] A real-time acquisition module, used for acquiring, in real time through the main thread, a comma-separated value CSV file of the automatic test device during the test process; the CSV file represents the test data of the automatic test device;
[0029] A first log module, configured to generate a first level log according to the CSV file through the main thread, and store the first level log in a preset database;
[0030] The second log module is used to start the sub-thread through the main thread in response to a preset condition, generate a second-level log of the automatic test device during the test process through the sub-thread, and store the second-level log in the preset database.
[0031] An embodiment of a third aspect of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the log processing method described in any one of the embodiments of the first aspect is implemented.
[0032] The fourth aspect embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and is characterized in that when the computer program is executed by a processor, it implements the log processing method described in any one of the embodiments of the first aspect of the present application.
[0033] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The present application is further described below with reference to the accompanying drawings and embodiments, wherein:
[0035] Figure 1 A schematic diagram of the steps of the log processing method according to an embodiment of the present application;
[0036] Figure 2 for Figure 1 A specific flow chart of step S130;
[0037] Figure 3 A specific schematic diagram of a preset table in an embodiment of the present application;
[0038] Figure 4 A schematic diagram of a flow chart of steps for generating a preset table according to an embodiment of the present application;
[0039] Figure 5 This is a schematic diagram of the structure of a log processing device according to an embodiment of the present application;
[0040] Figure 6 A schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0041] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0042] In the description of the present application, it should be understood that descriptions involving orientation, such as up, down, front, back, left, right, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0043] In the description of this application, "several" means more than one, "more" means more than two, "greater than", "less than", "exceed", etc. are understood to exclude the number itself, and "above", "below", "within", etc. are understood to include the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0044] In the description of this application, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in this application based on the specific content of the technical solution.
[0045] In the description of the present application, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0046] First, the terms in this application are explained:
[0047] Automatic Test Equipment (ATE) is an automated test equipment used in the semiconductor industry chain to detect the functional integrity of integrated circuits (ICs). ATE is the last process in the production and manufacturing of integrated circuits, and its purpose is to ensure the quality of integrated circuit products. ATE testing includes testing various parameters of the chip, such as DC parameters, AC parameters, functional testing, etc., to evaluate the performance, function and reliability of the chip. The technical core of ATE testing equipment lies in functional integration, accuracy, speed and scalability. In terms of functional integration, as the integration of chips increases, testers need to cover a larger test range. Test accuracy affects the judgment of products that do not meet the requirements, including test current, voltage, capacitance, time, etc. Response speed is crucial for semiconductor manufacturers because they want the test time to be as short as possible. Scalability focuses on whether the tester can flexibly increase test functions, channels and the number of workstations as needed to reduce customer costs.
[0048] Comma-Separated Values (CSV) files refer to test data files recorded in comma-separated value format. CSV is a common file format that stores tabular data in plain text, where each line is a data record, each record consists of one or more fields, and the fields are separated by commas. ATE testing usually generates a large amount of test data, including test results, test conditions, test time and other information. These data can be exported as CSV files for data analysis, statistical processing or data exchange with other systems. CSV files have been widely used in the semiconductor testing industry because of their simplicity, generality and easy read and write.
[0049] When using automatic testing equipment for testing in related technologies, during the process of generating logs, all logs are generated in real time in the main thread. Due to the large amount of log content and the slow generation speed, the main thread is congested, resulting in long waiting time and low testing efficiency.
[0050] Based on this, the embodiments of the present application provide a log processing method, device, electronic device and computer-readable storage medium, which can reduce the risk of main thread congestion when generating logs, thereby improving test efficiency.
[0051] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific services or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which services are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0052] The first aspect of the present application provides a log processing method. Figure 1 , Figure 1 The log processing method of the embodiment of the present application includes but is not limited to steps S110 to S140.
[0053] Step S110, creating a child thread in the main thread;
[0054] It is worth noting that a thread processing module is provided in the automatic test equipment, and the thread processing module is used to start the main thread and create a sub-thread in the main thread.
[0055] It should be noted that a thread is the smallest unit for scheduling in an operating system, and refers to an independent instruction stream executed in a process. Usually, a process can contain multiple threads, which share the resources of the process, such as memory space, file handles, etc., but each thread has its own independent execution flow.
[0056] Step S120, obtaining a comma-separated value CSV file of the automatic test device during the test in real time through the main thread; the CSV file represents the test data of the automatic test device;
[0057] It is worth noting that the automatic test equipment is provided with a machine communication module, which can obtain CSV files of the automatic test equipment during the test process. The CSV files represent the test data of the automatic test equipment, such as test time, test parameters of the chip, etc.
[0058] Step S130, generating a first-level log according to the CSV file through the main thread, and storing the first-level log in a preset database;
[0059] It is worth noting that the automatic test equipment is equipped with a log processing module. The log processing module generates a first-level log based on the CSV file through the main thread and stores the first-level log in the preset database. During the chip CP and FT testing process, the test data record is very important to the chip design company. The recorded data can be used to analyze defective products and substandard products, which helps to improve chip design. Therefore, the test data is very important, and the content of the first-level log is a CSV file. The CSV file represents the test data of the automatic test equipment. Therefore, the first-level log is generated and stored in real time in the main thread, which can reduce the risk of test data loss due to abnormalities in the test process.
[0060] Step S140, in response to a preset condition, starting a sub-thread through the main thread, generating a second-level log of the automatic test device during the test process through the sub-thread, and storing the second-level log in a preset database.
[0061] It should be noted that the importance of the second-level log is lower than that of the first-level log. Therefore, the second-level log does not need to be generated in real time. When the preset conditions are triggered, the sub-thread is started through the main thread, and the second-level log of the automatic test equipment during the test is generated through the sub-thread, and the second-level log is stored in the preset database. The asynchronous processing of the second-level log is realized, which can reduce the risk of main thread congestion when generating logs, thereby improving test efficiency.
[0062] In one embodiment, the second level log includes a test process log of the automatic test equipment, which records specific test steps during the test process of the automatic test equipment but does not record relevant parameters of the test result.
[0063] The log processing method of the embodiment of the present application is applied to the automatic test of the automatic test equipment. The method first creates a sub-thread in the main thread through the above steps S110 to S140, and then obtains the comma-separated value CSV file of the automatic test equipment in the test process in real time through the main thread, generates the first-level log according to the CSV file through the main thread, and stores the first-level log in the preset database. In response to the preset condition, the sub-thread is started by the main thread, and the second-level log of the automatic test equipment in the test process is generated by the sub-thread, and the second-level log is stored in the preset database. In this way, the first-level log is more important than the second-level log, and the first-level log is generated in real time in the main thread and stored in the preset database, while the second-level log is generated by the sub-thread, and the sub-thread is started when responding to the preset condition, realizing the asynchronous processing of the second-level log. Therefore, the first-level log with higher importance is processed in the main thread, and the second-level log with lower importance is processed in the sub-thread. Therefore, the main thread only processes the first-level log, which can reduce the risk of congestion of the main thread when generating logs, thereby improving the test efficiency.
[0064] It is understandable that, referring to Figure 2 , Figure 2 for Figure 1 A specific flow chart of step S130 in FIG. Generating the first level log according to the CSV file through the main thread in step S130 may include but is not limited to steps S210 to S230.
[0065] Step S210, extracting test data from the CSV file;
[0066] Step S220, filling the test data into a preset table row by row;
[0067] Step S230 , detecting the number of filled rows of a preset table, and when the number of filled rows reaches a preset threshold, generating a first level log based on the preset table.
[0068] It is worth noting that the number of filled rows refers to the number of rows that have been filled in the preset table.
[0069] Specifically, refer to Figure 3 , Figure 3 The first level log of the embodiment of the present application stores test data in a table format, which can not only store data efficiently but also be displayed to users intuitively. The data can be quickly located by customizing the header name, defining the data unit, range, and hardware and software Bin.
[0070] exist Figure 3In the figure, LotID indicates the batch number of the wafer for CP test, -1 indicates the default value, and -1 for FT test; WaferID: the number of the single wafer, -1 indicates the default value, and -1 for FT test; XAdr: the x-coordinate of the current die, 0 indicates the default value, and 0 for FT test; YAdr: the y-coordinate of the current die, 0 indicates the default value, and 0 for FT test; Site: site number, 0=site1, 1=site2, 2=site3, 3=site4; HBin: hardware binning, 1 represents good products; SBin: software binning; Serial: die number; I1P_GND, I1N_GND: user-defined headers, which are pin names from the name; -1.5 and -0.2 below I1P_GND and I1N_GND: refer to the value range of the current pin settings. It should be noted that in the chip manufacturing and testing process, CP (Chip Probing) testing is a key link. It tests each die on the wafer to screen out defective dies and ensure that only qualified dies enter the subsequent packaging process. FT testing (Final Test) usually refers to the final test of the chip after packaging is completed. It is used to verify whether the function, performance and reliability of the chip meet the design requirements. FT test is -1, indicating that the chip does not meet the design requirements; FT test is 0, indicating that the chip meets the design requirements.
[0071] In one embodiment, the automatic test equipment is provided with a display screen, and the log processing method further comprises the following steps:
[0072] Receive log display instructions;
[0073] A corresponding target first-level log is determined based on the log display instruction, and the target first-level log is displayed on a display screen.
[0074] Specifically, the log display instruction is triggered by the user through an input device, and the log display instruction includes a log time interval. Through the log time interval, the first-level log with a timestamp within the log time interval is obtained from the preset database as the target first-level log, and then the target first-level log is displayed on the display screen. Since the first-level log is recorded in a table form, the user can observe the test data more intuitively. It should be noted that the input device can be a mouse or a keyboard.
[0075] It is understandable that, referring to Figure 4 , Figure 4 The following is a flow chart of the steps for generating a preset table according to an embodiment of the present application. The preset table is generated by the following steps:
[0076] Step S410, obtaining header configuration information;
[0077] Step S420: Generate a preset table based on the table header configuration information.
[0078] It is worth noting that the automatic test equipment is provided with an analysis module, and the user inputs the header configuration information to the automatic test equipment through an input device, for example Figure 3 The LotID, WaferID, YAdr and other information in the table are generated based on the header configuration information. Figure 3 The preset table shown.
[0079] It can be understood that before step S130, the following steps are also included:
[0080] Obtain server path information, and determine the preset location from the server path information;
[0081] Correspondingly, in step S130, the first level log is stored in a preset database, including:
[0082] The first level log is stored in a preset location of a preset database.
[0083] In one embodiment, the automatic testing device is provided with an analysis module, the user connects to the analysis module through a terminal, the user sends a requirement file to the analysis module through the terminal, the analysis module analyzes the requirement file, and obtains the header configuration information and the server path information from the requirement file.
[0084] In one embodiment, before step S230, the following steps are further included:
[0085] When the main thread detects an abnormality, a first-level log is generated based on a preset table and uploaded to a preset database.
[0086] Specifically, when the main thread detects an exception, there is no need to detect the number of filled rows in the preset table. The first-level log is directly generated based on the preset table and the first-level log is uploaded to the preset database, which can reduce the risk of losing the content of the preset table due to the exception.
[0087] In one embodiment, the preset condition is: the CPU usage of the main thread is lower than the preset usage threshold. The CPU usage is an indicator to measure the busyness of the central processing unit (CPU) within a certain period of time. When the CPU usage of the main thread is lower than the preset usage threshold, it means that the CPU can handle other tasks. At this time, the sub-thread is started, and the second-level log of the automatic test device during the test process is generated through the sub-thread, and the second-level log is stored in the preset database.
[0088] The second aspect of the present application provides a log processing device. Figure 5 , Figure 5This is a schematic diagram of the structure of a log processing device according to an embodiment of the present application. The device includes:
[0089] A creation module 510, used to create a child thread in the main thread;
[0090] A real-time acquisition module 520 is used to acquire, in real time through a main thread, a comma-separated value CSV file of the automatic test device during the test process; the CSV file represents the test data of the automatic test device;
[0091] The first log module 530 is used to generate a first-level log according to the CSV file through the main thread, and store the first-level log in a preset database;
[0092] The second log module 540 is used to start a sub-thread through the main thread in response to a preset condition, generate a second-level log of the automatic test device during the test process through the sub-thread, and store the second-level log in a preset database.
[0093] The log processing device of the second aspect embodiment of the present application is used to execute the log processing method of the first aspect embodiment of the present application. When executing the log processing method, a sub-thread is first created in the main thread, and then the comma-separated value CSV file of the automatic test device during the test process is obtained in real time through the main thread, and the first-level log is generated according to the CSV file through the main thread, and the first-level log is stored in a preset database. In response to the preset condition, the sub-thread is started by the main thread, and the second-level log of the automatic test device during the test process is generated by the sub-thread, and the second-level log is stored in the preset database. In this way, the first-level log is more important than the second-level log, and the first-level log is generated in real time in the main thread and stored in the preset database, while the second-level log is generated by the sub-thread, and the sub-thread is started when responding to the preset condition, so as to realize the asynchronous processing of the second-level log. Therefore, the first-level log with higher importance is processed in the main thread, and the second-level log with lower importance is processed in the sub-thread. Therefore, the main thread only processes the first-level log, which can reduce the risk of congestion of the main thread when generating logs, thereby improving the test efficiency.
[0094] The specific implementation of the log processing device is basically the same as the specific implementation of the log processing method described above, and will not be repeated here. On the premise of meeting the requirements of the embodiment of the present application, the log processing device can also be provided with other functional modules to implement the log processing method in the above embodiment.
[0095] The third aspect of the present application provides an electronic device. Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device according to an embodiment of the third aspect of the present application. The electronic device includes:
[0096] The processor 601 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0097] The memory 602 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 602 can store an operating system and other applications. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 602, and the processor 601 calls and executes the log processing method of the embodiment of this application;
[0098] Input / output interface 603, used to implement information input and output;
[0099] Communication interface 604, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0100] Bus 605 , which transmits information between various components of the device (e.g., processor 601 , memory 602 , input / output interface 603 , and communication interface 604 );
[0101] The processor 601 , the memory 602 , the input / output interface 603 and the communication interface 604 are connected to each other in communication within the device via a bus 605 .
[0102] The fourth aspect of the present application is a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the log processing method of any one of the first aspect embodiments.
[0103] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0104] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0105] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0106] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0107] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0108] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0109] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the mapping relationship of the mapping objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next mapping objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0110] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0111] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0112] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0113] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0114] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
[0115] The embodiments of the present application are described in detail above in conjunction with the accompanying drawings, but the present application is not limited to the above embodiments. Various changes can be made within the knowledge of ordinary technicians in the relevant technical field without departing from the purpose of the present application. In addition, the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
Claims
1. A log processing method, characterized in that: include: Create a child thread in the main thread; Acquire, in real time through the main thread, a comma-separated value CSV file of the automatic test device during the test process; the CSV file represents the test data of the automatic test device; Generate a first level log according to the CSV file through the main thread, and store the first level log in a preset database; In response to a preset condition, the sub-thread is started through the main thread, a second-level log of the automatic test equipment during the test is generated through the sub-thread, and the second-level log is stored in the preset database.
2. The log processing method according to claim 1, characterized in that: The generating a first level log according to the CSV file through the main thread includes: Extract test data from said CSV file; Fill the test data into a preset table row by row; The number of filled rows of the preset table is detected, and when the number of filled rows reaches a preset threshold, the first level log is generated based on the preset table.
3. The log processing method according to claim 2, characterized in that: The preset table is generated by the following steps: Get the header configuration information; The preset table is generated based on the table header configuration information.
4. The log processing method according to claim 1, characterized in that: Before generating the first level log according to the CSV file through the main thread and storing the first level log in the preset database, the method further includes: Obtaining server path information, and determining a preset location from the server path information; The storing the first level log to a preset database includes: The first level log is stored in the preset location of the preset database.
5. The log processing method according to claim 2, characterized in that: In detecting the number of filled rows in the preset table, when the number of filled rows reaches a preset threshold, before generating the first level log based on the preset table, the method further includes: When the main thread detects an abnormality, the first level log is generated based on the preset table, and the first level log is uploaded to the preset database.
6. The log processing method according to claim 1, characterized in that: The preset conditions are: The CPU usage of the main thread is lower than a preset usage threshold.
7. The log processing method according to claim 1, characterized in that: The second level log includes a test process log of the automatic test equipment.
8. A log processing device, characterized in that: include: Create a module to create a child thread in the main thread; A real-time acquisition module, used for acquiring, in real time through the main thread, a comma-separated value CSV file of the automatic test device during the test process; the CSV file represents the test data of the automatic test device; A first log module, configured to generate a first level log according to the CSV file through the main thread, and store the first level log in a preset database; The second log module is used to start the sub-thread through the main thread in response to a preset condition, generate a second-level log of the automatic test device during the test process through the sub-thread, and store the second-level log in the preset database.
9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the log processing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the log processing method according to any one of claims 1 to 7 is implemented.