A computing performance testing method, device, electronic device and storage medium

Through virtual board search and statistics of search success times, the problem that the existing technology cannot measure the solution ability of electronic equipment specific problems is solved, and the evaluation of the Queen's problem solving performance and intuitive feedback on the equipment computing performance is achieved.

CN112486794BActive Publication Date: 2024-12-20BEIJING ANTUTU TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011518733.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-21
Publication Date
2024-12-20
Estimated Expiration
2040-12-21

AI Technical Summary

Technical Problem

Existing computing performance testing methods cannot effectively measure the ability of electronic devices to solve specific problems, such as the Queen's problem, and cannot fully understand the performance of the device in practical applications.

Method used

By obtaining the preset virtual chessboard order, searching based on the virtual chessboard, counting the total number of search success results obtained within the preset time, determining the calculation performance test results, and realizing performance testing of electronic devices in solving specific problems. The specific steps include obtaining the order of the virtual board, searching, ensuring that the occupied position is in a safe state, counting the number of search successes, and calculating the average completion speed based on the number of times to determine the test score.

Benefits of technology

The test of the electronic device's ability to solve specific problems is realized, especially the performance evaluation of the Queen's problem solving, which can intuitively feedback the computing performance of the device and help users understand the performance of the device on specific tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112486794B_ABST
    Figure CN112486794B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a computing performance test method, device, electronic device and storage medium, which obtains a preset virtual chessboard order, searches the virtual chessboard based on the virtual chessboard order, obtains a successful search result that the occupied position on the virtual chessboard that meets the virtual chessboard order is in a safe state, counts the total number of successful search results obtained within a preset time, and determines the computing performance test result based on the total number of times. By searching the virtual chessboard, a successful search result that the occupied position on the virtual chessboard that meets the virtual chessboard order is in a safe state is obtained, and then the total number of successful search results that can be obtained within the preset time is counted. Based on the total number of times, it is possible to test how many successful search results can be obtained within a period of time, thereby realizing performance testing of electronic devices in solving specific problems, especially realizing performance testing in solving the queen problem.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer application technology, and in particular to a computing performance testing method, device, electronic equipment and storage medium. Background Art

[0002] With the development of technology, the functions of electronic devices such as mobile phones, laptops, and tablets are becoming increasingly powerful. At present, various application software are constantly emerging, and numerous programs and services have put forward higher requirements on the computing performance of electronic devices. The stronger the computing performance of electronic devices, the faster the electronic devices can run application software.

[0003] At present, in order to let users better understand the computing performance of electronic devices, technicians have developed evaluation software (also known as "benchmarking" software). When this evaluation software is run on an electronic device, it can test the computing performance of the electronic device through certain testing methods and inform the user of the test results, thereby helping the user understand the computing performance of the electronic device.

[0004] The current computing performance test method is to test the performance of electronic devices running application software, and the output is the performance test result of the electronic device running application software. However, in actual applications, electronic devices also need to solve specific problems such as the Queen's problem, and the current computing performance test method cannot measure the ability of electronic devices to solve specific problems. Summary of the invention

[0005] The purpose of the embodiments of the present invention is to provide a computing performance testing method, device, electronic device and storage medium to implement performance testing of electronic devices in solving specific problems. The specific technical solution is as follows:

[0006] In a first aspect, an embodiment of the present invention provides a computing performance testing method, the method comprising:

[0007] Get the preset virtual chessboard order;

[0008] Based on the virtual chessboard order, the virtual chessboard is searched to obtain a successful search result that the occupied positions on the virtual chessboard that meet the virtual chessboard order are in a safe state, wherein the safe state means that any two occupied positions are in different rows, different columns, and not on the same diagonal line;

[0009] Count the total number of successful search results obtained within the preset time period;

[0010] Based on the total number of times, the calculation performance test result is determined.

[0011] Optionally, the step of obtaining a preset virtual chessboard order includes:

[0012] Get processor performance parameters;

[0013] Set the virtual chessboard order according to the processor performance parameters.

[0014] Optionally, based on the virtual chessboard order, the step of searching the virtual chessboard to obtain a successful search result that an occupied position on the virtual chessboard that meets the virtual chessboard order is in a safe state includes:

[0015] Start searching from the first position of the first row of the virtual chessboard;

[0016] If the current position in the searched current row is in a safe state after being occupied, the current position is set to an occupied state, and the current position is added to an occupied point set, wherein the occupied point set is used to record the position in an occupied state;

[0017] If no position in the current row is occupied and is in a safe state, then go back to the previous row to continue searching, and remove the position in the previous row that has been added to the occupied point set from the occupied point set, clearing the occupied state of the position;

[0018] If the current row is not the last row, continue searching for the next row;

[0019] If the current row is the last row, the current position is moved out of the occupied point set to go back to the previous row to continue searching.

[0020] Optionally, before the step of searching the virtual chessboard based on the virtual chessboard order to obtain a successful search result that an occupied position on the virtual chessboard that meets the virtual chessboard order is in a safe state, the method further includes:

[0021] Start the timer and clear the counter to zero;

[0022] Clear the occupied point set;

[0023] The step of counting the total number of successful search results obtained within a preset time period includes:

[0024] If the current position in the last row is found to be occupied and is in a safe state, the value of the counter is incremented by 1;

[0025] If the timing duration of the timer does not reach the preset duration, return to the step of clearing the occupied point set;

[0026] If the timing duration of the timer reaches the preset duration, the total number of successful search results obtained within the preset duration is read from the counter.

[0027] Optionally, the step of determining the computing performance test result based on the total number of times includes:

[0028] Calculate the average completion speed based on the total number of times and the preset duration;

[0029] Based on the average completion speed, the computing performance test result is determined, wherein the computing performance test result is a test score, and the test score is proportional to the average completion speed.

[0030] Optionally, after the step of determining the computing performance test result based on the total number of times, the method further includes:

[0031] Output the computing performance test results to the test interface.

[0032] In a second aspect, an embodiment of the present invention provides a computing performance testing device, the device comprising:

[0033] An acquisition module, used to acquire a preset virtual chessboard order;

[0034] The operation module is used to search the virtual chessboard based on the virtual chessboard order, and obtain a successful search result that the occupied positions on the virtual chessboard that meet the virtual chessboard order are in a safe state, wherein the safe state means that any two occupied positions are in different rows, different columns, and are not on the same diagonal line;

[0035] A statistics module is used to count the total number of successful search results obtained within a preset time period;

[0036] The determination module is used to determine the computing performance test result based on the total number of times.

[0037] Optionally, an acquisition module is specifically used to obtain processor performance parameters; according to the processor performance parameters, the virtual chessboard order is set.

[0038] Optionally, an operation module is specifically used to start searching from the first position of the first row of the virtual chessboard; if the current position in the current row searched is occupied and is in a safe state, the current position is set to an occupied state, and the current position is added to an occupied point set, wherein the occupied point set is used to record positions in an occupied state; if no position in the current row is occupied and is in a safe state, then the search is returned to the previous row to continue, and the position in the previous row that has been added to the occupied point set is removed from the occupied point set to clear the occupied state of the position; if the current row is not the last row, the search is continued to the next row; if the current row is the last row, the current position is removed from the occupied point set to return to the previous row to continue searching.

[0039] Optionally, the device further comprises:

[0040] A start module is used to start the timer and clear the counter;

[0041] The clearing module is used to clear the occupied point set;

[0042] The statistical module is specifically used to add 1 to the value of the counter if the current position in the last row is occupied and is in a safe state after searching; if the timing duration of the timer does not reach the preset duration, return to execute the step of clearing the occupied point set; if the timing duration of the timer reaches the preset duration, read the total number of successful search results obtained within the preset duration from the counter.

[0043] Optionally, a determination module is specifically used to calculate an average completion speed based on the total number of times and a preset duration; based on the average completion speed, a computing performance test result is determined, wherein the computing performance test result is a test score, and the test score is proportional to the average completion speed.

[0044] Optionally, the device further comprises:

[0045] The output module is used to output the computing performance test results to the test interface.

[0046] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory, wherein the memory is used to store a computer program; and the processor is used to implement the method provided in the first aspect of the embodiment of the present invention when executing the computer program stored in the memory.

[0047] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method provided in the first aspect of the embodiment of the present invention is implemented.

[0048] In a fifth aspect, an embodiment of the present invention further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method provided in the first aspect of the embodiment of the present invention.

[0049] Beneficial effects of the embodiments of the present invention:

[0050] In the solution provided by the embodiment of the present invention, by obtaining a preset virtual chessboard order, the virtual chessboard is searched based on the virtual chessboard order, and a successful search result is obtained that the occupied positions on the virtual chessboard that meet the virtual chessboard order are in a safe state, wherein the safe state refers to: any two occupied positions are in different rows, different columns, and are not on the same diagonal line, and the total number of successful search results obtained within a preset time length is counted, and the computing performance test result is determined based on the total number of times. By searching the virtual chessboard, a successful search result is obtained that the occupied positions on the virtual chessboard that meet the virtual chessboard order are in a safe state, and then the total number of successful search results that can be obtained within the preset time length is counted. Based on the total number of times, the ability of the electronic device to solve the queen's problem can be tested, that is, how many successful search results can be obtained within a period of time, thereby realizing the performance test of the electronic device in solving specific problems, especially realizing the performance test in solving the queen's problem. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying creative work.

[0052] Figure 1 A schematic diagram of a flow chart of a computing performance testing method according to an embodiment of the present invention;

[0053] Figure 2 A schematic diagram of a flow chart of another computing performance testing method according to an embodiment of the present invention;

[0054] Figure 3 A schematic diagram of the structure of a computing performance testing device according to an embodiment of the present invention;

[0055] Figure 4 Schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0057] In order to implement performance testing of electronic devices in solving specific problems, embodiments of the present invention provide a computing performance testing method, device, electronic device and storage medium. Below, the computing performance testing method provided by embodiments of the present invention is first introduced.

[0058] The execution subject of the computing performance testing method provided in the embodiment of the present invention is: an electronic device with mathematical computing capabilities, such as a mobile phone, a laptop computer, a tablet computer, a PC (Personal Computer), etc.

[0059] like Figure 1 As shown, a computing performance testing method provided by an embodiment of the present invention may include the following steps.

[0060] S101, obtaining a preset virtual chessboard order.

[0061] S102, based on the virtual chessboard order, searching the virtual chessboard to obtain a successful search result that the occupied positions on the virtual chessboard that meet the virtual chessboard order are in a safe state, wherein the safe state means that any two occupied positions are in different rows, different columns, and are not on the same diagonal line.

[0062] S103, counting the total number of successful search results obtained within a preset time period.

[0063] S104, determining a computing performance test result based on the total number of times.

[0064] By applying the embodiment of the present invention, by obtaining a preset virtual chessboard order, searching the virtual chessboard based on the virtual chessboard order, a successful search result is obtained for an occupied position on the virtual chessboard that meets the virtual chessboard order and is in a safe state, wherein a safe state refers to: any two occupied positions are in different rows, different columns, and are not on the same diagonal line, and the total number of successful search results obtained within a preset time length is counted, and based on the total number of times, the computing performance test result is determined. By searching the virtual chessboard, a successful search result for an occupied position on the virtual chessboard that meets the virtual chessboard order and is in a safe state is obtained, and then the total number of successful search results that can be obtained within a preset time length is counted. Based on the total number of times, the ability of the electronic device to solve the Queen's problem can be tested, that is, how many successful search results can be obtained within a period of time, thereby achieving a performance test of the electronic device in solving specific problems, especially a performance test in solving the Queen's problem.

[0065] In the embodiment of the present invention, the performance of the electronic device in solving the Queen's Problem is mainly tested. The most famous Queen's Problem is the Eight Queens Problem, which was proposed by chess players in 1848. The Eight Queens Problem is to place eight queens on an 8×8 chessboard so that they cannot attack each other, that is, any two queens cannot be in the same row, the same column or the same diagonal line. Several concepts in the Queen's Problem are introduced below.

[0066] Safe state: After placing the queens, no two queens can be in the same row, column or diagonal line. At this time, the queens are said to be in a safe state. Otherwise, they are in a dangerous state and cannot be placed.

[0067] Placement point set: used to record the placement positions of all queens. The queen in this position is in a safe state. The placement point set can be a stack structure.

[0068] Placement completed: When all N queens in the N-order queen problem are in a safe state, the queens are considered to be placed, and the queen layout at this time is called one of the feasible placement plans.

[0069] In summary, when solving the Queen's problem, we should first obtain the pre-set virtual chessboard order. The higher the order, the more complex the Queen's problem is, and the higher the processor performance requirements of the electronic device are.

[0070] In an implementation manner of the embodiment of the present invention, S101 may specifically include: obtaining processor performance parameters; and setting the virtual chessboard order according to the processor performance parameters.

[0071] When setting the virtual chessboard order, it can be set according to the processor performance parameters. The processor performance parameters refer to the attribute parameters that can reflect the processing power of the processor, usually including the number of CPU (Central Processing Unit) cores and frequency. The larger the processor performance parameters (for example, the larger the number of CPU cores, the higher the frequency, etc.), the stronger the processor's ability to perform mathematical operations. Correspondingly, the larger the processor performance parameters, the higher the virtual chessboard order can be set, and vice versa. Therefore, by setting the virtual chessboard order according to the processor performance parameters, the virtual chessboard structure can be flexibly adjusted, the complexity can be appropriately increased or decreased, and it can be flexibly adapted to electronic devices with different performances.

[0072] After obtaining the virtual chessboard order, the Queen's problem can be solved based on the virtual chessboard order. Specifically, it is to try to place the Queen at each position of the virtual chessboard, or to search the virtual chessboard to find the occupied positions on the virtual chessboard, so that any two occupied positions on the virtual chessboard are in different rows, columns, and not on the same diagonal line. An occupied position on the virtual chessboard means that a Queen is placed at that position in the Queen's problem. The process of searching the virtual chessboard can be a row-by-row search or a column-by-column search, which is not limited here.

[0073] The Queen's problem can be solved by exhaustive method or backtracking method. The exhaustive method requires trying N N There are two situations. Put a queen in each column, which can be placed in the 1st row, the 2nd row, and so on, until the Nth row. When exhausting the solution, start with the solution where all queens are placed in the 1st row, and check whether the queens will attack each other. If so, move the queen in column H one space and verify the next solution. When it reaches the bottom, "carry" the queen in column G one space, and the queen in column H will try all N rows again. This method is very inefficient because it does not adjust where there is a conflict, but blindly enumerates all possible solutions in a given order. In order to deal with this inefficient solution method, backtracking can be used to solve the queen problem.

[0074] Specifically, S102 may be specifically as follows: start searching from the first position of the first row of the virtual chessboard; if the current position in the searched current row is occupied and is in a safe state, set the current position to an occupied state, and add the current position to an occupied point set, wherein the occupied point set is used to record positions in an occupied state; if no position in the current row is occupied and is in a safe state, then fall back to continue searching the previous row, and remove the position in the previous row that has been added to the occupied point set from the occupied point set, and clear the occupied state of the position; if the current row is not the last row, continue searching the next row; if the current row is the last row, remove the current position from the occupied point set, and fall back to continue searching the previous row.

[0075] The specific process of solving the Queen's problem by backtracking is as follows: take the first row as the current row; start searching from the first position of the current row, and the search steps are as follows: determine whether the current position is in a safe state after being occupied, if so, set the position to an occupied state, and add the position to the occupied point set (that is, the placement point set in the Queen's problem); if no position in the current row is in a safe state after being occupied, it will fall back to the previous row to continue searching, and remove the position in the previous row that has been added to the occupied point set from the occupied point set, and clear the occupied state of the position; determine whether the current row is the last row; if the current row is not the last row, it will continue to search the next row, and the search process is as described above, which will not be repeated here; if the current row is the last row, remove the current position from the occupied point set, and fall back to the previous row to continue searching. The occupied point set can adopt a first-in-last-out stack structure, so when removing a position from the occupied point set, the stack can be directly popped to remove the position from the occupied point set.

[0076] In an implementation manner of the embodiment of the present invention, before executing S102, the method may further execute: starting a timer and clearing the counter; and clearing the occupied point set.

[0077] Correspondingly, S103 can be specifically as follows: if the current position in the last row is occupied and is in a safe state after searching, the value of the counter is incremented by 1; if the timing duration of the timer has not reached the preset duration, the step of clearing the occupied point set is returned; if the timing duration of the timer reaches the preset duration, the total number of successful search results obtained within the preset duration is read from the counter.

[0078] In the embodiment of the present invention, a timer may be used to record the duration of the computing performance test, and a counter may be used to record the number of successful search results. After each successful search, the value recorded by the counter is accumulated by 1. In addition, before starting to search the virtual chessboard each time, the occupied point set needs to be cleared to ensure that the occupied point set records only the positions determined this time.

[0079] If the timer has not reached the preset time after completing a traversal of the virtual chessboard, the operation should continue. Since the order of the virtual chessboard is fixed, it is necessary to return to the step of clearing the occupied point set. If the timer reaches the preset time, the operation should be stopped, and the operation performance test result is determined based on the total number of successful search results recorded in the counter.

[0080] The electronic device continuously searches the virtual chessboard and counts the number of successful search results. The computing performance of the electronic device is reflected in the total number of successful search results that can be obtained within the working time (i.e., the preset time). The more the total number of successful search results that can be obtained within the working time, the better the computing performance of the electronic device. In an embodiment of the present invention, it is necessary to count the total number of successful search results obtained within the preset time, and the computing performance test result can be determined based on the total number of times obtained by statistics. The specific statistical process is to add 1 to the number of times for each successful search result obtained. The determined computing performance test result can be a specific scoring score, or a result indicating the performance level such as excellent, good, medium, or poor. The total number of times obtained by statistics can also be directly used as the computing performance test result, which is not specifically limited here.

[0081] In practical applications, the computing performance test results are generally fed back to users. In order to facilitate users to more intuitively see the quality of the computing performance of electronic devices, the computing performance test results are usually set as test scores. Accordingly, S104 can specifically be: calculating the average completion speed according to the total number of times and the preset duration; determining the computing performance test results based on the average completion speed, wherein the computing performance test results are test scores, and the test scores are proportional to the average completion speed.

[0082] The average completion speed refers to the number of times an electronic device can complete the traversal of the virtual chessboard in a unit time. When the test starts, the start time can be recorded, and when the preset duration is reached, the end time can be recorded. Then the average completion speed = total number / (end time-start time), or the total number of times can be directly divided by the preset duration to obtain the average completion speed. There is a positive proportional relationship between the test score and the average completion speed. That is, the faster the average completion speed, the better the computing performance of the electronic device, and a higher test score can be assigned accordingly. In specific applications, the full score of the test score can be set to 10 points or 100 points. When assigning the test score based on the average completion speed, it can be assigned in the range of 0 points to the full score.

[0083] based on Figure 1 In the embodiment shown, another computing performance testing method provided by the embodiment of the present invention is as follows: Figure 2 As shown, the following steps may be included.

[0084] S201, obtaining a preset virtual chessboard order.

[0085] S202, based on the virtual chessboard order, searching the virtual chessboard to obtain a successful search result that the occupied positions on the virtual chessboard that meet the virtual chessboard order are in a safe state, wherein the safe state means that any two occupied positions are in different rows, different columns, and are not on the same diagonal line.

[0086] S203, counting the total number of successful search results obtained within a preset time period.

[0087] S204, determining a computing performance test result based on the total number of times.

[0088] S205, outputting the computing performance test results to the test interface.

[0089] In passing Figure 1 After the method of the illustrated embodiment determines the running performance test result, the obtained computing performance test result can be output to a test interface, which is a manual interaction interface. In this way, the user can intuitively see the performance of the electronic device in solving specific problems such as the Queen's problem from the test interface. Furthermore, if the computing performance test result of the electronic device is very good, the electronic device can be selected to handle more complex specific problems.

[0090] For ease of understanding, the computing performance testing method provided by the embodiment of the present invention is introduced below in conjunction with a specific example. Taking the use of AnTuTu evaluation software to evaluate a PC as an example, the AnTuTu evaluation software uses the Queen's problem performance test as a test item in the performance evaluation.

[0091] First, the user manually opens the AnTuTu testing software and clicks the test button to start the test.

[0092] Secondly, run the computing performance test method:

[0093] The first step is to input the order N and the timeout period (i.e. the preset duration).

[0094] The second step is to start the timer, record the start time, and clear the counter C=0.

[0095] The third step is to clear the placement point set. The placement point set stores the positions where the queens have been placed, and is a first-in, last-out stack structure.

[0096] The fourth step is to start searching using the backtracking method. The backtracking method is as follows:

[0097] (1) The first row is the current row.

[0098] (2) Search the current row. The specific steps are as follows.

[0099] (3) Determine whether it is in a safe state after placing the queen at the current position (that is, the position is occupied). If so, execute step (4); otherwise, terminate this step and return to continue searching the previous row.

[0100] (4) Place the queen (i.e., set the current position to occupied state) and add the current position to the placement point set.

[0101] (5) Determine whether all queens have been placed (i.e., one position in each row is occupied and in a safe state). If so, add 1 to the counter and proceed to step (7). If not, proceed to step (6).

[0102] (6) The next row is the current row and we try to place the queen. This step is a recursive operation and will jump to step (2) to start execution.

[0103] (7) Move the position where the queen is placed in the last row out of the placement point set (because the placement point set is a stack structure, you only need to pop the stack).

[0104] Step 5: Determine whether the timeout period has been reached. If not, continue with step 3. If it has been reached, end this step and record the end time.

[0105] Step 6. Calculate the average completion speed: Average completion speed = total number of times / (end time - start time).

[0106] Step 7: Output the computing performance test result to the test interface, wherein the computing performance test result is a test score determined based on the average completion speed.

[0107] Finally, check out the results of the evaluation:

[0108] 1) Total processor performance score

[0109] 2) Common algorithms used by processors

[0110] 3) Processor single core performance

[0111] 4) Processor multi-core performance

[0112] Among them, the processor single-core performance test item includes the computing performance test method of the present invention.

[0113] Based on the above method embodiment, the present invention provides a computing performance testing device, such as Figure 3 As shown, the device may include:

[0114] An acquisition module 310 is used to acquire a preset virtual chessboard order;

[0115] The operation module 320 is used to search the virtual chessboard based on the virtual chessboard order, and obtain a successful search result that the occupied positions on the virtual chessboard that meet the virtual chessboard order are in a safe state, wherein the safe state means that any two occupied positions are in different rows, different columns, and are not on the same diagonal line;

[0116] A statistics module 330 is used to count the total number of successful search results obtained within a preset time period;

[0117] The determination module 340 is used to determine the computing performance test result based on the total number of times.

[0118] Optionally, the acquisition module 310 may be specifically used to acquire processor performance parameters; and set the virtual chessboard order according to the processor performance parameters.

[0119] Optionally, the operation module 320 can be specifically used to start searching from the first position of the first row of the virtual chessboard; if the current position in the current row searched is occupied and is in a safe state, the current position is set to an occupied state, and the current position is added to an occupied point set, wherein the occupied point set is used to record positions in an occupied state; if no position in the current row is occupied and is in a safe state, then the search is returned to the previous row to continue, and the position in the previous row that has been added to the occupied point set is removed from the occupied point set to clear the occupied state of the position; if the current row is not the last row, the search is continued to the next row; if the current row is the last row, the current position is removed from the occupied point set to return to the previous row to continue searching.

[0120] Optionally, the device may further include:

[0121] A start module is used to start the timer and clear the counter;

[0122] The clearing module is used to clear the occupied point set;

[0123] The statistical module 330 can be specifically used to add 1 to the value of the counter if the current position in the last row is occupied and is in a safe state after the search; if the timing duration of the timer has not reached the preset duration, return to execute the step of clearing the occupied point set; if the timing duration of the timer reaches the preset duration, read the total number of successful search results obtained within the preset duration from the counter.

[0124] Optionally, the determination module 340 can be specifically used to calculate the average completion speed based on the total number of times and the preset duration; based on the average completion speed, determine the computing performance test result, wherein the computing performance test result is a test score, and the test score is proportional to the average completion speed.

[0125] Optionally, the device may further include:

[0126] The output module is used to output the computing performance test results to the test interface.

[0127] By applying the embodiment of the present invention, by obtaining a preset virtual chessboard order, searching the virtual chessboard based on the virtual chessboard order, a successful search result is obtained for an occupied position on the virtual chessboard that meets the virtual chessboard order and is in a safe state, wherein a safe state refers to: any two occupied positions are in different rows, different columns, and are not on the same diagonal line, and the total number of successful search results obtained within a preset time length is counted, and based on the total number of times, the computing performance test result is determined. By searching the virtual chessboard, a successful search result for an occupied position on the virtual chessboard that meets the virtual chessboard order and is in a safe state is obtained, and then the total number of successful search results that can be obtained within a preset time length is counted. Based on the total number of times, the ability of the electronic device to solve the Queen's problem can be tested, that is, how many successful search results can be obtained within a period of time, thereby achieving a performance test of the electronic device in solving specific problems, especially a performance test in solving the Queen's problem.

[0128] The embodiment of the present invention further provides an electronic device, such as Figure 4 As shown, it includes a processor 401 and a memory 402, wherein the memory 402 is used to store computer programs; the processor 401 is used to implement the above-mentioned computing performance testing method when executing the computer program stored in the memory 402.

[0129] The memory may include a RAM (Random Access Memory), or may include a NVM (Non-volatile Memory), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the processor.

[0130] The above-mentioned processor can be a general-purpose processor, including CPU, NP (Network Processor), etc.; it can also be a DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0131] In this embodiment, the processor can achieve the following by reading the computer program stored in the memory and running the computer program: by obtaining the preset virtual chessboard order, searching the virtual chessboard based on the virtual chessboard order, and obtaining the search success result that the occupied position on the virtual chessboard that meets the virtual chessboard order is in a safe state, wherein the safe state means: any two occupied positions are in different rows, different columns, and not on the same diagonal line, and the total number of successful search results obtained within the preset time length is counted, and the computing performance test result is determined based on the total number of times. By searching the virtual chessboard, the search success result that the occupied position on the virtual chessboard that meets the virtual chessboard order is in a safe state is obtained, and then the total number of successful search results that can be obtained within the preset time length is counted. Based on the total number of times, the ability of the electronic device to solve the queen problem can be tested, that is, how many successful search results can be obtained within a period of time, and the performance test of the electronic device in solving specific problems is realized, especially the performance test in solving the queen problem is realized.

[0132] In addition, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the above-mentioned computing performance testing method is implemented.

[0133] In this embodiment, a computer-readable storage medium stores a computer program that executes the computing performance test method provided by the embodiment of the present invention when running, so that: by obtaining a preset virtual chessboard order, based on the virtual chessboard order, searching the virtual chessboard, obtaining a successful search result that the occupied position on the virtual chessboard that meets the virtual chessboard order is in a safe state, wherein the safe state refers to: any two occupied positions are in different rows, different columns, and not on the same diagonal line, and the total number of successful search results obtained within a preset time length is counted, and the computing performance test result is determined based on the total number of times. By searching the virtual chessboard, a successful search result that the occupied position on the virtual chessboard that meets the virtual chessboard order is in a safe state is obtained, and then the total number of successful search results that can be obtained within the preset time length is counted. Based on the total number of times, the ability of the electronic device to solve the queen problem can be tested, that is, how many successful search results can be obtained within a period of time, and the performance test of the electronic device in solving specific problems is realized, especially the performance test in solving the queen problem is realized.

[0134] In another embodiment of the present invention, a computer program product including instructions is provided, which enables the computer to execute the above-mentioned computing performance testing method when it is run on a computer.

[0135] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, DSL (Digital Subscriber Line, digital subscriber line)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD (Digital Versatile Disc)), or a semiconductor medium (eg, an SSD (Solid State Disk)).

[0136] As for the computing performance testing device, electronic device, computer-readable storage medium and computer program product embodiments, since the method contents involved are basically similar to the aforementioned method embodiments, the description is relatively simple and the relevant parts can be referred to the partial description of the method embodiments.

[0137] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or 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.

[0138] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computing performance test device, electronic device, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0139] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A computing performance testing method, characterized in that: The method comprises: Get the preset virtual chessboard order; Based on the virtual chessboard order, the virtual chessboard is searched to obtain a successful search result that the occupied positions on the virtual chessboard that meet the virtual chessboard order are in a safe state, wherein the safe state means that any two occupied positions are in different rows, different columns, and not on the same diagonal line; Count the total number of successful search results obtained within the preset time period; Based on the total number of times, determining a computing performance test result, wherein the total number of successful search results obtained within a preset time period is proportional to the operating performance of the electronic device; The step of searching the virtual chessboard based on the virtual chessboard order to obtain a successful search result that the occupied positions on the virtual chessboard that meet the virtual chessboard order are in a safe state includes: Start searching from the first position of the first row of the virtual chessboard; If the current position in the searched current row is in a safe state after being occupied, the current position is set to an occupied state, and the current position is added to an occupied point set, wherein the occupied point set is used to record the position in an occupied state; If no position in the current row is occupied and in a safe state, then go back to the previous row to continue searching, and remove the position in the previous row that has been added to the occupied point set from the occupied point set, clearing the occupied state of the position; If the current row is not the last row, continue searching for the next row; If the current row is the last row, the current position is moved out of the occupied point set to go back to the previous row to continue searching; Before the step of searching the virtual chessboard based on the virtual chessboard order to obtain a successful search result that the occupied positions on the virtual chessboard that meet the virtual chessboard order are in a safe state, the method further includes: Start the timer and clear the counter to zero; Clear the occupied point set; The step of counting the total number of successful search results obtained within a preset time period includes: If the current position in the last row is found to be occupied and is in a safe state, the value of the counter is incremented by 1; If the timing duration of the timer does not reach the preset duration, returning to execute the step of clearing the occupied point set; If the timing duration of the timer reaches the preset duration, the total number of successful search results obtained within the preset duration is read from the counter.

2. The method according to claim 1, characterized in that The step of obtaining a preset virtual chessboard order comprises: Get processor performance parameters; The virtual chessboard order is set according to the processor performance parameter.

3. The method according to claim 1, characterized in that: The step of determining the computing performance test result based on the total number of times includes: Calculate the average completion speed according to the total number of times and the preset duration; Based on the average completion speed, a computing performance test result is determined, wherein the computing performance test result is a test score, and the test score is proportional to the average completion speed.

4. The method according to any one of claims 1 to 3, characterized in that After the step of determining the computing performance test result based on the total number of times, the method further includes: The computing performance test result is output to the test interface.

5. A computing performance testing device, characterized in that: The device comprises: An acquisition module, used to acquire a preset virtual chessboard order; A calculation module is used to search the virtual chessboard based on the virtual chessboard order, and obtain a successful search result that the occupied positions on the virtual chessboard that meet the virtual chessboard order are in a safe state, wherein the safe state means that any two occupied positions are in different rows, different columns, and are not on the same diagonal line; A statistics module is used to count the total number of successful search results obtained within a preset time period; A determination module, configured to determine a computing performance test result based on the total number of times, wherein the total number of successful search results obtained within a preset time period is proportional to the operating performance of the electronic device; The operation module is specifically used to start searching from the first position of the first row of the virtual chessboard; if the current position in the searched current row is occupied and in a safe state, the current position is set to an occupied state, and the current position is added to an occupied point set, wherein the occupied point set is used to record the position in an occupied state; if no position in the current row is occupied and in a safe state, then the search is returned to the previous row, and the position in the previous row that has been added to the occupied point set is removed from the occupied point set to clear the occupied state of the position; if the current row is not the last row, the search is continued to the next row; if the current row is the last row, the current position is removed from the occupied point set to return to the previous row to continue searching; The device also includes: A start module is used to start the timer and clear the counter; The clearing module is used to clear the occupied point set; The statistical module is specifically used to add 1 to the value of the counter if the current position in the last row is occupied and is in a safe state after searching; if the timing duration of the timer does not reach the preset duration, return to execute the step of clearing the occupied point set; if the timing duration of the timer reaches the preset duration, read the total number of successful search results obtained within the preset duration from the counter.

6. The device according to claim 5, characterized in that The acquisition module is specifically used to acquire processor performance parameters; and set the virtual chessboard order according to the processor performance parameters.

7. The device according to claim 5, characterized in that The determination module is specifically used to calculate an average completion speed according to the total number of times and the preset duration; and determine a computing performance test result based on the average completion speed, wherein the computing performance test result is a test score, and the test score is proportional to the average completion speed.

8. The device according to any one of claims 5 to 7, characterized in that The device also includes: The output module is used to output the computing performance test result to the test interface.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store a computer program; and the processor is used to implement the method according to any one of claims 1 to 4 when executing the computer program stored in the memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.