Test information processing method and device, electronic equipment and readable medium
By obtaining test results in the board and storing them to an independent storage space, the problem of low data management and acquisition efficiency after board testing is solved, and structured recording and convenient acquisition are achieved.
Patent Information
- Application Number
- CN202411377069.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-31
AI Technical Summary
The prior art is difficult to effectively process the test results after the board test, resulting in low subsequent data management and acquisition efficiency.
By obtaining the board test results, selecting alternative storage locations and generating structured test information, which is stored in the board's independent storage space for external calls to obtain.
It realizes structured recording and integration of board test results, improves data tracking and acquisition efficiency, and ensures that developers can easily obtain test results.
Smart Images

Figure CN119224536A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic equipment, and in particular to a method and device for processing test information, an electronic device and a readable medium. Background Art
[0002] At present, as a printed circuit board, the board card has been increasingly used in various electronic devices. In actual development, in order to ensure the delivery quality of the board card, various tests will be carried out on the produced board cards before leaving the factory, such as performance test, function test, stability test, etc., to ensure that the electronic components, interfaces, losses, signals, etc. on the board card meet the standard requirements, so that the stability and performance of the entire system can be guaranteed.
[0003] Accordingly, after the board test operation is performed, how to perform subsequent processing on the test results becomes a technical problem that needs to be solved urgently. Summary of the invention
[0004] The embodiment of the present invention provides a method, device, electronic device and readable medium for processing test information, which can realize subsequent processing of the test results of the board test operation.
[0005] In order to solve the above problem, an embodiment of the present invention discloses a method for processing test information, the method comprising:
[0006] After performing a board test operation on the board under test, obtaining test results corresponding to each test item in the board under test; one test item corresponds to one peripheral of the board under test;
[0007] Selecting a target storage location from the candidate storage locations of the board under test, and generating test information corresponding to the board test operation based on the test result as target test information; wherein the target test information is used to structurally represent the test result of the test item; the candidate storage location is located in a storage device in the board under test, representing an independent storage space for storing the target test information;
[0008] The target test information is stored in the target storage location for external access.
[0009] On the other hand, an embodiment of the present invention discloses a test information processing device, the device comprising:
[0010] An acquisition module, used for acquiring the test results corresponding to each test item in the tested board after performing a board test operation on the tested board; one of the test items corresponds to one peripheral of the tested board;
[0011] A selection module, used to select a target storage location from the candidate storage locations of the board under test, and a generation module, used to generate test information corresponding to the board test operation based on the test result as target test information; wherein the target test information is used to structure the test result of the test item; the candidate storage location is located in a storage device in the board under test, representing an independent storage space for storing the target test information;
[0012] The storage module is used to store the target test information in the target storage location for external call acquisition.
[0013] On the other hand, an embodiment of the present invention discloses an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the aforementioned method.
[0014] The embodiment of the present invention further discloses a machine-readable medium on which instructions are stored. When executed by one or more processors, the processors are enabled to execute the method described above.
[0015] The embodiment of the present invention includes the following advantages: in the method for processing test information provided by the embodiment of the present invention, after the board card under test is subjected to the board card test operation, the test results of the board card under test corresponding to each test item in the acquisition are obtained, and one test item corresponds to one peripheral device of the board card under test. A target storage location is selected from the candidate storage locations of the board card under test, and test information corresponding to the board card test operation is generated based on the test result as the target test information; wherein the target test information is used to structure the test results of the test items; the candidate storage location is located in the storage device in the board card under test, representing an independent storage space for storing the target test information. The target test information is stored in the target storage location for external call acquisition. In this way, by storing the test information corresponding to the board card test operation in the target storage location in the board card under test, a structured record of the test result data is realized, so as to facilitate the tracking of the functional data of the board card. At the same time, by integrating the test information into the board card's own storage, when the subsequent board card is delivered to the developer, the developer can also conveniently obtain the test results, thereby ensuring the efficiency of obtaining the test results. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0017] Figure 1 is a flowchart of a method for processing test information provided by an embodiment of the present invention;
[0018] Figure 2 is a schematic diagram of an information format of a test information unit provided by an embodiment of the present invention;
[0019] Figure 3 It is a schematic diagram of a processing flow provided by an embodiment of the present invention;
[0020] Figure 4 is another processing flow diagram provided by an embodiment of the present invention;
[0021] Figure 5 is a block diagram of a test information processing device provided by an embodiment of the present invention;
[0022] Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] Reference Figure 1 , shows a flow chart of the steps of a method for processing test information provided by an embodiment of the present invention. Figure 1 As shown, the test information processing method specifically includes the following steps:
[0025] Step 101 : After performing a board test operation on a board under test, obtain test results corresponding to each test item in the board under test; one test item corresponds to one peripheral device of the board under test.
[0026] Step 102: Select a target storage location from the alternative storage locations of the board under test, and generate test information corresponding to the board test operation based on the test result as target test information; wherein the target test information is used to structure the test result of the test item; the alternative storage location is located in a storage device in the board under test, representing an independent storage space for storing the target test information.
[0027] Step 103: Store the target test information in the target storage location for external access.
[0028] In the embodiment of the present invention, the board under test can be any board for board test, and the board can be divided into a central processing unit (CPU), a storage device and other peripherals. Wherein, the board can include multiple storage devices and multiple other peripherals, and the alternative storage location can be provided by the storage device, that is, the alternative storage location can be an available storage location for storing test information in the storage device in the board under test, and the storage device itself is also a kind of peripheral. The board test operation can include the test of all test items in the board under test. Wherein, one test item can correspond to one functional peripheral. After the board under test leaves the factory, the number of functional peripherals required to be tested is fixed because the interfaces, slots, etc. for connecting the functional peripherals are fixed. Exemplarily, the test items can include test items for Universal Serial Bus (USB) peripherals, display peripherals and network peripherals.
[0029] Each time after the board test operation is performed on the board under test, the test result of this board test operation on the board under test can be obtained. Among them, the test result may include the test result corresponding to each test item. Test information including the test result can be generated according to a preset information format to obtain target test information. Further, the available storage space of each storage device in the board under test can be counted in advance to determine the available storage position of all storage devices in the board under test as an alternative storage position. Accordingly, after performing a board test operation, a target test information can be generated based on the test results of the test items corresponding to all peripherals, and the target test information can be stored in the alternative storage position provided by the storage device of the board itself. That is, each storage position can store the target test information corresponding to a board test operation. Correspondingly, if a peripheral fails, the external device can call to obtain the test result of the peripheral in each board test operation. Specifically, the external device can request to read the test result of the peripheral in each board test operation from the target test information of each alternative storage position.
[0030] Accordingly, after the board card under test is subjected to the board card test operation, an alternative storage location can be selected from the alternative storage locations as the target storage location for storing the test results corresponding to the functional peripherals in this board card test operation. Wherein, the target storage location is a storage location for storing the test information corresponding to the board card test operation. Since the alternative storage location is an available storage location provided by the board card under test for storing the test information, the target test information is stored in the target storage location selected from the alternative storage location, so that the target test information is stored inside the board card under test, that is, the corresponding test results of the board card test operation are stored with the board card under test. It should be noted that the operation of selecting the target storage location from the alternative storage location of the board card under test and the operation of generating the test information corresponding to the board card test operation based on the test results are not unique in the execution order, for example, the two can be executed synchronously, or the target storage location can be selected first, and then the test information corresponding to the board card test operation is generated asynchronously, or the test information corresponding to the board card test operation can be generated first, and then the target storage location is selected asynchronously.
[0031] Furthermore, the execution subject of the storage method provided in the embodiment of the present invention may be a test device connected to the board under test, for example, the execution subject may be a test host or automatic test equipment (ATE). Alternatively, in the case of a specific self-test function of the board under test, the execution subject may also be the board under test itself.
[0032] A test program can be run on the execution subject, and after the board test operation is completed, the test program can automatically execute each step in the above storage method, that is, perform automatic storage. Exemplarily, the test program can be generated in advance through program design and software debugging. Compared with the manual recording method, after the board test operation is completed, the test program automatically generates test information and records the test information directly to the target storage location inside the tested board, which can reduce labor costs and improve processing efficiency. In addition, the problem of recording errors caused by interference from human factors is avoided to ensure the validity of the stored test results.
[0033] In summary, in the method for processing test information provided by the embodiment of the present invention, after the board card under test is subjected to the board card test operation, the test results of each test item corresponding to the board card under test are obtained, and one test item corresponds to a peripheral device of the board card under test. A target storage location is selected from the alternative storage location of the board card under test, and test information corresponding to the board card test operation is generated based on the test result as the target test information; wherein the target test information is used to structure the test results of the test items; the alternative storage location is located in the storage device in the board card under test, representing an independent storage space for storing the target test information. The target test information is stored in the target storage location for external call acquisition. In this way, by storing the test information corresponding to the board card test operation in the target storage location in the board card under test, a structured record of the test result data is realized, so as to facilitate the tracking of the functional data of the board card. At the same time, by integrating the test information into the board card's own storage, when the subsequent board card is delivered to the developer, the developer can also easily obtain the test results, thereby ensuring the efficiency of obtaining the test results.
[0034] Optionally, in the embodiment of the present invention, the storing the target test information to the target storage location may specifically include:
[0035] Step 1031: Determine the writing mode of the storage device to which the target storage location belongs as the target writing mode.
[0036] Step 1032: Write the target test information into the target storage location according to the target writing method.
[0037] Among them, the board under test often includes multiple storage devices, and the storage devices included in the board can be obtained based on the design file of the board. There is a situation where the alternative storage locations in a board belong to different storage devices. The reading and writing methods of different storage devices may be different. Exemplarily, the board under test may include a flash memory (Flash), an embedded Multi Media Card (embedded Multi Media Card, eMMC) memory, and a secure digital input and output (Secure Digital Input Output, SDIO) memory. In an embodiment of the present invention, the storage device can be marked by pre-encoding the storage device. Specifically, each storage device corresponds to a unique device code, so that different storage devices can be distinguished based on the device code. Exemplarily, a size of 1 byte can be used to encode the storage device, and accordingly, the device code of Flash can be 1, the device code of SDIO can be 2, and the device code of eMMC can be 3.
[0038] Corresponding write methods can be set for different storage devices. Exemplarily, the device code of the storage device and the corresponding write method can be stored in a designated space, and the designated space can be a space accessible to the execution subject. For example, the write method of Flash is: erase the entire block before writing data, and then write in units of pages. The write method of eMMC is: write in units of blocks. The write method of SDIO is: after initiating a write command, the data to be written is transmitted through the bus. Accordingly, the write method corresponding to the device code of the storage device to which the target storage location belongs can be found from the designated space as the target write method. Among them, the device code of the storage device to which the target storage location belongs can be pre-recorded in a preset position list.
[0039] It should be noted that in the embodiment of the present invention, corresponding reading methods can also be set for different storage devices. The device code of the storage device and the corresponding reading method can be stored in a space accessible to the execution subject. In this way, when it is necessary to read the test information stored in the alternative storage location, it can be read according to the reading method corresponding to the device code of the storage device to which the alternative storage location belongs, thereby avoiding the problem of failure to read the test information due to incompatible reading methods.
[0040] In the embodiment of the present invention, the writing mode of the storage device to which the target storage location belongs is first determined as the target writing mode. Then, the target test information is written to the target storage location according to the target writing mode. In this way, it can be ensured that the writing mode used is adapted to the storage device to which the target storage location belongs, thereby avoiding the problem of failure to write the target test information due to incompatible writing mode.
[0041] Optionally, the test information corresponding to the board test operation generated based on the test result as target test information may specifically include:
[0042] Step 1021: Determine the next storage location of the target storage location from the candidate storage locations.
[0043] Step 1022: respectively obtain the test item number of each of the test items and the information number corresponding to the board test operation to obtain a target information number.
[0044] Step 1023: Generate the target test information based on the target information number, the next storage location, the test item number of each of the test items, and the test results corresponding to each of the test items.
[0045] In an embodiment of the present invention, an information number can be used to uniquely indicate a piece of test information. Different board test operations correspond to different information numbers. The information number corresponding to the board test operation is the target information number, which can be used to identify the test information corresponding to the board test operation. The information format and storage size can be preset. Specifically, a piece of test information can be regarded as a test information unit. After each board test operation is performed on the board under test, a test information unit can be generated for storage. Figure 2 is a schematic diagram of an information format of a test information unit provided by an embodiment of the present invention, such as Figure 2 As shown, the test information may include an information number, next storage location information, and entry information. Among them, the entry information includes the test item number of each test item and the test result corresponding to each test item (not shown in the figure). The size of the bytes occupied by the information number in the information format can represent the maximum amount of information that can be stored, the size of the bytes occupied by the next storage location information can be set based on the maximum storage location for storing test information in the storage device, the size of the bytes occupied by the information number and the size of the bytes occupied by the next storage location can be freely designed according to the capacity of the actual storage device, and the embodiment of the present invention does not limit this. Exemplarily, based on the principle of storing information as small as possible and sufficient information, it can be set that the information number occupies 1 byte (byte) size, the next storage location information occupies 4 bytes size, and the entry information occupies dev_num byte size. Among them, dev_num represents the number of test items, and the byte size of the test information unit can be represented by info_size.
[0046] In an embodiment of the present invention, the next storage position of the target storage position is used to indicate the storage position of the next test information storing the current target test information. That is to say, after the board test operation is performed on the board under test, the generated test information can be stored in the next storage position of the target storage position. Specifically, the next alternative storage position after the target storage position can be determined as the next storage position of the target storage position according to the selection order of the alternative storage positions set in advance. Among them, the storage order of the alternative storage positions in the preset position list is the selection order of the alternative storage positions. Accordingly, the next alternative storage position of the target storage position in the preset position list can be read to obtain the next storage position of the target storage position, that is, the next storage position of the storage position refers to the next alternative storage position of the storage position defined in the preset position list. Further, the device code of the storage device to which the next storage position of the target storage position belongs can be determined, and the device code and the next storage position of the target storage position are combined into the next storage position information.
[0047] Further, the test item number can also be called the test item code. After the board is designed, the test items to be tested are determined, and each test item can be encoded in advance, and the coding of each test item is different. Exemplarily, it can be encoded in a size of 2 bits (bit), the coding of the test item of the USB peripheral can be 0, the coding of the test item of the display peripheral can be 1, and the coding of the test item of the network peripheral can be 2. Further, the test result can include a passed test and a failed test. Among them, a passed test and a failed test can be represented by different result codes respectively. Various test results can be encoded in advance, and the coding of each test result is different. Exemplarily, a passed test can correspond to a successful test, and the result coding corresponding to the test result can be 0, and a failed test can be divided into a test failure and other abnormalities, and the result coding corresponding to the test failure can be 1, and the result coding corresponding to other abnormalities can be 2. For the coding of the test items and the test results, test_code can be used. The execution subject can determine the test item coding of each test item and the result coding of each test result based on the content of test_code.
[0048] Specifically, the test result may include test results corresponding to each test item arranged in order from small to large according to the test item code. Accordingly, the test item code of each test item may be loaded in order from the pre-set test item code in order from small to large according to the test item code. The pre-set test item code may be stored in a preset storage location in order from small to large.
[0049] For any test item, the test item number of the test item and the test result corresponding to the test item are combined into an entry information. Among them, the number of entry information included in a test information is the same as the total number of test items. Finally, the target information number, the next storage location information and the entry information can be combined according to the information format to obtain the target test information. The target test information can be represented by mk_info. In the embodiment of the present invention, the information number, the next storage location information, the test item number of the test item and the test result are combined to obtain the test information. Since the storage space occupied by the number, the test result and the storage location information is very small. Therefore, the test information finally generated is small. In this way, it is convenient to store, and there is no need to add additional storage space. Storage can be achieved based on the storage device of the board itself. At the same time, by setting the test item number and the information number in the test information, it is convenient to manage the test information and add new entry information in the future, thereby improving the scalability of the storage method. For example, the test information of a specific information number can be targeted from the information number dimension in the future. When adding a new test item, the entry information can be generated corresponding to the test item number.
[0050] Exemplarily, assuming that there are two test items, the generated target test information may be as shown in Table 1 below:
[0051]
[0052] Table 1
[0053] Among them, the device code can occupy 1 byte of space, the next storage location can occupy 3 bytes of space, the test item code can occupy 2 bits of space, and the test result can occupy 6 bits of space.
[0054] In an embodiment of the present invention, the next storage location of the target storage location is determined from the alternative storage locations, and then the test item number of each test item is obtained, and the information number corresponding to the board test operation is obtained to obtain the target information number. Based on the target information number, the next storage location of the target storage location, the test item number of each test item, and the test results corresponding to each test item, the target test information is generated. By setting the information number in the target test information, it is convenient to manage the test information based on the information number in the subsequent process, and by setting the test item number in the target test information, it is convenient to know which test items are specifically tested in each board test operation. Furthermore, by setting the next storage location information in the target test information, it is convenient to know the storage location of the next test information by accessing the test information in the subsequent process, thereby improving the convenience of accessing the test information.
[0055] Optionally, in an embodiment of the present invention, the above-mentioned generation of a corresponding information number for the board test operation to obtain a target information number may specifically include: determining the information number of the test information stored most recently. Adding a preset value to the information number of the test information stored most recently to obtain the target information number. In this way, by adding a preset value to the information number of the test information stored most recently, the information numbers of the test information stored successively can be increased in sequence, thereby facilitating the order of storage of the test information based on the information number. For example, the smaller the information number, the earlier it is stored.
[0056] In an embodiment of the present invention, a space for storing the information number of the most recently stored test information may be specially set, and the information number of the most recently stored test information may be read from the space. Specifically, if the space is empty, the preset numbering start value may be directly set as the target information number. The numbering start value may be set as required, and illustratively, the numbering start value may be 0. If the space is not empty, a preset value may be added to the information number of the most recently stored test information read. The preset value may be pre-set, and illustratively, the preset value may be 1. In this way, the information numbers of the stored test information may be controlled to increase by 1 in sequence, thereby ensuring the continuity between the information numbers of the test information.
[0057] In an embodiment of the present invention, starting from the first alternative storage position, the first alternative storage position can be used as the storage position to be accessed, and information access can be performed on the storage position to be accessed. Information access refers to reading the information in the storage position to be accessed, and detecting whether the read information conforms to the above-mentioned information format. If it conforms, the access is successful, otherwise the access fails. Specifically, if the first alternative storage position does not store the test information, that is, the first alternative storage position is empty, it will cause the access to the first alternative storage position to fail. Accordingly, in the case of access failure, the starting value of the numbering can be directly set to the target information number. When reading the information in the storage position to be accessed, the device code corresponding to the storage position to be accessed can be found from the preset position list, and then the reading method corresponding to the device code can be found, and then the storage position to be accessed can be read based on the found reading method.
[0058] Furthermore, in the case of successful access, the storage location to be accessed can be updated to the next alternative storage location of the current storage location to be accessed, and information access to the storage location to be accessed can be performed again. If the access fails, the information number of the test information stored in the previous alternative storage location of the storage location to be accessed can be obtained to obtain the information number of the test information stored most recently. Compared to a method of setting up a space specifically for storing the information number of the test information stored most recently and reading the information number of the test information stored most recently from the space, in an embodiment of the present invention, the information number of the test information stored most recently is determined by performing information access to the storage location to be accessed. In this way, there is no need to set up a space specifically for storing the information number of the test information stored most recently, and more storage space can be reserved for the test information. Then, a preset value is added to the information number of the test information stored most recently.
[0059] Optionally, in the embodiment of the present invention, the selecting of the target storage location from the candidate storage locations of the board under test may specifically include:
[0060] Step 1023, starting from the first candidate storage position in the preset position list of the board under test, each candidate storage position is detected in turn; the preset position list respectively records the candidate storage positions in the board under test for storing the target test information.
[0061] Step 1024: If it is detected that the candidate storage location does not store the test information, the candidate storage location is determined as the target storage location.
[0062] In an embodiment of the present invention, the size of available storage space in each storage device in the board under test can be counted in advance. The size of available storage space in each storage device can be obtained based on the design file of the board under test. Then, the storage device whose available storage space size is not less than the size of a single test information is used as an available storage device, and the storage device whose available storage space size is less than the size of a single test information is eliminated. The above encoding of the storage device can be encoding of the available storage device. The size of a single test information can be the above info_size size. The first candidate storage position in the preset position list can represent the starting storage position of the test information, and the first candidate storage position can be set as needed. For example, the first candidate storage position can be the starting position of the available storage space in the available storage device with the smallest device code. The preset position list can be in the form of an array as a data structure, wherein an alternative storage position can be used as an element in the array, and for an alternative storage position stored in an element, the next alternative storage position of the alternative storage position can be an alternative storage position stored in the next adjacent element of the element.
[0063] Specifically, a storage device whose available storage space is an integer multiple of the size of a single test message can be selected as an available storage device. Then, in order of device codes from small to large, alternative storage locations are set based on the available storage space of each available storage device. For example, Figure 3 is a schematic diagram of a processing flow provided by an embodiment of the present invention, such as Figure 3As shown, setting the candidate storage position based on the available storage space of each available storage device may include: setting the starting position of the available storage space as a candidate storage position and writing it into a preset position list. Then, for any candidate position in the available storage space, the candidate position is a storage position whose interval size with the candidate storage position written last time is a storage position of a single test information size, and performing a judgment operation: judging whether the interval size between the candidate position and the end address is not less than the storage position of the single test information size, if so, setting the candidate position as a candidate storage position and writing it into a preset position list, if not, ending the setting operation of the available storage space, and starting the setting operation of the next available storage space. Further, after completing the judgment operation of all candidate positions, starting the setting operation of the next available storage space. Specifically, if a storage position whose interval size with the candidate storage position written last time is a storage position of a single test information size is found, but the interval size with the end address is less than the storage position of the single test information size, then the setting operation of the available storage space can be ended. Assume that there are two available storage devices in the board under test: available storage device 1 and available storage device 2, available storage device 1 includes available storage space 1, and available storage device 2 includes available storage space 2. In this embodiment, the starting position of available storage space 1 is 0x3000, the ending position is 0x3025, and the size of a single test information is 0x0010, so 0x3000 can be set as an alternative storage position in available storage space 1, and written into the preset position list. For 0x3010, since the interval size between 0x3010 and 0x3000 is the size of a single test information 0x0010, and the interval size between 0x3010 and the ending position 0x3025 is not less than 0x0010, 0x3010 can be set as an alternative storage position for storing target test information, and written into the preset position list. For 0x3020, since the interval size between 0x3020 and 0x3010 is the single test information size 0x0010, but the interval size between 0x3020 and the end position 0x3025 is less than 0x0010, there is no alternative storage location in available storage space 1, and the setting operation for the next available storage space: available storage space 2 can be started.
[0064] Furthermore, starting from the first candidate storage position, the first candidate storage position can be used as the first storage position to be detected, and the first storage position to be detected can be detected to detect whether the test information is stored. Specifically, the first storage position to be detected can be detected by reading the information in the first storage position to be detected and detecting whether the read information conforms to the above information format.
[0065] If it does not match, it can be determined that it is detected that the first storage position to be detected does not store test information. Accordingly, the first storage position to be detected can be determined as the target storage position. Further, if it matches, it can be determined that the first storage position to be detected stores test information. Accordingly, the first storage position to be detected can be updated to the next alternative storage position of the current first storage position to be detected, and the operation of detecting the first storage position to be detected can be performed again. The next alternative storage position of the current first storage position to be detected can be searched from the preset position list, or the next storage position can be directly read from the test information stored at the current first storage position to be detected to obtain the next alternative storage position of the current first storage position to be detected. In this way, the efficiency of determining the next alternative storage position of the current first storage position to be detected can be improved.
[0066] Exemplarily, it is assumed that there are three available storage devices: available storage device 1, available storage device 2, and available storage device. Among them, five alternative storage locations are set in sequence based on available storage device 1, available storage device 2, and available storage device: alternative storage location a, alternative storage location b, alternative storage location c, alternative storage location d, and alternative storage location e. Then the alternative storage location a can be used as the first storage location to be detected and detected. If it is detected that no test information is stored, the alternative storage location a can be determined as the target storage location. If it is detected that test information is stored, the first storage location to be detected can be updated to the alternative storage location b and detected, and if it is detected that no test information is stored, the alternative storage location b can be determined as the target storage location. If it is detected that test information is stored, the first storage location to be detected can be updated to the alternative storage location c and detected, until an alternative storage location that does not store test information is detected, or the detection of all alternative storage locations is completed.
[0067] It should be noted that when determining the target information number, the detection result of this step can be reused. Specifically, when it is detected that the first alternative storage location does not store test information, the preset numbering starting value can be directly set as the target information number. When the first alternative storage location stores test information, the information number of the test information stored in the previous alternative storage location where the alternative storage location that does not store test information is detected is obtained as the information number of the most recently stored test information. Then, the preset value is added to the information number of the most recently stored test information to obtain the target information number.
[0068] In the embodiment of the present invention, it is not necessary to specially record the candidate storage position used the last time, and each candidate storage position is tested in sequence starting from the first candidate storage position in the preset position list of the board under test. By testing and determining the candidate storage position where no test information is stored, the target storage position can be determined, and the implementation cost is low.
[0069] Optionally, the embodiment of the present invention may further include the following steps:
[0070] Step S21, reading location-related information from a designated storage space to determine the target storage location; the designated storage space is used to store location-related information of a candidate storage location that was most recently used.
[0071] Step S22: If the reading is successful, based on the read position-related information, searching the preset position list for the next storage position of the candidate storage position used most recently as the target storage position.
[0072] Correspondingly, if the reading fails, the above operation of detecting each candidate storage location in sequence starting from the first candidate storage location is performed.
[0073] In an embodiment of the present invention, the designated storage space may be a space pre-set for recording the position-related information of the last used alternative storage location. Wherein, the designated storage space may be located in the board under test. In an embodiment of the present invention, it often involves multiple board test operations that are executed successively. The test information stored the last time refers to the test information stored for the last executed board test operation. Wherein, the last executed board test operation refers to the board test operation with the shortest execution time from the current time. Correspondingly, the last used alternative storage location refers to the alternative storage location storing the test information of the last executed board test operation. The position-related information may include the address of the alternative storage location, and of course, may also include other information, for example, may also include the device code of the storage device to which the alternative storage location belongs. In an embodiment of the present invention, each time after writing the test information corresponding to each type of peripheral device into the board under test, the position-related information of the written alternative storage location may be written into the designated storage space in the board under test. Wherein, each time the test information to be written is written into the designated storage space, the test information of the previously written designated storage space may be overwritten according to the position-related information to avoid information confusion.
[0074] Accordingly, when the target test information needs to be written, the position-related information can be read from the designated storage space first. If the reading is successful, the last used alternative storage position can be determined based on the read position-related information. Exemplarily, the read position-related information can be directly determined as the last used alternative storage position. Then the next storage position of the last used alternative storage position in the preset position list is determined as the target storage position to store the target test information of this time, so that there is no need to determine the target storage position in a traversal manner, and therefore, the determination efficiency is high. Exemplarily, assuming that the position-related information read from the designated storage space is: alternative storage position c, it means that the last stored test information is stored in the alternative storage position c, then the next storage position of the alternative storage position c: alternative storage position d can be determined as the target storage position. It should be noted that for the last alternative storage position, the next storage position of the last alternative storage position can be regarded as the first alternative storage position. Accordingly, the next storage position information in the test information stored at the last alternative storage position points to the first alternative storage position.
[0075] Furthermore, due to factors such as failure to store location-related information, power failure of the board causing loss of location-related information, etc., reading failure may occur. Accordingly, if reading fails, the process may proceed to step 1023 to start execution, traverse from the first candidate storage location again, and detect each of the candidate storage locations in turn, so as to determine the target storage location by detecting each candidate storage location.
[0076] In the embodiment of the present invention, the position-related information is first read from the designated storage space. If the reading is successful, the next storage position of the candidate storage position used most recently is directly searched from the preset position list based on the read position-related information as the target storage position. If the reading fails, the target storage position is determined by detecting each candidate storage position in turn starting from the first candidate storage position in the preset position list of the board under test, so that the efficiency of determining the target storage position can be improved.
[0077] Optionally, the embodiment of the present invention may further include the following steps:
[0078] Step S31: If it is detected that each of the candidate storage locations stores test information, determine the candidate storage location with the longest information storage time; the information storage time is the corresponding time that the test information is stored in the candidate storage location.
[0079] Step S32: determine the candidate storage location with the longest information storage time as the target storage location.
[0080] In the embodiment of the present invention, the information storage duration indicates the storage duration of the test information stored in the candidate storage location. If it is detected that each candidate storage location stores test information, it means that all current candidate storage locations store test information. The detection starts from the first candidate storage location, and the next storage location information in the test information is detected in sequence. Finally, it returns to the first candidate storage location, and there is no space left. Therefore, the candidate storage location with the longest information storage duration can be determined.
[0081] Exemplarily, each alternative storage location can be timed by a preset timing component from the time when the test information is written to the alternative storage location, thereby obtaining the information storage duration corresponding to the test information stored in each alternative storage location. Alternatively, after the test information is written to the alternative storage location, the information writing time corresponding to each alternative storage location can be recorded. Among them, if the alternative storage location is written with test information multiple times, the information writing time of the test information written most recently is used to overwrite the previously recorded information writing time. Then, the duration between the information writing time corresponding to each alternative storage location and the current time is calculated as the information storage duration. Finally, the alternative storage location with the longest information storage duration is determined as the target storage location. Of course, other methods can also be used to determine the alternative storage location with the longest information storage duration. Furthermore, since it is necessary to replace the earliest stored test information, the alternative storage location with the longest storage duration of the stored test information can be determined as the target storage location.
[0082] In an embodiment of the present invention, when it is detected that each candidate storage location stores test information, that is, there is no free candidate storage location at present, the candidate storage location with the longest information storage time is determined. The candidate storage location with the longest information storage time is determined as the target storage location. In this way, by subsequently storing the target test information in the target storage location, it is possible to replace the test information with the longest storage time (that is, the earliest stored test information) with the latest test information, thereby ensuring the timeliness of the stored test information.
[0083] Figure 4 is another processing flow diagram provided by an embodiment of the present invention, such as Figure 4As shown, the target test information can be generated first. Then the preset location information is obtained. Next, it is determined whether the first alternative storage location in the preset location information is accessed effectively. If the access is invalid, it means that the test information is not stored in the first alternative storage location, and the first alternative storage location can be determined as the target storage location. If the access is valid, the other alternative storage locations can continue to be detected. If an alternative storage location that does not store test information is detected, the alternative storage location is determined as the target storage location. If it is detected that each alternative storage location stores test information, the alternative storage location with the longest information storage time is determined as the target storage location. Then, the target test information can be stored in the target storage location.
[0084] Optionally, the above-mentioned candidate storage location for determining the longest information storage time may specifically include:
[0085] Step S31a: respectively detect the test information stored in the candidate storage locations storing the test information.
[0086] Step S31b: if it is detected that the information number of the test information meets the preset number condition, the candidate storage location is determined as the candidate storage location with the longest information storage time.
[0087] In an embodiment of the present invention, starting from the first candidate storage position, the first candidate storage position can be used as the second storage position to be detected, and the second storage position to be detected can be detected to detect whether the information number of the stored test information meets the preset number condition. Among them, the preset number condition can be pre-set, and illustratively, the preset number condition can be the smallest information number. In an embodiment of the present invention, the information numbers of the test information stored in sequence increase in sequence, so it can be detected whether the information number of the stored test information is less than the information number of the test information stored in the previous storage position. If it is less than, it can be determined that the information number of the test information is the smallest and meets the preset number condition. On the contrary, if it is not less than, it can be determined that it does not meet the preset number condition. Further, if the information number of the stored test information meets the preset number condition, the candidate storage position can be determined as the candidate storage position with the longest information storage time. Further, if the information number of the stored test information does not meet the preset number condition, the second storage position to be detected can be updated to the next candidate storage position of the current second storage position to be detected, and the operation of detecting the second storage position to be detected is performed again.
[0088] Assume that there are three alternative storage locations, which are: alternative storage location 1, alternative storage location 2, and alternative storage location 3, respectively. The information numbers of the test information stored in alternative storage location 1, alternative storage location 2, and alternative storage location 3 are: 3, 1, and 2, respectively. Alternative storage location 1 can be used as the second storage location to be detected. Since the information number of the test information stored in alternative storage location 1 is not less than the information number of the test information stored in the previous storage location: alternative storage location 3, the second storage location to be detected can be updated to alternative storage location 2. Since the information number of the test information stored in alternative storage location 2 is less than the information number of the test information stored in the previous storage location: alternative storage location 1, alternative storage location 2 can be determined as the alternative storage location with the longest information storage duration.
[0089] Furthermore, the next candidate storage position of the current second storage position to be detected can be found from the preset position list, or the next storage position can be directly read from the test information stored at the current second storage position to be detected to obtain the next candidate storage position of the current second storage position to be detected. In this way, the efficiency of determining the next candidate storage position of the current second storage position to be detected can be improved.
[0090] In an embodiment of the present invention, it is detected whether the information number of the test information stored in the alternative storage location meets the preset numbering condition, and the alternative storage location where the information number of the test information meets the preset numbering condition is determined as the alternative storage location with the longest information storage time, which has high determination efficiency.
[0091] Further, in an embodiment of the present invention, a preset location list is accessible to the developer execution subject, and the preset location list may specifically record the alternative storage location, the device code of the storage device to which the alternative storage location belongs, and the reading method and writing method of the storage device to which the alternative storage location belongs. For any alternative storage location, the alternative storage location, the device code, the reading method and the writing method of the storage device to which the alternative storage location belongs may be stored correspondingly, for example, may be used as a row in the preset location list, thereby facilitating search. The preset location list may be represented as storage_ctr. Accordingly, when reading information in the storage location to be accessed, the first storage location to be detected or the second storage location to be detected, the reading method corresponding to the storage location to be accessed, the first storage location to be detected or the second storage location to be detected may be searched from storage_ctr, and the storage location to be accessed, the first storage location to be detected or the second storage location to be detected may be read based on the found reading method.
[0092] In the related art, the test results obtained after the test are often output to the user who initiated the board test operation, and are manually managed. The test results are not stored with the board, and the board itself does not carry any information about whether its peripheral functions are normal or not. In the embodiment of the present invention, by automatically storing the test information in the board content, it is possible to distinguish between normal boards and abnormal boards based on the test information stored inside the board. For example, the board whose test results in the test information include those that have not passed the test can be determined as an abnormal board. In this way, management can be facilitated to prevent abnormal boards from flowing into normal boards.
[0093] Further, in actual scenarios, the board and card will involve multiple links before final delivery, and each link will involve at least one board and card test operation on the board and card. There may be differences in the test methods used when different links perform board and card test operations, so as to better implement the test of the board and card. And the transportation, placement, assembly and other processes of the board and card may be involved between each link, and these processes may cause the board and card to be abnormal, and then the test items that have passed the test before cannot pass the test. In an embodiment of the present invention, after each board and card test operation, the test information corresponding to the board and card test operation is stored inside the board and card under test. In this way, the tracking of the board and card test operations performed in each link can be achieved based on the recorded test information, and the abnormal location can be conveniently performed, and the link with the problem can be determined, and then targeted management and optimization can be performed to improve the stability of the board and card. Exemplarily, taking a USB peripheral as an example, assuming that the test item corresponding to the USB peripheral is a test item 1 with a test item number of 1, for example, in the test information corresponding to the board test operation performed by link A, the test item 1 corresponding to the USB peripheral passes the test, and in the test information corresponding to the board test operation performed by link B, the test item 1 corresponding to the USB peripheral passes the test, but in the test information corresponding to the board test operation performed by link C, the test item 1 corresponding to the USB peripheral fails the test, which can indicate that some human operations between link B and link C (for example, improper transportation causing board deformation) have affected the function of the USB peripheral. Alternatively, if a test item in each test information fails the test, it can be determined that the design problem causes the function corresponding to the test item to be abnormal.
[0094] Reference Figure 5 , shows a block diagram of a test information processing device provided by an embodiment of the present invention, such as Figure 5 As shown, the test information processing device specifically includes:
[0095] The acquisition module 201 is used to acquire the test results corresponding to each test item in the tested board after performing the board test operation on the tested board; one test item corresponds to one peripheral of the tested board;
[0096] A selection module 202 is used to select a target storage location from the candidate storage locations of the board under test, and, and, a generation module 203 is used to generate test information corresponding to the board test operation based on the test result as target test information; wherein the target test information is used to structure the test result of the test item; the candidate storage location is located in the storage device in the board under test, representing an independent storage space for storing the target test information;
[0097] The storage module 204 is used to store the target test information in the target storage location for external access.
[0098] Optionally, the selection module 202 is specifically configured to:
[0099] Starting from the first candidate storage position in the preset position list of the board under test, detecting each candidate storage position in turn; the preset position list respectively records the candidate storage positions in the board under test for storing the target test information;
[0100] If it is detected that the candidate storage location does not store the test information, the candidate storage location is determined as the target storage location.
[0101] Optionally, the selection module 202 is further configured to:
[0102] Reading location-related information from a designated storage space to determine the target storage location; the designated storage space is used to store location-related information of the candidate storage location that was most recently used;
[0103] If the reading is successful, searching the preset position list for the next storage position of the candidate storage position used most recently based on the read position-related information as the target storage position;
[0104] If the reading fails, the operation of detecting each candidate storage position in sequence starting from the first candidate storage position in the preset position list of the board under test is performed.
[0105] Optionally, the device further comprises:
[0106] A first determination module is used to determine the candidate storage location with the longest information storage time if it is detected that each candidate storage location stores test information; the information storage time is the corresponding time length of the test information stored in the candidate storage location;
[0107] The second confirmation module is used to determine the candidate storage location with the longest information storage time as the target storage location.
[0108] Optionally, the first determining module is specifically configured to:
[0109] respectively detecting the test information stored in the candidate storage locations storing the test information;
[0110] If it is detected that the information number of the test information meets the preset number condition, the candidate storage location is determined as the candidate storage location with the longest information storage time.
[0111] Optionally, the test result includes the test result corresponding to each test item; the generating module 203 is specifically used for:
[0112] Determine a next storage location of the target storage location from the candidate storage locations;
[0113] Respectively obtain the test item number of each of the test items and the information number corresponding to the board test operation to obtain the target information number;
[0114] The target test information is generated based on the target information number, the next storage location, the test item number of each of the test items, and the test results corresponding to each of the test items.
[0115] Optionally, the storage module 204 is specifically used for:
[0116] Determine a write mode of the storage device to which the target storage location belongs as a target write mode;
[0117] The target test information is written into the target storage location according to the target writing mode.
[0118] In summary, in the test information processing device provided by the embodiment of the present invention, after the board card under test is subjected to the board card test operation, the test results of each test item corresponding to the board card under test are obtained, and one test item corresponds to a peripheral device of the board card under test. A target storage location is selected from the alternative storage location of the board card under test, and test information corresponding to the board card test operation is generated based on the test result as the target test information; wherein the target test information is used to structure the test results of the test items; the alternative storage location is located in the storage device in the board card under test, indicating an independent storage space for storing the target test information. The target test information is stored in the target storage location for external call acquisition. In this way, by storing the test information corresponding to the board card test operation in the target storage location in the board card under test, a structured record of the test result data is realized, so as to facilitate the tracking of the functional data of the board card. At the same time, by integrating the test information into the board card's own storage, when the subsequent board card is delivered to the developer, the developer can also conveniently obtain the test results, thereby ensuring the efficiency of obtaining the test results.
[0119] Reference Figure 6 , is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 6 As shown, the electronic device includes: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the test information processing method of the above embodiment. The executable instructions can form a program.
[0120] An embodiment of the present invention provides a machine-readable medium having instructions stored thereon, which, when executed by one or more processors, enables the processors to execute the test information processing method of the aforementioned embodiment.
[0121] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0122] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. It should be pointed out that all actions of obtaining signals, information or data in this application are carried out in compliance with the corresponding data protection laws and policies of the country of residence and with the authorization given by the owner of the corresponding device.
[0123] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0124] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a predictable manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0125] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0126] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0127] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0128] The above describes in detail a test information processing method, a test information processing device, an electronic device and one or more readable media provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for processing test information, characterized in that: The method comprises: After performing a board test operation on the board under test, obtaining test results corresponding to each test item in the board under test; one test item corresponds to one peripheral of the board under test; Selecting a target storage location from the candidate storage locations of the board under test, and generating test information corresponding to the board test operation based on the test result as target test information; wherein the target test information is used to structurally represent the test result of the test item; the candidate storage location is located in a storage device in the board under test, representing an independent storage space for storing the target test information; The target test information is stored in the target storage location for external access.
2. The method according to claim 1, characterized in that The step of selecting a target storage location from the candidate storage locations of the board under test comprises: Starting from the first candidate storage position in the preset position list of the board under test, detecting each candidate storage position in turn; the preset position list respectively records the candidate storage positions in the board under test for storing the target test information; If it is detected that the candidate storage location does not store the test information, the candidate storage location is determined as the target storage location.
3. The method according to claim 2, characterized in that The method further comprises: Reading location-related information from a designated storage space to determine the target storage location; the designated storage space is used to store location-related information of the candidate storage location that was most recently used; If the reading is successful, searching the preset position list for the next storage position of the candidate storage position used most recently based on the read position-related information as the target storage position; If the reading fails, an operation of detecting each candidate storage location in sequence is performed starting from the first candidate storage location.
4. The method according to claim 2, characterized in that: The method further comprises: If it is detected that each of the candidate storage locations stores test information, then determining the candidate storage location with the longest information storage time; the information storage time is the corresponding time length of the test information stored in the candidate storage location; The candidate storage location with the longest information storage time is determined as the target storage location.
5. The method according to claim 4, characterized in that The step of determining the candidate storage location with the longest information storage time includes: respectively detecting the test information stored in the candidate storage locations storing the test information; If it is detected that the information number of the test information meets the preset number condition, the candidate storage location is determined as the candidate storage location with the longest information storage time.
6. The method according to any one of claims 1 to 5, characterized in that: The generating, based on the test result, test information corresponding to the board test operation as target test information comprises: Determine a next storage location of the target storage location from the candidate storage locations; Respectively obtain the test item number of each of the test items and the information number corresponding to the board test operation to obtain the target information number; The target test information is generated based on the target information number, the next storage location, the test item number of each of the test items, and the test results corresponding to each of the test items.
7. A test information processing device, characterized in that: The device comprises: An acquisition module, used for acquiring the test results corresponding to the test items in the tested board after performing the board test operation on the tested board; one of the test items corresponds to one peripheral of the tested board; A selection module, used to select a target storage location from the candidate storage locations of the board under test, and a generation module, used to generate test information corresponding to the board test operation based on the test result as target test information; wherein the target test information is used to structure the test result of the test item; the candidate storage location is located in a storage device in the board under test, representing an independent storage space for storing the target test information; The storage module is used to store the target test information in the target storage location for external call acquisition.
8. The device according to claim 7, characterized in that The selection module is specifically used for: Starting from the first candidate storage position in the preset position list of the board under test, detecting each candidate storage position in turn; the preset position list respectively records the candidate storage positions in the board under test for storing the target test information; If it is detected that the candidate storage location does not store the test information, the candidate storage location is determined as the target storage location.
9. An electronic device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store executable instructions, and the executable instructions enable the processor to execute the method according to any one of claims 1 to 6.
10. One or more machine-readable media, characterized in that Instructions are stored thereon, which, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1 to 6.