Touch chip testing method, device, computer equipment and storage medium

CN113760621BActive Publication Date: 2025-02-25SICHUAN ZHONGWEIXINCHENG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111042252.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-07
Publication Date
2025-02-25
Estimated Expiration
2041-09-07

AI Technical Summary

Technical Problem

In the prior art, the parameter testing of touch chips has problems such as low testing accuracy or low testing efficiency, and it is impossible to effectively cover the types of touch parameters and parameter values, resulting in the defective chips being missed.

Method used

By building a target binary tree, selecting two different sets of target touch parameters to perform loop comparison testing on the touch chip, and loop pruning the binary tree according to the results of each comparison test to achieve coverage test of touch parameter types and parameter values.

Benefits of technology

It improves testing efficiency and testing accuracy, solves the problems of low testing accuracy or low testing efficiency in the prior art, and meets the efficient testing needs of touch chips.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113760621B_ABST
    Figure CN113760621B_ABST
Patent Text Reader

Abstract

The present application provides a test method, device, computer equipment and storage medium for a touch chip, the method comprising: obtaining a touch parameter set of a touch chip; constructing a target binary tree according to the touch parameter set; selecting two different sets of target touch parameter combinations from the target binary tree to perform a cyclic comparison test on the touch chip, and cyclically pruning the target binary tree according to the result of each comparison test; the present application implements a coverage test of touch parameter types and parameter values ​​by cyclically performing branch selection tests, improves test efficiency by cyclic pruning, solves the problem of low test accuracy or low test efficiency in the detection method of the touch chip in the prior art, improves test efficiency and test accuracy, and meets test requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of chip testing technology, and in particular to a test method, device, computer equipment and storage medium for a touch chip. Background Art

[0002] At present, the application of capacitive touch buttons in home electronic devices and consumer electronic devices is becoming more and more popular. The core of capacitive touch buttons is capacitive touch chips. In the process of research and development and production of capacitive touch chips, it is necessary to fully test and verify the performance indicators of capacitive touch chips to ensure high-quality product quality. In product testing, scanning test of various touch-related parameters is an indispensable link, which is to ensure that there is no abnormality in touch data on each parameter.

[0003] At present, parameter selection test and full parameter test are generally used in parameter testing of touch chips. Parameter selection test is to select several fixed parameter tests to replace the complete parameter scanning test. However, since the touch chip is not only a very large-scale integrated circuit, but also a mixed circuit of digital signals and analog signals, various parameters are more easily affected by the design and production process. Incomplete parameter testing is very likely to miss defective chips, which will eventually cause adverse effects. Full parameter testing is to conduct full coverage testing on all parameters and parameter combinations in turn. However, due to the huge number of parameters and parameter combinations, the testing time consumed is quite long. At the same time, since chip defects are often caused by defects in only a small number of parameters, there is a huge gap between test problem discovery and test investment.

[0004] It can be seen that the parameter test of the touch chip in the prior art has the problem of low test accuracy or low test efficiency, which does not meet the test requirements. Summary of the invention

[0005] In view of the deficiencies in the related art, the touch chip testing method, device, computer equipment and storage medium provided in the present application solve the problems of low test accuracy or low test efficiency in the touch chip detection method in the prior art, improve the test efficiency and test accuracy, and meet the test requirements.

[0006] In a first aspect, the present application provides a test method for a touch chip, the method comprising: obtaining a touch parameter set of the touch chip; constructing a target binary tree according to the touch parameter set; selecting two different sets of target touch parameter combinations from the target binary tree to perform a cyclic comparison test on the touch chip, and cyclically pruning the target binary tree according to the result of each comparison test.

[0007] Optionally, constructing a target binary tree according to the touch parameter set includes: constructing an ordered multi-branch tree of touch parameters according to the touch parameter set; and converting the ordered multi-branch tree into a binary tree to obtain the target binary tree.

[0008] Optionally, two different groups of target touch parameter combinations are selected from the target binary tree to perform a cyclic comparison test on the touch chip, including: obtaining a current node layer of the current comparison test; obtaining a target touch parameter corresponding to the current node layer according to the target binary tree; selecting two different target condition values ​​from the current node layer, the two target condition values ​​being condition values ​​that match the target touch parameter; combining the target touch parameter, the two target condition values, and the current test touch parameter to form two different groups of target touch parameter combinations; and performing a comparison test on the touch chip according to the two different groups of target touch parameter combinations.

[0009] Optionally, when the two target condition values ​​include a first target condition value and a second target condition value, the target binary tree is cyclically pruned according to the result of each comparative test, including: if the result of the current comparative test is that the test result of the target touch parameter combination where the first target condition value is located is qualified, then pruning the branch where the second target condition value is located in the current node layer.

[0010] Optionally, after constructing the target binary tree according to the touch parameter set, the method also includes: establishing a data storage structure, the data storage structure including a parent node address, data of a current node, a first child node address and a second child node address; assigning a storage address to each node in the target binary tree; and obtaining a target data storage table corresponding to the target binary tree based on the node relationship of the target binary tree and the data storage structure.

[0011] Optionally, two different groups of target touch parameter combinations are selected from the target binary tree to perform a cyclic comparison test on the touch chip, including: obtaining two node data in the current node layer according to the address of the parent node in the target data storage table; combining the two node data with the current test touch parameters to form two different groups of target touch parameter combinations; and performing a comparison test on the touch chip according to the two different groups of target touch parameter combinations.

[0012] Optionally, the current test touch parameter combination is a parameter combination formed by node data combinations in other node layers except the current node layer in the target data storage table.

[0013] In a second aspect, the present application provides a testing device for a touch chip, the device comprising: a touch parameter acquisition module, used to acquire a touch parameter set of the touch chip; a binary tree construction module, used to construct a target binary tree according to the touch parameter set; a comparison test module, used to select two different sets of target touch parameter combinations from the target binary tree to perform a cyclic comparison test on the touch chip, and cyclically prune the target binary tree according to the result of each comparison test.

[0014] In a third aspect, the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: obtaining a touch parameter set of a touch chip; constructing a target binary tree based on the touch parameter set; selecting two different sets of target touch parameter combinations from the target binary tree to perform a cyclic comparison test on the touch chip, and cyclically pruning the target binary tree based on the result of each comparison test.

[0015] In a fourth aspect, the present application provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps: obtaining a touch parameter set of a touch chip; constructing a target binary tree based on the touch parameter set; selecting two different sets of target touch parameter combinations from the target binary tree to perform a cyclic comparison test on the touch chip, and cyclically pruning the target binary tree based on the result of each comparison test.

[0016] Compared with the related art, this application has the following beneficial effects:

[0017] The present application constructs a set of touch parameters for testing a touch chip into a binary tree, performs a cyclic comparison test on the touch chip through the touch parameter combinations on different branches of the binary tree, and cyclically prunes the binary tree according to the result of each comparison test; therefore, the present application implements coverage testing of touch parameter types and parameter values ​​through cyclic branch selection testing, improves test efficiency through cyclic pruning, solves the problem of low test accuracy or low test efficiency in the detection method of the touch chip in the prior art, improves test efficiency and test accuracy, and meets test requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 FIG. 1 is a flow chart of a method for testing a touch chip provided by an exemplary embodiment of the present application;

[0019] Figure 2 The figure shows a schematic diagram of a multi-branch tree structure provided by an exemplary embodiment of the present application;

[0020] Figure 3The figure shows a schematic diagram of a structure of converting a multi-fork tree to a binary tree provided by an exemplary embodiment of the present application;

[0021] Figure 4 An exemplary embodiment of the present application is shown. Figure 1 Schematic diagram of the process of step S103;

[0022] Figure 5-Figure 8 The figure shows a schematic diagram of binary tree branch selection and pruning provided by an exemplary embodiment of the present application;

[0023] Fig. 9 Shown is a schematic diagram of a binary tree and a data storage table provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0025] Figure 1 FIG. 1 is a flow chart of a method for testing a touch chip provided by an exemplary embodiment of the present application. Figure 1 As shown, the test method of the touch chip provided in the present application specifically includes the following steps. It should be noted that within the test allowable range, the following steps can be interchanged with each other, and the order of the steps does not constitute a limitation of the present method:

[0026] Step S101, obtaining a touch parameter set of a touch chip;

[0027] It should be noted that, in the present embodiment, the touch parameter set includes types of touch parameters and conditional values ​​corresponding to each type of touch parameters; common types of touch parameters include internal resistance, filtering, current ratio, LDO, charge and discharge waiting time, frequency dwell time, touch frequency division, counting clock, acquisition times, frequency hopping range, touch clock source, parallel capacitor, touch clock fine-tuning, current source, key detection time, touch interval time, touch mode, etc., and each type of touch parameter corresponds to a number of conditional values, so the types of touch parameters are 17; for example, the conditional values ​​of the internal resistance include open and closed, then the specific values ​​of the conditional values ​​of the internal resistance are 1 (open) and 0 (closed), and the number of conditional values ​​of the internal resistance is 2; for example, the conditional values ​​of the touch frequency division include 1 frequency division, 2 frequency division, 3 frequency division, 4 frequency division, 6 frequency division, 8 frequency division, 12 frequency division, and 16 frequency division, then the specific values ​​of the conditional values ​​of the touch frequency division are 1, 2, 3, 4, 6, 8, 12, 16, and the number of conditional values ​​of the touch frequency division is 8.

[0028] Step S102, constructing a target binary tree according to the touch parameter set;

[0029] In this embodiment, constructing a target binary tree according to the touch parameter set specifically includes: constructing an ordered multi-branch tree of touch parameters according to the touch parameter set; and converting the ordered multi-branch tree into a binary tree to obtain the target binary tree.

[0030] It should be noted that if Figure 2 As shown, according to the basic knowledge of trees, the level of a tree is the height of the tree. The number of branch nodes at each level is the number of forks in the tree. The level of an ordered multi-branch tree: the levels are divided according to the types of touch parameters; if the types of touch parameters are 17, then the level is 17; the number of branch nodes at each level of an ordered multi-branch tree: for example, if the number of conditional values ​​of the internal resistance is 2, then the number of branch nodes at the level of internal resistance is 2; for example, if the number of conditional values ​​of the touch frequency division is 8, then the number of branch nodes at the level of touch frequency division is 8; the level division method of an ordered multi-branch tree: the level with fewer branch nodes is at the upper level, and the level with more branch nodes is at the lower level, for example, the number of branch nodes of the internal resistance (2) is less than the number of branch nodes of the touch frequency division. The number of branch nodes is (8), then the level of the internal resistor should be higher than the level of the touch frequency division. If the total number of levels is N, the level where the internal resistor is located is X (X is between 1 and N), then the level where the touch frequency division is located is Y (Y is between 1 and N, and Y>X). For example: if there are only two levels, then the level of the internal resistor is the first level, and the level of the touch frequency division is the second level; if the number of branch nodes of the two levels is the same, you can specify any one as the upper level and the other as the lower level, or you can choose the one with the least impact on the touch key value to be placed in the upper level based on historical experience;

[0031] In this embodiment, the implementation method of the ordered binary tree includes: establishing an array; the number of elements in the array is the number of levels (types of touch parameters), such as 17; the specific values ​​of the elements in the array are the number of branch nodes in each level, such as Data

[17] ={2,2,2,2,2,4,4,4,4,4,8,8,8,8,8,79,4), which corresponds to the array element N=17; the specific values ​​of the elements in the array are the number of branch nodes in each level (touch parameter), that is, the number of conditional values ​​of each level (touch parameter), for example, the first element is 2, which corresponds to the number of conditional values ​​of the internal resistance: the array element value of 79 corresponds to the number of conditional values ​​of the frequency hopping range of the corresponding level (touch parameter).

[0032] Sort the array elements from small to large, then the order of the array elements after adjustment is each level of the ordered multi-branch tree. Sort from small to large, such as bubble sort. After sorting, Data[N] = {2,2,2,2,2,4,4,4,4,4,4,8,8,8,8,8,79}; according to the needs, you can choose to adjust the number of nodes of the same size, or not; then the position of the array elements in the array after adjustment is the level, which is the order of the tree trunk (trunk) to the branch node (branches) and then to the leaf node (leaves). For example, the level where the internal resistor is located is the first level.

[0033] In this embodiment, each touch test value in the branch node number set of each level is sorted according to the bubble sort method to obtain the branch node number set of each level for preprocessing, wherein the principle of bubble sort is: compare two adjacent elements and exchange the element with the larger value to the right; the sorting idea of ​​the bubble sort method is: compare two adjacent numbers in turn, put the smaller number in front and the larger number in the back, and the specific steps are: (1) The first comparison: first compare the first and second numbers, put the smaller number in front and the larger number in the back. (2) Compare the second and third numbers, put the smaller number in front and the larger number in the back. (3) Continue in this way until the last two numbers are compared, put the smaller number in front and the larger number in the back, and repeat the steps until all sorting is completed; (4) After the above comparison is completed, the last number must be the largest number in the array, so when comparing the second round, the last number does not participate in the comparison. (5) After the second round of comparison is completed, the second to last number must also be the second to last largest number in the array, so in the third round of comparison, the last two numbers do not participate in the comparison. (6) And so on, the number of comparisons in each round decreases. Use bubble sort to sort the data queue, in order of the smallest one at the front, that is, bubble up. If there are N data Data, Data[0]~Data[N-1] in the N-1 round sorting of the algorithm, for a single comparison, such as Data[n+1]>Data[n], then Data[n+1] and Data[n] are swapped, and the array element numbers n+1 and n are also swapped at the same time, where 1≤n≤N-1, and at most (n*(n-1)) / 2 comparisons are required, and the bubble sort is completed.

[0034] It should be further explained that for a multi-branch tree with a certain number of levels and branch nodes, considering that the number of branch nodes is greater than two, data storage and data calculation will become more complicated, and it needs to be converted into a binary tree, that is, the maximum degree of each node is 2, and finally a full binary tree is formed, that is, except for the leaf nodes (leaves) of the largest level, the branch nodes (branches) of each level above are 2. This can simplify data storage and data calculation, and ideally, it can play a dichotomy effect and achieve a 50% pruning rate when selecting paths.

[0035] For a fork with more than 2 branch nodes (branches), assume that its fork N = 8: (1) Each node represents a fork (the number of conditional values ​​of touch parameters) range; (2) The node range is [0, N-1], where N is the original value of the fork (the number of conditional values ​​of touch parameters) and N is a natural number; (3) The fork ranges represented by the left and right child nodes are [1, (1+N) / 2] and [1+(1+N) / 2, N] respectively, where N is a natural number; (4) For each branch node (branch), the tree level increases by 1; (5) If the fork range represented by a node is 1, that is, m == n, then the node no longer has child nodes and is a leaf node (leaf);

[0036] For example, the specific values ​​of the conditional values ​​of the touch frequency division when the branch nodes (branches) are greater than 2 are 1, 2, 3, 4, 6, 8, 12, 16, and the number of its branch nodes (branches) is 8. Node arrangement order: the arrangement order of the left tree and the right tree; the arrangement of the left tree and the right tree must be performed for each level; for any level of branch nodes (branches), each node represents a fork (the number of conditional values ​​of the touch parameter) range: establish an array of branch nodes (branches) at this level: the number of elements in the array is the number of branch nodes (branches) at this level (the number of conditional values ​​corresponding to each type of touch parameter), for example, 8, which means the number of conditional values ​​of the touch frequency division is 8; the specific values ​​of the elements of the array are the specific values ​​of each node, for example, Data[N] = {16, 12, 8, 6, 4, 3, 2, 1}, the specific values ​​of the conditional values ​​of the touch frequency division are 16 frequency division, 12 frequency division, 8 frequency division, 6 frequency division, 4 frequency division, 3 frequency division, 2 frequency division, 1 frequency division.

[0037] Sort the array elements from small to large: for example, bubble sort; the order of each branch node (branch) is Data[N]={1,2,3,4,6,8,12,16}; the fork ranges represented by the left and right child nodes are [1,(1+N) / 2] and [1+(1+N) / 2,N], respectively. Fork: the nodes included in the left fork are [1,(1+N) / 2], that is, [1,(1+8) / 2]=[1,4], Data left [ 4]={1,2,3,4}, the nodes included in the right fork are [1+(1+N) / 2,N, which is [(1+8) / 2,8]=[5,8], Data right [4]={6,8,12,16}; the tree level is increased by 1 at this time; for the left fork, N=4 at this time. Fork again, the fork ranges represented by the left and right child nodes are [1,(1+N) / 2] and [1+(1+N) / 2,N] respectively. Fork: The nodes included in the left fork are That is [1,(1+N) / 2], that is [1,(1+4) / 2]=[1,2], Data left left [2]={1,2}, the nodes included in the left and right forks are [1+(1+N) / 2,N, that is [(1+4) / 2,4]=[3,4], Data left and right [2]={3,4}; the tree level is increased by 1 at this time; for the left left fork, N=2 at this time. Fork again, the fork ranges represented by the left and right child nodes are [1,(1+ N) / 2] and [1+(1+N) / 2,N], bifurcation: the node contained in the left-left-left bifurcation is [1,(1+2) / 2], that is, [1,(1+2) / 2]=[1], Data left-left-left[1]={1}, the node contained in the left-left-right bifurcation is [1+(1+N) / 2,N, that is, [(1+4) / 2,4]=[3,4], Data left-left-left[1]={2}; the tree level is increased by 1 at this time; and so on: the final binary tree is as follows Figure 3 shown.

[0038] Step S103, selecting two different groups of target touch parameter combinations from the target binary tree to perform a cyclic comparison test on the touch chip;

[0039] Step S104, performing cyclic pruning on the target binary tree according to the result of each comparison test.

[0040] Compared with the related art, this application has the following beneficial effects:

[0041] The present application constructs a set of touch parameters for testing a touch chip into a binary tree, performs a cyclic comparison test on the touch chip through the touch parameter combinations on different branches of the binary tree, and cyclically prunes the binary tree according to the result of each comparison test; therefore, the present application implements coverage testing of touch parameter types and parameter values ​​through cyclic branch selection testing, improves test efficiency through cyclic pruning, solves the problem of low test accuracy or low test efficiency in the detection method of the touch chip in the prior art, improves test efficiency and test accuracy, and meets test requirements.

[0042] In one embodiment of the present application, Figure 4 As shown, step S103, selecting two different groups of target touch parameter combinations from the target binary tree to perform a cyclic comparison test on the touch chip specifically includes:

[0043] Step S201, obtaining the current node layer of the current comparison test;

[0044] Step S202, obtaining target touch parameters corresponding to the current node layer according to the target binary tree;

[0045] Step S203, selecting two different target condition values ​​from the current node layer, the two target condition values ​​being condition values ​​that match the target touch parameter;

[0046] Step S204, combining the target touch parameter, the two target condition values, and the current test touch parameter to form two different groups of target touch parameter combinations;

[0047] Step S205, performing a comparative test on the touch chip according to the two different sets of target touch parameter combinations;

[0048] Step S206, pruning the target binary tree according to the result of the current comparison test, and continuing to execute step S201.

[0049] Furthermore, when the two target condition values ​​include a first target condition value and a second target condition value, the target binary tree is cyclically pruned according to the result of each comparative test, including: if the result of the current comparative test is that the test result of the target touch parameter combination where the first target condition value is located is qualified, then pruning the branch where the second target condition value is located in the current node layer.

[0050] It should be noted that the current test touch parameter combination is a parameter combination formed by node data combinations in other node layers except the current node layer in the target data storage table.

[0051] In this embodiment, performing loop testing and loop pruning on the target binary tree mainly includes the following steps:

[0052] (1) Selection of branches corresponding to the first layer of trunks to the Nth layer of leaves

[0053] like Figure 5 As shown, in order to weaken the judgment of the influence of different touch parameters on the touch value, the first time: starting from the trunk of the first layer of tree, two branches L1 and L2 are selected; the branches of the second layer of tree are different; from the third layer to the end of the Nth layer of leaves, two branches with exactly the same direction are selected, such as the leftmost branch; in this way, the touch parameter values ​​corresponding to each node of these two branches are all the same except for the second level; that is, by fixing the direction of the branches from the third layer to the end of the Nth layer of leaves, the influence of the 1st and 2nd level touch parameters on the touch value can be judged;

[0054] (2) Touch detection and judgment

[0055] Take all the touch parameter values ​​of each layer on any selected branch (from the first level to the Nth level from the trunk to the leaves) and write them into the touch module, start touch detection, wait for the touch detection to be completed, and obtain the touch original value; then take all the touch parameter values ​​of each layer on another selected branch (from the first level to the Nth level from the trunk to the leaves) and write them into the touch module, start touch detection, wait for the touch detection to be completed, and obtain the touch original value; observe the different effects of the two branches on the touch original value: assuming that the allowable jitter range error of the touch original value of the touch chip is 10, then if the parameter combination corresponding to a branch makes the allowable jitter range of the touch original value exceed 10, the corresponding touch original value of the branch is worse; generally, the jitter range calculation method of the touch original value is to collect N touch original values, obtain the maximum value and the minimum value in the N times, and use the maximum value minus the minimum value to obtain the jitter range of the touch original value; N can be set by the user setting module, such as 100.

[0056] (3) Branch cutting

[0057] According to the needs, you can select the worse branches and cut off the better branches to understand the impact of the worse parameter combination in the touch chip on the original touch value; or select the better branches and cut off the better branches to understand the impact of the better parameter combination in the touch chip on the original touch value; or both methods can be used to traverse one side. However, no matter which method is used, different degrees of branch cutting are performed during the traversal process, so the test efficiency is greatly improved. As shown in the figure, if branch L2 is cut off, branch L1 is retained.

[0058] (4) Selection of branches corresponding to leaves from the 2nd to the Nth layer

[0059] After the above pruning, a branch point of the second layer, namely branch L1, is retained. Continue to select the next branch, such as L3 and L4; the branches of the selected third layer tree are different; from the third layer to the end of the Nth layer of leaves, two branches with exactly the same direction are selected, such as the leftmost branch; in this way, the touch parameter values ​​corresponding to each node of these two branches are all the same except for the second level; that is, the direction of the branch from the fourth layer to the end of the Nth layer of leaves is fixed, and the influence of the 1st, 2nd, and 3rd level touch parameters on the touch value can be judged; it should be noted that if the left branch was selected last time, then the right branch, such as L3 and L4, is selected this time, which is equivalent to traversing the touch parameters on the right in addition to judging the influence of the touch parameters of this layer (the third layer) on the original touch value, instead of traversing the left tree again.

[0060] (5) Touch detection and judgment

[0061] All touch parameter values ​​of each layer (from the first level to the Nth level) on any selected branch are written into the touch module, touch detection is started, and the touch detection is waited for completion to obtain the original touch value;

[0062] Then take all the touch parameter values ​​of each layer on another selected branch (from the first level to the Nth level from the trunk to the leaves) and write them into the touch module, start the touch detection, wait for the touch detection to be completed, and obtain the original touch value;

[0063] Observe the different effects of the two branches on the touch original value: Assuming that the allowable jitter range error of the touch original value of the touch chip is 10, then if the parameter combination corresponding to a branch makes the allowable jitter range of the touch original value exceed 10, the corresponding touch original value of the branch will be worse; generally, the jitter range calculation method of the touch original value is to collect N touch original values, obtain the maximum value and the minimum value among the N times, and use the maximum value minus the minimum value to get the jitter range of the touch original value; N can be set by the user setting module, such as 100.

[0064] (6) Branch cutting

[0065] According to the needs, you can select the worse branches and cut off the better branches to understand the impact of the worse parameter combination in the touch chip on the original touch value; or select the better branches and cut off the better branches to understand the impact of the better parameter combination in the touch chip on the original touch value; or traverse both ways. However, no matter which way, different degrees of branch cutting are carried out during the traversal process, so the test efficiency is greatly improved. As shown in the figure, cut off branches L3 or L4.

[0066] (7) Repeat the above steps until the Nth layer of leaves is reached.

[0067] For example, Figure 6-Figure 8 , taking the internal resistance 2 branch points and the touch frequency division 8 branch points as examples, the complete pruning process is given. Among them, the internal resistance layer may have a previous layer, and the touch frequency division layer may also have a next layer. The specific steps are as follows:

[0068] ① Select the left branches L11 and L12-->Touch detection and judgment-->Branch cutting: cut off the right branch L12;

[0069] ② Select the right branches L13 and L14-->Touch detection and judgment-->Branch cutting: cut off the left branch L13;

[0070] ③Select the left branches L15 and L16-->Touch detection and judgment-->Branch cutting: cut off the right branch L16;

[0071] ④Select the right branches L17 and L18-->Touch detection and judgment-->Branch cutting: cut off the right branch L18;

[0072] ⑤ On the retained branch L17, continue to select branches L19 and L20 according to the above method, and so on.

[0073] In another embodiment of the present application, after constructing the target binary tree according to the touch parameter set, the method also includes: establishing a data storage structure, the data storage structure including a parent node address, data of a current node, a first child node address and a second child node address; assigning a storage address to each node in the target binary tree; and obtaining a target data storage table corresponding to the target binary tree based on the node relationship of the target binary tree and the data storage structure.

[0074] Furthermore, two different groups of target touch parameter combinations are selected from the target binary tree to perform a cyclic comparison test on the touch chip, including: obtaining two node data in the current node layer according to the address of the parent node in the target data storage table; combining the two node data with the current test touch parameters to form two different groups of target touch parameter combinations; and performing a comparison test on the touch chip according to the two different groups of target touch parameter combinations.

[0075] It should be noted that this embodiment converts the target binary tree into a data storage structure to obtain a target data storage table, and then retrieves and modifies the target table storage table to achieve the purpose of loop pruning. Fig. 9As shown, assuming that the touch frequency division is a complete binary tree, the 0th layer is the trunk of the touch frequency division tree, and there is no upper trunk. The information of the node is stored in the storage space of 0x12, 0x13, 0x14, and 0x15: the 0x12 address stores the parent pointer information, NULL, indicating that the node has no upper trunk and the node is the trunk; the 0x13 address stores the data information of the node, 0, indicating that the node data is 0; the 0x14 address stores the left pointer information, 0x90, indicating that the storage address of the next level left node information of the node is 0x93; the 0x15 address stores the right pointer information, 0x52, indicating that the storage address of the next level right node information of the node is 0x52.

[0076] The next level of the trunk is the information of the left node of the first layer. The information of this node is stored in the storage space of 0x93, 0x94, 0x95, and 0x96. The address 0x93 stores the parent pointer information, 0x12, indicating that the storage address of the parent node information of the previous level of the node is 0x12; the address 0x94 stores the data information of the node, 4, indicating that the node data is 4. Combined with the touch frequency division, the specific meaning is touch frequency division 1 to 4 frequency division; the address 0x95 stores the left pointer information, 0x89, indicating that the storage address of the next level left node information of the node is 0x89; the address 0x96 stores the right pointer information, 0x99, indicating that the storage address of the next level right node information of the node is 0x99.

[0077] The next level of the first layer is the information of the left-left node of the second layer. The information of this node is stored in the storage space of 0x89, 0x90, 0x91, and 0x92. The address 0x89 stores the parent pointer information, 0x93, indicating that the storage address of the parent node information of the previous level of the node is 0x93; the address 0x90 stores the data information of the node, 2, indicating that the node data is 2. Combined with the touch frequency division, the specific meaning is touch frequency division 1 to 2 frequency division; the address 0x91 stores the left pointer information, 0x81, indicating that the storage address of the next level left node information of the node is 0x81; the address 0x92 stores the right pointer information, 0xB1, indicating that the storage address of the next level right node information of the node is 0xB1.

[0078] The next level of the second layer is the information of the left-left-left node of the third layer. The information of this node is stored in the storage space of 0x81, 0x82, 0x83, and 0x84. The address 0x81 stores the parent pointer information, 0x89, indicating that the storage address of the parent node information of the previous level of this node is 0x89; the address 0x82 stores the data information of this node, 1, indicating that the data of this node is 1. Combined with the touch frequency division, the specific meaning is touch frequency division 1 frequency division; the address 0x83 stores the left pointer information, NULL, indicating that this node has no next-level left node information, and this node is a leaf; the address 0x84 stores the right pointer information, NULL, indicating that this node has no next-level right node information, and this node is a leaf.

[0079] In another embodiment of the present application, a chain data structure is adopted, including a data field of a node, a pointer field pointing to a parent node, a pointer field pointing to a left child node, and a pointer field pointing to a right child node. Compared with an array, a linked list has a pointer field added to the data field to construct chain storage data. Each node in the linked list contains the data of this node and a pointer pointing to the previous node and the next node address. Since the next data element is searched and accessed through a pointer, the freedom of the linked list is higher. This is reflected in that when adding and deleting a node, only the pointer address of the previous node needs to be modified without changing other nodes. At the same time, since pointers are used to point to upper and lower nodes, discontinuous storage space can be used, that is, storage is more flexible.

[0080] It includes a node data field, a pointer field pointing to the parent node, a pointer field pointing to the left child node, and a pointer field pointing to the right child node. The pointer field of the parent node is the storage address of the upper node of the tree data structure, and the pointer field of the left child node and the pointer field pointing to the right child node are the storage address of the left child node and the storage address of the right child node of the lower node of the tree data structure.

[0081] Specifically, the adjacent array pointer refers to the link pointer between the leaf nodes of the tree structure. Since the specific values ​​of the corresponding touch parameters in the leaf node array in the A tree structure are arranged in ascending order, after linking the leaf nodes in the A tree structure, range query and traversal can be performed.

[0082] The specific steps include: obtaining the hierarchical relationship of the tree and the number of branches of each tree layer; the levels in the tree structure correspond to the number of array elements, and the number of branches of each tree layer corresponds to the subscript of the array at this level, and the hierarchical relationship of the tree and the number of branches of each tree layer are mapped into a link represented by the combination of the array and the tree structure to establish a tree data structure; according to the link formed by the stored data, the memory address of the stored data is stored in the leaf node of the tree data structure; the leaf nodes of the tree data structure are sequentially linked.

[0083] The array tree data storage method uses the hierarchical relationship of the tree and the number of branches in each layer of the tree to map it into an array tree storage link that combines the array and the tree structure to form a data storage method that is easy to retrieve data. In the array tree data storage method, each node is an array, and each array occupies 4 bytes. In the algorithm, each tree node defines at least three pointers and one data. Therefore, the array tree data storage method index is smaller than the memory space occupied by the conventional tree index.

[0084] The hierarchical relationship of the tree and the number of branches of each layer of the tree are converted into different links in the tree structure, and the memory address (or data set index) of the data is stored at the end of the link, where each tree node corresponds to an array. When searching, the corresponding data address is quickly found through the tree link according to the hierarchical relationship of the tree and the number of branches of each layer of the tree, thereby realizing efficient data retrieval. The present invention is an algorithm that combines arrays and tree structures to realize fast data search, namely: array tree algorithm.

[0085] Nodes (arrays) in a tree structure: Each pointer points to the next level (secondary) array (node), thus forming a linked list tree structure.

[0086] Starting from the current leaf node, according to the link record, continuously search for a left secondary array pointer pointing to a left adjacent leaf node and a right secondary array pointer pointing to a right adjacent leaf node in the structure array of the parent node of the current leaf node;

[0087] Determine whether the left secondary array pointer and the right secondary array pointer are valid;

[0088] If not, return to the previous step and continue searching in the structure array of the parent node of the current leaf node;

[0089] If so, then according to the found left secondary array pointer and link record, continuously search for the left adjacent leaf node in the secondary node array of the left secondary array pointer, and according to the found right secondary array pointer and link record, continuously search for the right adjacent leaf node in the secondary node array of the right secondary array pointer;

[0090] Perform left linking and right linking of the current leaf node; the left link is to write the array pointer of the current leaf node into the array head of the left adjacent leaf node of the current leaf node; the right link is to write the array pointer of the right adjacent leaf node of the current leaf node into the array head of the current leaf node.

[0091] Specifically, after the array tree link of a data is created, the leaf node (array tree end array) will be linked, that is, adjacent leaf nodes will be linked from one direction.

[0092] Specifically, according to the hierarchical relationship of the tree and the number of branches of each layer of the tree, a tree array is obtained. In this algorithm, the memory space occupied by the index is about 1 / 3 of the memory space occupied by the index in the conventional algorithm. The retrieval efficiency of this algorithm is much better than that of the binary algorithm (8 to 10 times more efficient). The data address only exists in the leaf node array, and the logical operations of non-leaf nodes are all implemented in the memory, so the reading operation can be greatly reduced and the retrieval efficiency can be improved. In the tree structure of this algorithm, non-leaf nodes are one-way sequential links, so it is convenient to implement functions such as range search, data traversal, and data paging. More specifically, when the array pointer is retrieved to be empty or the current array length is less than the specified length, it will be considered that it has not been retrieved and a null value will be returned. If the last digit is retrieved and the pointer in the array is not empty, the pointer is returned, that is, the memory address of the data (or data set number). This technical solution only provides a basic description and demonstration of the basic data structure and function. In practical applications, it can be optimized and improved as needed.

[0093] In one embodiment, the present application provides a testing device for a touch chip, the device comprising: a touch parameter acquisition module, used to acquire a touch parameter set of the touch chip; a binary tree construction module, used to construct a target binary tree according to the touch parameter set; a comparison test module, used to select two different sets of target touch parameter combinations from the target binary tree to perform a cyclic comparison test on the touch chip, and cyclically prune the target binary tree according to the result of each comparison test.

[0094] In one embodiment, the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: obtaining a touch parameter set of a touch chip; constructing a target binary tree according to the touch parameter set; selecting two different sets of target touch parameter combinations from the target binary tree to perform a cyclic comparison test on the touch chip, and cyclically pruning the target binary tree according to the result of each comparison test.

[0095] In one embodiment, the present application provides a readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining a touch parameter set of a touch chip; constructing a target binary tree according to the touch parameter set; selecting two different sets of target touch parameter combinations from the target binary tree to perform a cyclic comparison test on the touch chip, and cyclically pruning the target binary tree according to the result of each comparison test. .

[0096] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0097] It should be noted that, in this article, relational terms such as "first" and "second" 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 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 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 device including the elements.

Claims

1. A method for testing a touch chip, characterized in that: The method comprises: Get the touch parameter set of the touch chip; constructing a target binary tree according to the touch parameter set; Select two different groups of target touch parameter combinations from the target binary tree to perform a cyclic comparison test on the touch chip, and cyclically prune the target binary tree according to the result of each comparison test; Wherein, selecting two different groups of target touch parameter combinations from the target binary tree to perform a cyclic comparison test on the touch chip includes: Get the current node layer of the current comparison test; According to the target binary tree, obtaining target touch parameters corresponding to the current node layer; Selecting two different target condition values ​​from the current node layer, the two target condition values ​​being condition values ​​that match the target touch parameter; Combining the target touch parameter, the two target condition values, and the current test touch parameter to form two different groups of target touch parameter combinations; Performing a comparative test on the touch chip according to the two different sets of target touch parameter combinations; When the two target condition values ​​include a first target condition value and a second target condition value, cyclically pruning the target binary tree according to the result of each comparison test includes: If the result of the current comparison test is that the test result of the target touch parameter combination where the first target condition value is located is qualified, then the branch where the second target condition value is located in the current node layer is cut off.

2. The touch chip testing method according to claim 1, characterized in that: Constructing a target binary tree according to the touch parameter set includes: Constructing a touch parameter ordered multi-branch tree according to the touch parameter set; The ordered multi-fork tree is converted into a binary tree to obtain the target binary tree.

3. The touch chip testing method according to claim 1, characterized in that: After constructing the target binary tree according to the touch parameter set, the method further includes: Establishing a data storage structure, the data storage structure including a parent node address, data of a current node, a first child node address, and a second child node address; Allocating a storage address to each node in the target binary tree; According to the node relationship of the target binary tree and the data storage structure, a target data storage table corresponding to the target binary tree is obtained.

4. The touch chip testing method according to claim 3, characterized in that: Selecting two different sets of target touch parameter combinations from the target binary tree to perform a cyclic comparison test on the touch chip includes: According to the address of the parent node in the target data storage table, obtain two node data in the current node layer; Combining the two node data with the current test touch parameter to form two different sets of target touch parameter combinations; A comparative test is performed on the touch chip according to the two different sets of target touch parameter combinations.

5. The method for testing a touch chip according to claim 4, characterized in that: The current test touch parameter combination is a parameter combination formed by node data combinations in other node layers except the current node layer in the target data storage table.

6. A touch chip testing device, characterized in that: The device comprises: A touch parameter acquisition module, used to acquire a touch parameter set of a touch chip; A binary tree construction module, used to construct a target binary tree according to the touch parameter set; A comparison test module, used for selecting two different groups of target touch parameter combinations from the target binary tree to perform a cyclic comparison test on the touch chip, and cyclically pruning the target binary tree according to the result of each comparison test; Wherein, selecting two different groups of target touch parameter combinations from the target binary tree to perform a cyclic comparison test on the touch chip includes: Get the current node layer of the current comparison test; According to the target binary tree, obtaining target touch parameters corresponding to the current node layer; Selecting two different target condition values ​​from the current node layer, the two target condition values ​​being condition values ​​that match the target touch parameter; Combining the target touch parameter, the two target condition values, and the current test touch parameter to form two different groups of target touch parameter combinations; Performing a comparative test on the touch chip according to the two different sets of target touch parameter combinations; When the two target condition values ​​include a first target condition value and a second target condition value, cyclically pruning the target binary tree according to the result of each comparison test includes: If the result of the current comparison test is that the test result of the target touch parameter combination where the first target condition value is located is qualified, then the branch where the second target condition value is located in the current node layer is cut off.

7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Test method and device for command line interface

    CN101471826A

  • Automobile buzzing alarm priority test method based on binary tree

    CN105788198A