Image testing method, device, computer equipment and storage medium
By using multi-process parallel processing technology in image testing, tasks are allocated according to the number of task accents and the number of processes, the problem of traditional image testing is solved and the testing efficiency is significantly improved.
Patent Information
- Application Number
- CN202010578297.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-23
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2040-06-23
AI Technical Summary
Traditional image testing methods are inefficient in execution and require the unlocking test process of a large number of fingerprint images to be performed one by one.
By obtaining the task sizes of the benchmark test drawing and task drawing, run the target number of target processes according to the number of task drawing drawing and the maximum number of processes allowed to run, and use each task drawing as a wait according to the preset allocation strategy. The test task is assigned to the corresponding target process to perform the running diagram operation.
It realizes that multiple processes process multiple tasks to be tested in parallel when allowed by computer equipment, greatly improving the efficiency of image testing.
Smart Images

Figure CN111914238B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an image testing method, apparatus, computer equipment and storage medium. Background Art
[0002] With the rapid development of artificial intelligence, fingerprint unlocking has been increasingly widely used in people's work and life, such as smart locks, smartphones and other devices with biometric functions.
[0003] Taking smartphones as an example, in order to make the fingerprint unlocking of smartphones smoother, a large number of image running operations need to be performed on this function during the factory design process to ensure normal use in the future. The running operation usually requires executing the unlocking test process one by one on a large number of fingerprint images to be tested, and then recording the unlocking results as the test results.
[0004] However, traditional image testing has low execution efficiency. Summary of the invention
[0005] Based on this, it is necessary to provide an efficient image testing method, device, computer equipment and storage medium to address the above technical problems.
[0006] An image testing method, the method comprising:
[0007] Acquire at least one benchmark test atlas; wherein each of the benchmark test atlases includes a plurality of task atlases, and each task atlas includes a plurality of base library fingerprint maps and / or a plurality of unlocking fingerprint maps;
[0008] Obtaining the task size of each of the task atlases; wherein the task size is used to represent the total number of base library fingerprint images and unlocking fingerprint images in the task atlas;
[0009] Running a target number of target processes according to the number of task graphs and the maximum number of processes allowed to run;
[0010] According to the task size of each of the task atlases, each of the task atlases is assigned to the corresponding target process as a task to be tested according to a preset allocation strategy and a running operation is performed to obtain a test record; wherein the running operation includes an entry operation for multiple base library fingerprint images and / or an unlocking operation for multiple unlocking fingerprint images.
[0011] In one embodiment, running a target number of target processes according to the number of task atlases and the maximum number of processes allowed to run includes:
[0012] If the number of the task atlas is greater than or equal to the maximum number of processes, the maximum number of processes is used as the target number, and the target number of target processes is run;
[0013] If the number of task atlases is less than or equal to the maximum number of processes, the number of task atlases is used as the target number, and the target number of target processes is run.
[0014] In one embodiment, according to the task size of each task atlas, each task atlas is assigned as a task to be tested to a corresponding target process according to a preset allocation strategy and a running operation is performed, including:
[0015] Initialize the task atlas in the target process to be empty;
[0016] Determining an average task amount of each target process according to the task size of each of the task atlases and the target quantity;
[0017] Arrange the task atlases according to the corresponding task sizes to obtain a list of atlases to be tested;
[0018] The task atlas is used as the task to be tested, and according to the task size and average task amount of each task to be tested, they are allocated one by one in the order of the atlas list to obtain the target task to be tested that each target process needs to run;
[0019] Run each of the target processes and execute the graph running operations on the target tasks to be tested in sequence.
[0020] In one of the embodiments, the task atlas is used as the task to be tested, and according to the task size and average task amount of each task to be tested, the task to be tested is allocated one by one in the order of the atlas list to obtain the target task to be tested that each target process needs to run, including:
[0021] Obtaining a task to be tested in sequence as the current task to be tested according to the order of the atlas list to be tested, and obtaining a target process in sequence as the current target process;
[0022] Determine whether the current target process is empty for the current task to be tested;
[0023] If yes, the current task to be tested is assigned to the current target process as a target task to be tested of the current target process;
[0024] If not, when the total task sizes of the existing tasks to be tested and the current task to be tested in the target process is less than the average task size, the current task to be tested is assigned to the queue of the current target process as a target task to be tested of the current target process; and when the total task sizes are greater than or equal to the average task size, the next target process is used as the new current target process, and the step of determining whether the current target process is empty for the current task to be tested is returned to execute.
[0025] In one embodiment, the method further comprises:
[0026] If the sum of the task sizes of the existing tasks to be tested and the current task to be tested in each target process is greater than or equal to the average task size, the current task to be tested is allocated to the target process corresponding to the smallest task sum.
[0027] In one embodiment, the running operation includes:
[0028] Performing an entry operation of the base database fingerprint map on the sub-node map set whose node name contains the base database identifier in the task to be tested;
[0029] An unlocking operation of the unlocking fingerprint graph is performed on the sub-node graph set whose node name in the task to be tested does not contain the base library identifier.
[0030] In one of the embodiments, the benchmark test set includes at least one of a FRR test set, a FAR test set and a cross test set.
[0031] In one embodiment, the structure of the benchmark test atlas includes: a first-level benchmark node, a second-level benchmark node, a second-level task node and a third-level task node; wherein the second-level benchmark node includes at least one calibration shading benchmark map, the third-level task node is a node one level below the second-level task node, and the third-level task node includes a base node and an unlocking node.
[0032] An image testing device, comprising:
[0033] An acquisition module is used to acquire the task size of at least one benchmark test atlas and each task atlas; wherein each benchmark test atlas includes multiple task atlases, each task atlas includes multiple base library fingerprint maps and / or multiple unlocking fingerprint maps, and the task size is used to characterize the total number of base library fingerprint maps and unlocking fingerprint maps in the task atlas;
[0034] A determination module, configured to run a target number of target processes according to the number of task atlases and a maximum number of processes allowed to run;
[0035] A processing module is used to allocate each of the task atlases as a task to be tested to the corresponding target process according to a preset allocation strategy based on the task size of each task atlas and perform a running operation to obtain a test record; wherein the running operation includes an entry operation for multiple base library fingerprint images and / or an unlocking operation for multiple unlocking fingerprint images.
[0036] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0037] Acquire at least one benchmark test atlas; wherein each of the benchmark test atlases includes a plurality of task atlases, and each task atlas includes a plurality of base library fingerprint maps and / or a plurality of unlocking fingerprint maps;
[0038] Obtaining the task size of each of the task atlases; wherein the task size is used to represent the total number of base library fingerprint images and unlocking fingerprint images in the task atlas;
[0039] Running a target number of target processes according to the number of task graphs and the maximum number of processes allowed to run;
[0040] According to the task size of each of the task atlases, each of the task atlases is assigned to the corresponding target process as a task to be tested according to a preset allocation strategy and a running operation is performed to obtain a test record; wherein the running operation includes an entry operation for multiple base library fingerprint images and / or an unlocking operation for multiple unlocking fingerprint images.
[0041] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0042] Acquire at least one benchmark test atlas; wherein each of the benchmark test atlases includes a plurality of task atlases, and each task atlas includes a plurality of base library fingerprint maps and / or a plurality of unlocking fingerprint maps;
[0043] Obtaining the task size of each of the task atlases; wherein the task size is used to represent the total number of base library fingerprint images and unlocking fingerprint images in the task atlas;
[0044] Running a target number of target processes according to the number of task graphs and the maximum number of processes allowed to run;
[0045] According to the task size of each of the task atlases, each of the task atlases is assigned to the corresponding target process as a task to be tested according to a preset allocation strategy and a running operation is performed to obtain a test record; wherein the running operation includes an entry operation for multiple base library fingerprint images and / or an unlocking operation for multiple unlocking fingerprint images.
[0046] The above-mentioned image testing method, device, computer equipment and storage medium obtain at least one benchmark test atlas through a computer device, and obtain the task size of each task atlas, and then run the target number of target processes according to the number of task atlases and the maximum number of processes allowed to run, and according to the task size of each task atlas, each task atlas is assigned to the corresponding target process as a task to be tested according to a preset allocation strategy and executes the running operation to obtain a test record. Compared with the traditional way of running the atlas one by one, the method provided in this embodiment, since each task atlas includes multiple base library fingerprint maps and / or multiple unlocking fingerprint maps, by assigning each task atlas as a test task to the target number of target processes according to a preset allocation strategy according to the task size of each task atlas, it is achieved that when the computer device allows, multiple processes can process multiple tasks to be tested in parallel, which can greatly improve the iteration efficiency of the algorithm, thereby greatly improving the efficiency of image testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 is an internal structure diagram of a computer device in one embodiment;
[0048] Figure 2 is a schematic flow chart of an image testing method in one embodiment;
[0049] Figure 3 is a schematic flow chart of an image testing method in one embodiment;
[0050] Figure 4 A schematic diagram of the allocation of tasks to be tested in another embodiment;
[0051] Figure 5 A schematic diagram of a fingerprint image entry process and an unlocking process of a base library in one embodiment;
[0052] Figure 6 FIG. 4 is a structural block diagram of an image testing device in an embodiment. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0054] The image testing method provided in this application can be applied to Figure 1 The computer device shown in the figure may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 1As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an image testing method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0055] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0056] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0057] It should be noted that the execution subject of the following method embodiment may be an image testing device, which may be implemented as part or all of the above-mentioned computer device through software, hardware or a combination of software and hardware. The following method embodiment is described by taking the execution subject as a computer device as an example.
[0058] Figure 2 FIG. 1 is a flow chart of an image testing method provided in an embodiment. This embodiment involves a specific process. Figure 2 As shown, including:
[0059] S11. Obtain at least one benchmark test atlas; wherein each benchmark test atlas includes multiple task atlases, and each task atlas includes multiple base library fingerprint maps and / or multiple unlocking fingerprint maps.
[0060] Specifically, the computer device obtains one or more benchmark test atlases, optionally, it can be downloaded from a dedicated server, such as a server storing benchmark, or it can be read from the local storage of the computer device. The benchmark test atlas that needs to be unlocked is not limited to this embodiment. It should be noted that each benchmark test atlas includes multiple task atlases, and each task atlas can generate a task to be tested that needs to be tested. Among them, each task atlas includes multiple base library fingerprint maps, and can also include multiple unlocking fingerprint maps. Optionally, the fingerprint maps in each task atlas can be hierarchical structure settings, such as tree structure storage, that is, multiple base library fingerprint maps and multiple unlocking fingerprint maps are classified and hierarchically saved in different folders, which is conducive to the storage and call of base library fingerprint maps and unlocking fingerprint maps. This hierarchical structured setting method realizes the flexible organization of tasks and further improves the processing efficiency of fingerprint maps. For example, the task atlas can be divided into two folder settings, a base library folder and an unlocking folder, and multiple base library fingerprint maps are stored in the base library folder, and multiple unlocking fingerprint maps are stored in the unlocking folder.
[0061] S12, obtaining the task size of each task atlas, wherein the task size is used to represent the total number of base fingerprint images and unlocking fingerprint images in the task atlas.
[0062] Specifically, the computer device can count the number of images in each task atlas, and obtain the task size of each task atlas according to the size of a single image and the number of images. The above task size is used to represent the sum of the number of base fingerprint images and the number of unlocking fingerprint images in the task atlas.
[0063] S13. Run a target number of target processes according to the number of task atlases and the maximum number of processes allowed to run.
[0064] Specifically, the computer device can obtain the maximum number of processes currently allowed to run by the device, which can be determined based on the computing processing capability of the device or the amount of processing resources that the device can allocate to the current task. The computer device can treat the processing operation of a task atlas as a task to be tested, and according to the number of task atlases combined with the maximum number of processes, within the range of the maximum number of processes, run to determine the target number of target processes to be run. For example, if the maximum number of processes is X, the target number of target processes can be determined to be any number less than or equal to X.
[0065] S14. According to the task size of each task atlas, each task atlas is assigned to the corresponding target process as a task to be tested according to a preset allocation strategy and a running operation is performed to obtain a test record; wherein the running operation includes an entry operation for multiple base library fingerprint images and / or an unlocking operation for multiple unlocking fingerprint images.
[0066] Specifically, the computer device can treat each task atlas as a task to be tested according to the task size of each task atlas, and assign multiple tasks to be tested to the corresponding target process according to the preset allocation strategy, and perform the running operation. Optionally, the above allocation strategy can be to divide multiple task atlases into multiple task groups according to the task size of each task atlas, and the difference between the sum of task sizes in different task groups is the smallest; optionally, different task atlases can also be grouped according to task size, for example, the largest task atlas and the smallest task atlas are grouped as one group, and the second largest task atlas and the second smallest task atlas are grouped as one group; of course, the computer device can also use other methods to allocate the above task atlases according to task size, as long as the task atlas can be evenly distributed as much as possible according to the task size, and multiple task groups consistent with the target number are obtained, and then each task group is assigned to a target process to perform the running operation and obtain the corresponding test record. Among them, the running operation can include the computer device automatically and continuously performing the entry operation for multiple base library fingerprint images, and can also include the unlocking operation of multiple unlocking fingerprint images that are continuously performed. Through the automatic running operation of the computer device, the automatic test of the fingerprint image is realized.
[0067] In this embodiment, the computer device obtains at least one benchmark test atlas, and obtains the task size of each task atlas, and then runs the target number of target processes according to the number of task atlases and the maximum number of processes allowed to run, and according to the task size of each task atlas, each task atlas is assigned to the corresponding target process as a task to be tested according to a preset allocation strategy and performs the running operation to obtain a test record. Compared with the traditional one-by-one running method, the method provided in this embodiment, since each task atlas includes multiple base library fingerprint maps and / or multiple unlocking fingerprint maps, by assigning each task atlas as a test task to the target number of target processes according to the preset allocation strategy according to the task size of each task atlas, it is achieved that when the computer device allows, multiple processes can process multiple tasks to be tested in parallel, which can greatly improve the iteration efficiency of the algorithm, thereby greatly improving the efficiency of image testing.
[0068] Optionally, based on the above embodiment, a possible implementation of step S13 includes: if the number of task atlases is greater than or equal to the maximum number of processes, the maximum number of processes is used as the target number, and the target number of target processes is run; if the number of task atlases is less than or equal to the maximum number of processes, the number of task atlases is used as the target number, and the target number of target processes is run. In this way, the computer device can make the most of the resources allowed to be called and start the maximum number of target processes, thereby achieving the maximum resource utilization and ensuring the efficiency of image testing to the greatest extent.
[0069] Optionally, based on the above embodiments, a possible implementation of step S14 may be as follows: Figure 3 As shown, including:
[0070] S141, initializing the task atlas in the target process to be empty.
[0071] S142. Determine the average task amount of each target process according to the task size of each task atlas and the target quantity.
[0072] Specifically, the computer device first performs initialization, sets the task amount in the running target process to zero, and then determines the average task amount of each target process according to the task size and target number of each task atlas. For example, when the sum of the task sizes is 15900 and the target number is 4, the average task amount is 15900 / 4=3975.
[0073] S143, arranging the task atlases according to the corresponding task sizes to obtain a list of atlases to be tested.
[0074] S144, taking the task atlas as the task to be tested, and allocating them one by one in the order of the atlas list to be tested according to the task size and average task amount of each task to be tested, to obtain the target task to be tested that each target process needs to run.
[0075] Specifically, the computer device obtains a list of atlases to be tested according to the task size of each task atlas. Optionally, the task atlases can be arranged in order from large to small, so as to process the largest task atlas first, and then allocate small task atlases, so as to make full use of the processing power of each target process. Optionally, of course, it can also be arranged from small to large, as long as it can reflect the ordering relationship of the task atlas size. Then, the computer device takes each task atlas as a task to be tested, and allocates each task atlas one by one according to the order of the atlas list to be tested. It can be based on the task size of each atlas to be tested and the average task amount as a reference, so that the difference between the task amount allocated to each target process and the average task amount is within a certain range, thereby obtaining the target task to be tested that each target process needs to run.
[0076] Optionally, a possible implementation of step S144 may include: the computer device sequentially obtains a task to be tested as the current task to be tested in the order of the atlas list to be tested, and sequentially obtains a target process as the current target process; then determines whether the current target process is empty for the current task to be tested. If the computer device determines that the current target process is empty, the current task to be tested is assigned to the queue of the current target process as a target task to be tested of the current target process. At this time, the task to be tested is the first target task to be tested assigned to the current target process. If the current target process is not empty, that is, the current target process already has an assigned task to be tested, then the computer device calculates whether the sum of the task sizes of the assigned task to be tested plus the task to be tested that needs to be assigned at present is less than the average task size. If the sum of the task sizes is less than the average task size, it is determined that the current process can reasonably handle the current task to be tested, so the current task to be tested is assigned to the queue of the current target process as a target task to be tested of the current target process. Then, according to the atlas list to be tested, the above operation is continued for the next task to be tested and the next target process. That is, if the next target process is empty, the computer device assigns the next task to be tested to the next target process, and uses the next target process as the new current process, and continues to execute the step of determining whether the new current process is empty. If the computer device calculates the total task size of the already assigned tasks to be tested plus the tasks to be tested that need to be assigned, and is greater than or equal to the average task size, the next target process can be used as the new current process, and the new current task to be tested and the next target process continue to execute the above-mentioned determination of whether the current target process is empty for the current task to be tested, and the above-mentioned operation is iteratively executed repeatedly until all the tasks to be tested are assigned.
[0077] Optionally, if the sum of the task sizes of existing tasks to be tested and the current task to be tested in each target process is greater than or equal to the average task size, the current task to be tested is allocated to the target process corresponding to the smallest total task size, thereby achieving the allocation of the minimum task size difference, thereby reasonably allocating resources to the greatest extent, maximizing resource utilization, shortening processing time to the greatest extent, and maximizing image processing efficiency.
[0078] Optionally, the results of the task assignment to be tested can be found in Figure 4 As shown,
[0079] The allocation strategy provided in this embodiment directly allocates the tasks to be tested when the target process is empty, and when the target process is not empty, reasonably allocates the tasks to be tested in the list of the atlas to be tested one by one according to the relationship between the sum of the task sizes of the tasks to be tested that need to be allocated and the allocated tasks to be tested and the average task size obtained from the budget, so that the amount of tasks run by each target process will not be too large, thereby achieving reasonable resource allocation and improving resource utilization.
[0080] S145, running each of the target processes, and performing the graph running operations on the target tasks to be tested in sequence.
[0081] Specifically, the computer device runs each target process and executes the running operation on each assigned target task to be tested in sequence.
[0082] In this embodiment, the computer device initializes the task set in the target process to be empty, and determines the average task volume of each target process according to the task size and target number of each task atlas, and then arranges the task atlases according to the corresponding task sizes to obtain a list of atlases to be tested, and uses the task atlases as the tasks to be tested, and allocates them one by one in the order of the atlas list to be tested according to the task size and average task volume of each task to be tested, so as to obtain the target tasks to be tested that each target process needs to run, and runs each target process, and performs the running operation on the target tasks to be tested in sequence. The method provided in this embodiment realizes reasonable task allocation based on the task size and average task volume of each task to be tested, so as to realize reasonable resource allocation, improve resource utilization, and thus improve the efficiency of image testing.
[0083] Optionally, based on the above-mentioned embodiments, the above-mentioned running operation may include: performing a bottom library fingerprint map entry operation on the sub-node atlas whose node name in the task to be tested contains a bottom library identifier; performing an unlocking operation on the sub-node atlas whose node name in the task to be tested does not contain a bottom library identifier. Specifically, if the name of the task to be tested in the task to be tested contains a bottom library identifier, for example, the name of the folder to be tested includes characters such as "diku", then the computer device believes that the bottom library fingerprint map is stored under the sub-node atlas, which may be the folder to be tested, and the bottom library entry needs to be performed, so the bottom library fingerprint map entry operation is performed on the bottom library fingerprint map in the task to be tested; if the name of the task to be tested in the task to be tested does not contain a bottom library identifier, it may be that there are characters such as "jiesuo", then the computer device believes that the sub-node atlas stores an unlocking fingerprint map, and an unlocking test needs to be performed, so the unlocking fingerprint map is unlocked. The unlocking fingerprint map is performed on the unlocking fingerprint map in the folder to be tested. In this embodiment, by identifying the characters carried in the name of the above-mentioned task to be tested, the base database entry operation can be accurately performed on the base database fingerprint image, and the unlocking process can be accurately performed on the unlocking fingerprint image of the non-base database fingerprint image, thereby realizing the operation required for automatic identification and further improving the automation and accuracy of the image test. Optionally, the above-mentioned base database fingerprint image entry operation and unlocking fingerprint image unlocking operation can be referred to Figure 5 The process shown will not be repeated here.
[0084] Optionally, before the above-mentioned running operation, it may also include: the computer device arranges the nodes to be tested in the task to be tested in alphabetical order to generate an ordered subtask list; and performs the running operation on the nodes to be tested in sequence according to the order in the ordered subtask list. The computer device arranges the nodes to be tested in the task to be tested in alphabetical order to generate an ordered subtask list, and performs the running operation on the nodes to be tested in sequence according to the order in the ordered subtask list, so that the tasks can be executed in an orderly manner, avoiding omissions or mistakes that may be caused by disordered operations, and improving the efficiency of image processing.
[0085] Optionally, the benchmark test set includes at least one of: an FRR test set, a FAR test set, and a cross test set. Among them, the FRR test set is used for FRR testing, which is to use the same finger image to perform a specified number of unlocking verifications after entering the base database, and finally calculate the ratio of the number of failures in the whole process to the total number of comparisons, which is the FRR rate. The following is a schematic diagram of the hierarchical organization structure of a basic FRR test case:
[0086]
[0087] The FAR test set is used for FAR testing. After the FRR test is entered into the database, other finger images (not the finger images entered into the database) are used to make a specified number of unlock attempts. Finally, the ratio of the number of passes and the total number of comparisons in the whole process is calculated as the FAR rate. The following is an example of a basic FAR test case:
[0088]
[0089]
[0090] After the cross-test atlas is entered into the base database, a certain number of FRR tests are performed, and then FAR tests are performed. The following is an illustration of a test case for a cross-test atlas:
[0091]
[0092] Through the verification process of the above FRR test set, FAR test set and cross test set, FRR and FAR can be tested respectively, so that the test indicators are targeted. When the FRR test set, FAR test set and cross test set are all tested, a more comprehensive test can be performed, so that the test results can more comprehensively reflect the fingerprint recognition ability of the program, and the test results are more accurate.
[0093] Optionally, the definition of fingers can refer to the following identifiers:
[0094] L1: left thumb L2: left index finger L3: left middle finger L4: left ring finger L5: left little finger R1: right thumb R2: right index finger R3: right middle finger R4: right ring finger R5: right little finger Optionally, different scenes may include: normal, cold, sunlight, ... and so on.
[0095] Optionally, the structure of the above-mentioned benchmark test atlas includes: a first-level benchmark node (Benchmark node), a second-level benchmark node, a second-level task node and a third-level task node; wherein the second-level benchmark node includes at least one calibration shading benchmark image. The calibration shading benchmark image is a shading base image taken using a heavy color mold when calibrating the fingerprint sensor, which can be used to remove the shading of other images to be tested. Since the original image (RAW image) collected by the fingerprint under the screen each time is related to the physical state such as the grease fixed texture on the screen at that time, in order to obtain a better fingerprint signal, the fingerprint image collected each time must be removed. The third-level task node is a node under the second-level task node, and the third-level task node includes a base library node and an unlocking node. It should be noted that a basic Benchmark test set is a tree structure organized in a hierarchical relationship, which can be represented in the form of a folder or in a structured file format such as json, xml, etc. Optionally, the first-level benchmark node is the name of the test benchmark, and the above-mentioned structured image organization relationship can be stored in the form of a folder. At this time, the bottom library node is a folder of a bottom library fingerprint map, and multiple bottom library fingerprint maps are stored below. The unlocking node is a folder of an unlocking fingerprint map, and multiple unlocking fingerprint maps are stored below. When the above-mentioned structured image organization relationship is expressed in json or xml, the bottom library fingerprint map and the unlocking fingerprint map can be the storage path of the corresponding picture for structured organization and calling. For details, please refer to the data structure of the test case of each benchmark test atlas. In this embodiment, through the structured organization method of the above-mentioned benchmark test atlas, the test task can be flexibly organized, so that multiple tasks to be tested can be processed in parallel using multiple processes reasonably, which can greatly improve the iteration efficiency of the algorithm, thereby greatly improving the efficiency of image testing.
[0096] Optionally, the naming format of the first-level reference node is: Bmk_terminal identifier_atlas sequence number;
[0097] The naming format of the second-level task node is: test type_test task_task number;
[0098] The naming format of the third-level task node is: collection serial number_base database_person name identification_finger_scene, or: collection serial number_unlock_person name identification_finger_scene[test type];
[0099] The naming format of the base database fingerprint map under the base database node is: <time>_<collection sequence number>_ <diku>_<scene>_<score information>;
[0100] The naming format of the unlock fingerprint map under the unlock node is: <time>_<collection sequence number>_<diku|jiesuo> _<Scene>_<Score Information>.
[0101] Optionally, the structured node structure is as follows:
[0102]
[0103] Optionally, the above three-layer structure is only an example, and more levels of node structuring can be performed as needed. At the same time, multiple benchmark sets can together constitute a larger benchmark set, making the test samples richer and the test results more accurate.
[0104] The test nodes at all levels and the naming formats of the test nodes mentioned above can match the structured task organization form, thereby further improving the flexibility of the test task organization and greatly improving the efficiency of the image test.
[0105] Optionally, after all started target processes have finished running, the results of each task to be tested are summarized and counted to obtain the test results. The test results can also be generated in the form of a report and uploaded to the server for display, so that the test results are graphically displayed for easy reference.
[0106] It should be understood that although Figure 2-5 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-5 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0107] In one embodiment, Figure 6 As shown, an image testing device is provided, comprising:
[0108] The acquisition module 100 is used to acquire at least one benchmark test atlas; each of the benchmark test atlases includes multiple task atlases, each task atlas includes multiple base library fingerprint maps and / or multiple unlocking fingerprint maps, and acquire the task size of each task atlas; wherein the task size is used to represent the total number of base library fingerprint maps and unlocking fingerprint maps in the task atlas;
[0109] A determination module 200 is used to run a target number of target processes according to the number of task atlases and the maximum number of processes allowed to run;
[0110] The processing module 300 is used to allocate each of the task atlases as a task to be tested to the corresponding target process according to the preset allocation strategy according to the task size of each of the task atlases, and perform a running operation to obtain a test record; wherein the running operation includes an entry operation for multiple base library fingerprint images and / or an unlocking operation for multiple unlocking fingerprint images.
[0111] In one embodiment, the determination module 200 is specifically used to, when the number of the task atlases is greater than or equal to the maximum number of processes, use the maximum number of processes as the target number and run the target number of target processes; when the number of the task atlases is less than or equal to the maximum number of processes, use the number of the task atlases as the target number and run the target number of target processes.
[0112] In one embodiment, the processing module 300 is specifically used to initialize the task atlas in the target process to be empty; determine the average task amount of each target process according to the task size of each task atlas and the target number; arrange the task atlases according to the corresponding task sizes to obtain a list of atlases to be tested; use the task atlases as tasks to be tested, and allocate them one by one in the order of the atlas list to be tested according to the task size and average task amount of each task to be tested, to obtain the target tasks to be tested that need to be run by each target process; run each target process, and perform the running operation on the target tasks to be tested in turn.
[0113] In one embodiment, the processing module 300 is specifically used to obtain a task to be tested as the current task to be tested in sequence in the order of the atlas list to be tested, and to obtain a target process as the current target process in sequence; for the current task to be tested, determine whether the current target process is empty; if so, assign the current task to be tested to the current target process as a target task to be tested of the current target process; if not, when the total task size of the existing tasks to be tested and the current task to be tested in the target process is less than the average task size, assign the current task to be tested to the queue of the current target process as a target task to be tested of the current target process; and when the total task size is greater than or equal to the average task size, use the next target process as the new current target process, and return to execute the step of determining whether the current target process is empty for the current task to be tested.
[0114] In one embodiment, the processing module 300 is specifically used to allocate the current task to be tested to the target process corresponding to the smallest total task size if the total task size of the existing tasks to be tested and the current task to be tested in each target process is greater than or equal to the average task size.
[0115] In one embodiment, the running operation includes: performing an entry operation of a base library fingerprint map on a sub-node map set whose node names in the task to be tested contain a base library identifier; and performing an unlocking operation of an unlocking fingerprint map on a sub-node map set whose node names in the task to be tested do not contain a base library identifier.
[0116] In one embodiment, the benchmark test set includes at least one of a FRR test set, a FAR test set, and a cross test set.
[0117] In one embodiment, the structure of the benchmark test atlas includes: a first-level benchmark node, a second-level benchmark node, a second-level task node and a third-level task node; wherein the second-level benchmark node includes at least one calibration shading benchmark map, the third-level task node is a node one level below the second-level task node, and the third-level task node includes a base node and an unlocking node.
[0118] For the specific definition of the image testing device, please refer to the definition of the image testing method above, which will not be repeated here. Each module in the above-mentioned image testing device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0119] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 1 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store a benchmark test atlas. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an image testing method is implemented.
[0120] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0121] Acquire at least one benchmark test atlas; wherein each of the benchmark test atlases includes a plurality of task atlases, and each task atlas includes a plurality of base library fingerprint maps and / or a plurality of unlocking fingerprint maps;
[0122] Obtaining the task size of each of the task atlases; wherein the task size is used to represent the total number of base library fingerprint images and unlocking fingerprint images in the task atlas;
[0123] Running a target number of target processes according to the number of task graphs and the maximum number of processes allowed to run;
[0124] According to the task size of each of the task atlases, each of the task atlases is assigned to the corresponding target process as a task to be tested according to a preset allocation strategy and a running operation is performed to obtain a test record; wherein the running operation includes an entry operation for multiple base library fingerprint images and / or an unlocking operation for multiple unlocking fingerprint images.
[0125] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0126] If the number of the task atlas is greater than or equal to the maximum number of processes, the maximum number of processes is used as the target number, and the target number of target processes is run;
[0127] If the number of task atlases is less than or equal to the maximum number of processes, the number of task atlases is used as the target number, and the target number of target processes is run.
[0128] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0129] Initialize the task atlas in the target process to be empty;
[0130] Determining an average task amount of each target process according to the task size of each of the task atlases and the target quantity;
[0131] Arrange the task atlases according to the corresponding task sizes to obtain a list of atlases to be tested;
[0132] The task atlas is used as the task to be tested, and according to the task size and average task amount of each task to be tested, they are allocated one by one in the order of the atlas list to obtain the target task to be tested that each target process needs to run;
[0133] Run each of the target processes and execute the graph running operations on the target tasks to be tested in sequence.
[0134] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0135] Obtaining a task to be tested in sequence as the current task to be tested according to the order of the atlas list to be tested, and obtaining a target process in sequence as the current target process;
[0136] Determine whether the current target process is empty for the current task to be tested;
[0137] If yes, the current task to be tested is assigned to the current target process as a target task to be tested of the current target process;
[0138] If not, when the total task sizes of the existing tasks to be tested and the current task to be tested in the target process is less than the average task size, the current task to be tested is assigned to the queue of the current target process as a target task to be tested of the current target process; and when the total task sizes are greater than or equal to the average task size, the next target process is used as the new current target process, and the step of determining whether the current target process is empty for the current task to be tested is returned to execute.
[0139] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0140] If the sum of the task sizes of the existing tasks to be tested and the current task to be tested in each target process is greater than or equal to the average task size, the current task to be tested is allocated to the target process corresponding to the smallest task sum.
[0141] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0142] Performing an entry operation of the base database fingerprint map on the sub-node map set whose node name contains the base database identifier in the task to be tested;
[0143] An unlocking operation of the unlocking fingerprint graph is performed on the sub-node graph set whose node name in the task to be tested does not contain the base library identifier.
[0144] In one embodiment, the benchmark test set includes at least one of a FRR test set, a FAR test set, and a cross test set.
[0145] In one embodiment, the structure of the benchmark test atlas includes: a first-level benchmark node, a second-level benchmark node, a second-level task node and a third-level task node; wherein the second-level benchmark node includes at least one calibration shading benchmark map, the third-level task node is a node one level below the second-level task node, and the third-level task node includes a base node and an unlocking node.
[0146] It should be clear that the process of the processor executing the computer program in the embodiment of the present application is consistent with the execution process of each step in the above method, and the details can be found in the description above.
[0147] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0148] Acquire at least one benchmark test atlas; wherein each of the benchmark test atlases includes a plurality of task atlases, and each task atlas includes a plurality of base library fingerprint maps and / or a plurality of unlocking fingerprint maps;
[0149] Obtaining the task size of each of the task atlases; wherein the task size is used to represent the total number of base library fingerprint images and unlocking fingerprint images in the task atlas;
[0150] Running a target number of target processes according to the number of task graphs and the maximum number of processes allowed to run;
[0151] According to the task size of each of the task atlases, each of the task atlases is assigned to the corresponding target process as a task to be tested according to a preset allocation strategy and a running operation is performed to obtain a test record; wherein the running operation includes an entry operation for multiple base library fingerprint images and / or an unlocking operation for multiple unlocking fingerprint images.
[0152] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0153] If the number of the task atlas is greater than or equal to the maximum number of processes, the maximum number of processes is used as the target number, and the target number of target processes is run;
[0154] If the number of task atlases is less than or equal to the maximum number of processes, the number of task atlases is used as the target number, and the target number of target processes is run.
[0155] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0156] Initialize the task atlas in the target process to be empty;
[0157] Determining an average task amount of each target process according to the task size of each of the task atlases and the target quantity;
[0158] Arrange the task atlases according to the corresponding task sizes to obtain a list of atlases to be tested;
[0159] The task atlas is used as the task to be tested, and according to the task size and average task amount of each task to be tested, they are allocated one by one in the order of the atlas list to obtain the target task to be tested that each target process needs to run;
[0160] Run each of the target processes and execute the graph running operations on the target tasks to be tested in sequence.
[0161] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0162] Obtaining a task to be tested in sequence as the current task to be tested according to the order of the atlas list to be tested, and obtaining a target process in sequence as the current target process;
[0163] Determine whether the current target process is empty for the current task to be tested;
[0164] If yes, the current task to be tested is assigned to the current target process as a target task to be tested of the current target process;
[0165] If not, when the total task sizes of the existing tasks to be tested and the current task to be tested in the target process is less than the average task size, the current task to be tested is assigned to the queue of the current target process as a target task to be tested of the current target process; and when the total task sizes are greater than or equal to the average task size, the next target process is used as the new current target process, and the step of determining whether the current target process is empty for the current task to be tested is returned to execute.
[0166] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0167] If the sum of the task sizes of the existing tasks to be tested and the current task to be tested in each target process is greater than or equal to the average task size, the current task to be tested is allocated to the target process corresponding to the smallest task sum.
[0168] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0169] Performing an entry operation of the base database fingerprint map on the sub-node map set whose node name contains the base database identifier in the task to be tested;
[0170] An unlocking operation of the unlocking fingerprint graph is performed on the sub-node graph set whose node name in the task to be tested does not contain the base library identifier.
[0171] In one embodiment, the benchmark test set includes at least one of a FRR test set, a FAR test set, and a cross test set.
[0172] In one embodiment, the structure of the benchmark test atlas includes: a first-level benchmark node, a second-level benchmark node, a second-level task node and a third-level task node; wherein the second-level benchmark node includes at least one calibration shading benchmark map, the third-level task node is a node one level below the second-level task node, and the third-level task node includes a base node and an unlocking node.
[0173] It should be clear that the process of executing the computer program by the processor in the embodiment of the present application is consistent with the execution process of each step in the above method, and the details can be found in the description above.
[0174] Those of ordinary skill 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 computer program can be stored in a non-volatile computer-readable storage medium. When the computer 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 at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0175] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0176] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.< / diku>
Claims
1. An image testing method, characterized in that: The method comprises: Acquire at least one benchmark test atlas; wherein each of the benchmark test atlases includes a plurality of task atlases, and each task atlas includes a plurality of base library fingerprint maps and / or a plurality of unlocking fingerprint maps; Obtaining the task size of each of the task atlases; wherein the task size is used to represent the total number of base library fingerprint images and unlocking fingerprint images in the task atlas; Running a target number of target processes according to the number of task graphs and the maximum number of processes allowed to run; According to the task size of each task atlas, each task atlas is assigned to the corresponding target process as a task to be tested according to a preset allocation strategy, and a running operation is performed to obtain a test record; wherein the running operation includes an input operation for multiple base library fingerprint images and / or an unlocking operation for multiple unlocking fingerprint images; Wherein, according to the number of the task atlases and the maximum number of processes allowed to run, running the target number of target processes includes: If the number of the task atlas is greater than or equal to the maximum number of processes, the maximum number of processes is used as the target number, and the target number of target processes is run; If the number of task atlases is less than or equal to the maximum number of processes, the number of task atlases is used as the target number, and the target number of target processes is run.
2. The method according to claim 1, characterized in that According to the task size of each task atlas, each task atlas is assigned as a task to be tested to a corresponding target process according to a preset allocation strategy and a running operation is performed, including: Initialize the task atlas in the target process to be empty; Determining an average task amount of each target process according to the task size of each of the task atlases and the target quantity; Arrange the task atlases according to the corresponding task sizes to obtain a list of atlases to be tested; The task atlas is used as the task to be tested, and according to the task size and average task amount of each task to be tested, they are allocated one by one in the order of the atlas list to obtain the target task to be tested that each target process needs to run; Run each of the target processes and execute the graph running operations on the target tasks to be tested in sequence.
3. The method according to claim 2, characterized in that The task atlas is used as the task to be tested, and according to the task size and average task amount of each task to be tested, the task is allocated one by one in the order of the atlas list to obtain the target task to be tested that each target process needs to run, including: Obtaining a task to be tested in sequence as the current task to be tested according to the order of the atlas list to be tested, and obtaining a target process in sequence as the current target process; Determine whether the current target process is empty for the current task to be tested; If yes, the current task to be tested is assigned to the current target process as a target task to be tested of the current target process; If not, when the total task sizes of the existing tasks to be tested and the current task to be tested in the target process is less than the average task size, the current task to be tested is assigned to the queue of the current target process as a target task to be tested of the current target process; and when the total task sizes are greater than or equal to the average task size, the next target process is used as the new current target process, and the step of determining whether the current target process is empty for the current task to be tested is returned to execute.
4. The method according to claim 3, characterized in that: The method further comprises: If the sum of the task sizes of the existing tasks to be tested and the current task to be tested in each target process is greater than or equal to the average task size, the current task to be tested is allocated to the target process corresponding to the smallest task sum.
5. The method according to claim 2, characterized in that: The running map operation includes: Performing an entry operation of the base database fingerprint map on the sub-node map set whose node name contains the base database identifier in the task to be tested; An unlocking operation of the unlocking fingerprint graph is performed on the sub-node graph set whose node name in the task to be tested does not contain the base library identifier.
6. The method according to claim 1, characterized in that The benchmark test set includes at least one of an FRR test set, a FAR test set and a cross test set.
7. The method according to any one of claims 1 to 6, characterized in that: The structure of the benchmark test atlas includes: first-level benchmark nodes, second-level benchmark nodes, second-level task nodes and third-level task nodes; wherein the second-level benchmark nodes include at least one calibration shading benchmark map, the third-level task nodes are nodes one level below the second-level task nodes, and the third-level task nodes include base library nodes and unlocking nodes.
8. An image testing device, characterized in that: The device comprises: An acquisition module is used to acquire the task size of at least one benchmark test atlas and each task atlas; wherein each benchmark test atlas includes multiple task atlases, each task atlas includes multiple base library fingerprint maps and / or multiple unlocking fingerprint maps, and the task size is used to characterize the total number of base library fingerprint maps and unlocking fingerprint maps in the task atlas; A determination module, configured to run a target number of target processes according to the number of the task atlas and the maximum number of processes allowed to run; A processing module is used to allocate each of the task atlases as a task to be tested to a corresponding target process according to a preset allocation strategy according to the task size of each of the task atlases and to perform a running operation to obtain a test record; wherein the running operation includes an entry operation for multiple base library fingerprint images and / or an unlocking operation for multiple unlocking fingerprint images; Wherein, the determination module is specifically used for: When the number of the task atlas is greater than or equal to the maximum number of processes, the maximum number of processes is used as the target number, and the target number of target processes is run; When the number of the task atlases is less than or equal to the maximum number of processes, the number of the task atlases is used as the target number, and the target number of target processes is run.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-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 7 are implemented.
Citation Information
Patent Citations
Interface test method and device for picture server, storage medium and mobile terminal
CN110347597A
Interface test method and device, mobile terminal and storage medium
CN110515834A