Target operation detection method and device, computer equipment and storage medium
By analyzing the click data sequence of electronic devices and automatically detecting the click macro key operation, the problems of low detection efficiency and poor fairness in the prior art are solved, and high-precision target operation detection is achieved.
Patent Information
- Application Number
- CN202410014432.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-02
- Publication Date
- 2025-07-04
AI Technical Summary
The prior art is difficult to effectively detect the operation of clicking the macro key in electronic devices, which affects the fairness of e-sports events and typing competitions.
By obtaining the click data sequence of the electronic device, the detection is carried out based on the target conditions corresponding to the target operation, including the detection of operations such as clicking exceeds the limit, single key pressing, multiple key pressing, and repeated clicks. The computer equipment automatically analyzes the click data sequence to determine whether there is a target operation.
Automatic and high-precision detection of target operations is achieved, detection efficiency is improved, and competition fairness is ensured.
Smart Images

Figure CN120255705A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and particularly to a method, device, computer device and storage medium for detecting a target operation. Background Art
[0002] A macro key refers to storing the operation of clicking multiple keys on an input device such as a keyboard, mouse or gamepad through software in the same key, and clicking the macro key can achieve the effect of clicking multiple keys.
[0003] For example, setting a macro key (Q-2ms-W-4ms-E), then clicking this macro key is equivalent to first clicking the Q key, clicking the W key after 2 ms (milliseconds), and then clicking the E key after another 4 ms. Users can set macro keys according to their usage habits to simplify input operations and improve input efficiency.
[0004] However, in many scenarios such as e-sports competitions and typing competitions, the operation of clicking macro keys will affect fairness. Therefore, there is an urgent need to provide an effective method for detecting this operation. Summary of the Invention
[0005] The embodiments of the present application provide a method, device, computer device and storage medium for detecting a target operation, which can automatically and effectively detect the target operation, and improve the detection accuracy and detection efficiency. The technical solutions are as follows:
[0006] On the one hand, a method for detecting a target operation is provided, and the method includes:
[0007] Obtain a click data sequence of an electronic device, where the click data sequence includes at least two pieces of click data, and each piece of click data includes a key code and a click time, and the key code represents the key clicked by the electronic device at the click time;
[0008] Detect the click data sequence based on the target conditions corresponding to the target operation to obtain a detection result of the electronic device;
[0009] Wherein, the target operation refers to the operation of clicking a macro key, the target condition is the condition satisfied by the click data sequence of the target operation, and the detection result indicates whether the target operation exists in the electronic device.
[0010] On the other hand, a device for detecting a target operation is provided, and the device includes:
[0011] A data acquisition module, configured to obtain a click data sequence of an electronic device, where the click data sequence includes at least two pieces of click data, and each piece of click data includes a key code and a click time, and the key code represents the key clicked by the electronic device at the click time;
[0012] A detection module, configured to detect the click data sequence based on a target condition corresponding to the target operation, and obtain a detection result of the electronic device;
[0013] Wherein, the target operation refers to an operation of clicking a macro key, the target condition is a condition satisfied by the click data sequence of the target operation, and the detection result indicates whether the target operation exists in the electronic device.
[0014] In a possible implementation manner, the target condition includes a first target condition corresponding to a click overrun operation, and the first target condition is that the number of key codes corresponding to click times within the same target duration is greater than a first target number;
[0015] The detection module includes: a first detection unit, and the first detection unit is configured to:
[0016] Determine the number of key codes corresponding to click times within the same target duration in the click data sequence;
[0017] Detect whether the determined number is greater than the first target number, and obtain a detection result of the click overrun operation.
[0018] In a possible implementation manner, the target condition includes a second target condition corresponding to a single-key simultaneous press operation, and the second target condition is that there are repeated click data, where the repeated click data includes the same key code and the same click time;
[0019] The detection module includes: a second detection unit, and the second detection unit is configured to:
[0020] Detect whether there is repeated click data in the click data sequence, and obtain a detection result of the single-key simultaneous press operation.
[0021] In a possible implementation manner, the target condition includes a third target condition corresponding to a single-key simultaneous press operation, and the third target condition is that the time interval between click times corresponding to the same key code is less than a target time interval;
[0022] The detection module includes: a third detection unit, and the third detection unit is configured to:
[0023] Determine the time interval between click times corresponding to each key code in the click data sequence;
[0024] Detect whether the determined time interval is less than the target time interval, and obtain a detection result of the single-key simultaneous press operation.
[0025] In a possible implementation, the target condition includes a fourth target condition corresponding to a multi-key simultaneous pressing operation, and the fourth target condition is that the number of key codes corresponding to the same click moment is greater than a second target number;
[0026] The detection module includes: a fourth detection unit, and the fourth detection unit is configured to:
[0027] Determine the number of key codes corresponding to each click moment in the click data sequence;
[0028] Detect whether the determined number is greater than the second target number to obtain a detection result of the multi-key simultaneous pressing operation.
[0029] In a possible implementation, the target condition includes a fifth target condition corresponding to a repeated click operation, and the fifth target condition is the existence of a repeated subsequence. In the repeated subsequence, the key codes and the arrangement order of the key codes are the same, and the time intervals between the click moments are the same;
[0030] The detection module includes: a fifth detection unit, and the fifth detection unit is configured to:
[0031] Detect a repeated subsequence in the click data sequence to obtain a detection result of the repeated click operation.
[0032] In a possible implementation, the fifth detection unit is configured to:
[0033] Search for a target sequence in the click data sequence, where the target sequence is a subsequence that repeatedly appears at different positions in the click data sequence and has the longest length;
[0034] When the target sequence is found, determine the repeated subsequence in the target sequence and the number of repetitions corresponding to the repeated subsequence;
[0035] Generate a detection result of the repeated click operation based on the repeated subsequence and the number of repetitions corresponding to the repeated subsequence.
[0036] In a possible implementation, the fifth detection unit is configured to:
[0037] Obtain multiple target numbers, and each target number is an integer greater than 1;
[0038] Group the target sequence according to each target number respectively to obtain a pattern subsequence, and the number of key codes in the pattern subsequence is equal to the target number used for this grouping;
[0039] For each pattern subsequence obtained by grouping, determine the number of repetitions of the pattern subsequence in the target sequence, where the pattern subsequence with the number of repetitions greater than 0 is the repeated subsequence.
[0040] In a possible implementation manner, the fifth detection unit is configured to:
[0041] Determine the repeated subsequence with the number of repetitions greater than the target number of repetitions and the length greater than the target length as the macro sequence;
[0042] Generate a detection result of the repeated click operation, where the detection result of the repeated click operation includes the macro sequence and the number of repetitions of the macro sequence.
[0043] In a possible implementation manner, the fifth detection unit is further configured to:
[0044] In the case where the target sequence is not found in the click data sequence, determine that the detection result of the repeated click operation is that the electronic device does not have the repeated click operation.
[0045] In a possible implementation manner, the target conditions include at least two, and each target condition corresponds to a target operation; the detection module is configured to:
[0046] Determine the historical target operation of the electronic device, where the historical target operation is the target operation that the electronic device has performed;
[0047] Based on the target conditions corresponding to the historical target operation, detect the click data sequence to obtain a detection result of the historical target operation;
[0048] In the case where the detection result of the historical target operation is that the electronic device has the historical target operation, the detection ends.
[0049] In a possible implementation manner, the target conditions include at least two, and each target condition corresponds to a target operation; the detection module is configured to:
[0050] Based on the target conditions corresponding to at least two target operations, detect the click data sequence to obtain detection results of the at least two target operations;
[0051] Based on the detection results of the at least two target operations, generate a detection result of the electronic device, where the detection result at least includes the target operations existing in the electronic device.
[0052] In a possible implementation manner, the device further includes:
[0053] A data receiving module, configured to receive the click data uploaded by the electronic device every first time period;
[0054] A storage module, configured to store the click data in a memory;
[0055] The data acquisition module is configured to, every second time period, acquire a sequence of click data of the electronic device from the memory, where the sequence of click data includes the click data stored within the second time period before the current moment;
[0056] Wherein, the second time period is greater than the first time period.
[0057] On the other hand, a computer device is provided, which includes a processor and a memory. At least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the operations performed by the target operation detection method as described in the above aspect.
[0058] On the other hand, a computer-readable storage medium is provided. At least one computer program is stored in the computer-readable storage medium, and the at least one computer program is loaded and executed by a processor to implement the operations performed by the target operation detection method as described in the above aspect.
[0059] On the other hand, a computer program product is provided, which includes a computer program. The computer program is loaded and executed by a processor to implement the operations performed by the target operation detection method as described in the above aspect.
[0060] An embodiment of the present application provides a solution for detecting a target operation. By acquiring a sequence of click data of an electronic device and detecting the sequence of click data based on a target condition corresponding to the target operation, the obtained detection result can indicate whether there is a target operation on the electronic device, that is, an operation of clicking a macro key. The present application can automatically and effectively detect the target operation, improve the detection accuracy, and does not require a tester to detect the electronic device and each key, thereby improving the detection efficiency. Description of the Drawings
[0061] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0062] Figure 1 It is a schematic diagram of an implementation environment provided by an embodiment of the present application;
[0063] Figure 2 It is a schematic diagram of the interface of an application provided by an embodiment of the present application;
[0064] Figure 3 It is a flowchart of a target operation detection method provided by an embodiment of the present application;
[0065] Figure 4 It is a flowchart of another target operation detection method provided by an embodiment of the present application;
[0066] Figure 5 It is a schematic diagram of the operation process for detecting repeated click operations provided by an embodiment of the present application;
[0067] Figure 6 It is a flowchart of another target operation detection method provided by an embodiment of the present application;
[0068] Figure 7 It is a schematic diagram of the structure of a server provided by an embodiment of the present application;
[0069] Figure 8 It is a schematic diagram of a detection page provided by an embodiment of the present application;
[0070] Figure 9 It is a schematic diagram of the operation process for detecting a target operation provided by an embodiment of the present application;
[0071] Figure 10 It is a schematic diagram of the structure of a target operation detection device provided by an embodiment of the present application;
[0072] Figure 11 It is a schematic diagram of the structure of another target operation detection device provided by an embodiment of the present application;
[0073] Figure 12 It is a schematic diagram of the structure of a terminal provided by an embodiment of the present application;
[0074] Figure 13 It is a schematic diagram of the structure of a server provided by an embodiment of the present application. Detailed implementation manners
[0075] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.
[0076] It can be understood that the terms "first", "second", etc. used in the present application can be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the present application, the first target condition can be referred to as the second target condition, and similarly, the second target condition can be referred to as the first target condition.
[0077] Among them, "at least two" means two or more. For example, at least two target conditions can be two target conditions, three target conditions, etc., which are any integer greater than or equal to two. "Each" means each one among at least two. For example, each target condition means each one among at least two target conditions. If there are three target conditions for at least two target conditions, then each target condition means each one among the three target conditions.
[0078] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, input data, etc.), and signals (including but not limited to signals transmitted between user terminals and other devices) involved in this application are all fully authorized by users or relevant parties, and the collection, use, and processing of relevant data need to comply with relevant laws, regulations, and standards of relevant countries and regions.
[0079] Artificial Intelligence (AI) is a theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science. It attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines to enable machines to have the functions of perception, reasoning, and decision-making.
[0080] Artificial intelligence technology is an interdisciplinary subject with a wide range of fields, including both hardware-level technologies and software-level technologies. Artificial intelligence basic technologies generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, pre-trained model technology, operation / interaction systems, mechatronics, etc. Among them, the pre-trained model is also called the large model or the basic model, and after fine-tuning, it can be widely applied to downstream tasks in various directions of artificial intelligence. Artificial intelligence software technology mainly includes several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning, autonomous driving, and intelligent transportation.
[0081] With the research and progress of artificial intelligence technology, artificial intelligence technology is being studied and applied in multiple fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, driverless, autonomous driving, drones, digital twins, virtual humans, robots, artificial intelligence-generated content, conversational interactions, smart healthcare, smart customer service, game AI, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0082] The target operation detection method provided by the embodiments of the present application is used in a computer device. Optionally, the computer device is a terminal or a server. Optionally, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, the terminal is a smart phone, computer, laptop, desktop computer, smart speaker, smart watch, intelligent voice interaction device, smart home appliance, vehicle terminal, aircraft, etc., but is not limited thereto. The embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, intelligent transportation, assisted driving, games or e-sports, etc.
[0083] In a possible implementation manner, the computer program involved in the embodiments of the present application can be deployed to be executed on a computer device, or on multiple computer devices located at one place, or on multiple computer devices distributed at multiple places and interconnected through a communication network. The multiple computer devices distributed at multiple places and interconnected through a communication network can form a blockchain system.
[0084] In a possible implementation manner, the computer device for detecting the target operation in the embodiments of the present application is a node in the blockchain system. The node can store click data and detection results in the blockchain, and then the node or the corresponding node of other devices in the blockchain can query the click data or the detection results by accessing the blockchain.
[0085] Figure 1 is a schematic diagram of an implementation environment provided by the embodiments of the present application. Refer to Figure 1 , the implementation environment includes: an electronic device 101, a computer device 102, and an input device 103. The electronic device 101 is connected to the computer device 102 through a wired network or a wireless network, and the electronic device 101 is connected to the input device 103 through a wired cable or a wireless network.
[0086] Among them, the electronic device 101 is a smart phone, a tablet computer, a laptop computer, a desktop computer, a game console, a smart TV, etc., but is not limited thereto. The input device 103 is a device external to the electronic device, including devices with input functions such as a keyboard, a mouse, or a game pad.
[0087] During the process of using the electronic device 101, the user can click a button on the input device 103, so as to input the character corresponding to the button into the electronic device 101, and the electronic device 101 will also obtain click data. The click data includes a button code and a click time. The button code represents the button clicked at the click time and is sent to the computer device 102. The computer device 102 can detect the click data to determine whether there is a target operation on the electronic device 101, that is, to determine whether there is a target operation on the input device 103.
[0088] The above embodiments only take the electronic device 101 connected to the input device 103 as an example. In another embodiment, the electronic device 101 is not connected to the input device 102, and the electronic device 101 performs an operation of clicking a button through a locally configured input system. The input system is configured with a virtual keyboard, and the user can input characters by clicking the buttons on the virtual keyboard. In this case, the computer device 102 can also detect the click data of the electronic device 101 to determine whether there is a target operation on the input system of the electronic device 101.
[0089] In some embodiments, the electronic device 101 installs a detection application. The detection application is associated with the computer device 102. The electronic device collects click data through the detection application and sends it to the computer device 102. The computer device 102 stores the received click data, thereby detecting the click data sequence of the electronic device 101 to obtain a detection result. Among them, the detection application has the function of collecting click data.
[0090] In a possible implementation manner, the electronic device 101 installs a detection application and a target application. The target application is an e-sports game application or other applications. During the operation of the target application, since the user is required not to click the macro key to complete the operation, the electronic device collects the click data of the electronic device 101 during the operation of the target application through the detection application and sends it to the computer device 102 for detection by the computer device 102 to obtain a detection result. After the target application completes the operation, the detection application can stop collecting click data.
[0091] The embodiments of the present application are applied to detect the click operation of an electronic device in a game scenario or an e-sports scenario.
[0092] For example, in the scenario of an e-sports competition, to ensure the fairness of the e-sports competition, the competition rules stipulate that participating players cannot set macro keys on electronic devices to perform inputs by clicking the macro keys. Therefore, a detection application and an e-sports game application will be installed on the electronic devices used by the participating players. The schematic diagram of the interface of the detection application is as shown in Figure 2 shown. By clicking the start competition control in the detection application, the e-sports game application can be launched, and the competition can be carried out through the e-sports game application. During the competition, the participating players will click the keys of the electronic device. Moreover, the detection application collects the click data of the electronic device and uploads it to the server, and the server detects the click data to determine whether the participating players have target operations. If the participating players have target operations, points may be deducted from the participating players or the competition results of the participating players may be cancelled, improving the fairness of the competition.
[0093] Figure 3 Figure 3 Figure 3 is a flowchart of a target operation detection method provided by an embodiment of the present application. The embodiment of the present application is executed by a computer device. Refer to
[0094] 301. The computer device obtains a click data sequence of the electronic device.
[0095] The embodiment of the present application is applied to the scenario where the computer device detects the click data sequence of the electronic device.
[0096] Among them, the set of multiple click data is the click data sequence. The click data sequence includes at least two click data, and each click data represents an operation of clicking a key on the electronic device. Each click data includes a key code and a click time. The key code represents the key clicked by the electronic device at the click time. Different keys correspond to different key codes. Therefore, the key code is the unique identifier of the key, and the unique key can be determined according to the key code. In addition, the key code can be in the form of characters or numbers, and the embodiment of the present application does not limit this.
[0097] For example, the three click data in the click data sequence are respectively {"t": 1695700249164, "k": 77}, {"t": 1695700249164, "k": 188}, {"t": 1695700249188, "k": 78}, where t is the millisecond timestamp representing the click time and k is the key code.
[0098] 302. The computer device detects the click data sequence based on the target conditions corresponding to the target operation to obtain the detection result of the electronic device.
[0099] Among them, the operation of clicking multiple buttons on an input device such as a keyboard, mouse, or gamepad is stored in the same button. By clicking this one button, the effect of clicking multiple buttons can be achieved. Such a button can be called a macro button. The target operation refers to the operation of clicking the macro button, and the target condition is the condition satisfied by the click data sequence of the target operation. Then, based on the target condition, the click data sequence is detected to determine whether the click data sequence satisfies the target condition. The detection result can indicate whether there is a target operation on the electronic device.
[0100] The concealment of macro button input is relatively strong, resulting in a relatively high detection difficulty for the operation of clicking the macro button. If manual detection of the target operation is required, the detector needs to perform detection before the game and cannot perform detection during the game. Moreover, the detector needs to detect the electronic device, click each button one by one, and view the input result of each button, which is prone to omissions and requires high requirements for the detection efficiency and detection accuracy of the detector.
[0101] However, the embodiment of the present application provides a solution for detecting the target operation. By obtaining the click data sequence of the electronic device and detecting the click data sequence based on the target condition corresponding to the target operation, the obtained detection result can indicate whether there is a target operation on the electronic device, that is, the operation of clicking the macro button. The present application can automatically and effectively detect the target operation, improve the detection accuracy, and does not require the detector to detect the electronic device and each button, thereby improving the detection efficiency.
[0102] Based on the above Figure 3 On the basis of the shown embodiment, the target operation may include at least one type. Correspondingly, the target condition may also include at least one, and each target condition corresponds to one type of target operation. The following will illustrate the detection process for several exemplary target conditions.
[0103] 1. The target condition includes a first target condition corresponding to an over-click operation, and the first target condition is that the number of button codes corresponding to the click times within the same target duration is greater than the first target number.
[0104] A click overrun operation refers to an operation with an excessive number of clicks within a short period of time. The target duration can be any duration, such as 2 milliseconds, 5 milliseconds, etc. The first target quantity is the number of keys that an average person can click within the target duration without clicking a macro key. And the number of key codes corresponding to the click moments within the same target duration is the number of keys clicked by the electronic device within that target duration. Therefore, according to the provisions of the first target condition, if the number of keys clicked by the electronic device in a short period is greater than the first target quantity, it indicates that a click overrun operation has occurred. For example, APM (Actions Per Minute) represents the number of times of clicking keys per minute. Under normal circumstances, reaching several hundred times of hitting the keyboard per minute already belongs to a high-frequency input operation. If the number of times of hitting the keyboard per minute reaches several thousand times, it belongs to an abnormal situation. Therefore, based on whether the APM exceeds the first target quantity, it can be detected whether a click overrun operation has occurred on the electronic device.
[0105] Among them, this first target condition can be set in a configuration file and read by a computer device from the configuration file. Technical personnel can update the target duration and the first target quantity in this first target condition in the configuration file according to requirements. In a possible implementation manner, the first target quantity is set according to the game type of the current e-sports event or according to the stage of the current e-sports event. This is because the click operation frequencies of different types of games are different, or the click operation frequencies in different stages of the same game are different. By setting a reasonable operation frequency according to the game type or stage of the current e-sports event, it can effectively discover that the operation frequency of e-sports players does not meet the requirements of normal game operations, thereby effectively detecting abnormal operations.
[0106] Then refer to Figure 4 The above step 302 includes:
[0107] 3021. The computer device determines the number of key codes corresponding to the click moments within the same target duration in the click data sequence, detects whether the determined number is greater than the first target quantity, and obtains the detection result of the click overrun operation.
[0108] Among them, if the number of key codes corresponding to the click moments within the same target duration is greater than the first target quantity, the detection result of the click overrun operation is that there is a click overrun operation on the electronic device. If the number of key codes corresponding to the click moments within the same target duration is not greater than the first target quantity, the detection result of the click overrun operation is that there is no click overrun operation on the electronic device.
[0109] In a possible implementation, the click data sequence includes at least two pieces of click data. The click times of at least two pieces of click data can be sorted, and a time window with a length equal to the target duration is created. Using this time window, a set of click times within the time window is selected each time from at least two click times. The selected click times are the click times within the same target duration. Determine the number of key codes corresponding to the selected click times, and detect whether this number is greater than the first target number to obtain the detection result of a set of click times. Then move the time window backward and continue to select a set of click times within the time window from at least two click times, repeating the above detection steps.
[0110] Since a set of detection results can be obtained each time a set of click times is selected, multiple sets of detection results can be obtained after multiple selections. Then the computer device determines the detection result of the click overrun operation based on these multiple sets of detection results. In a possible implementation, when all multiple sets of detection results indicate that there is no click overrun operation on the electronic device, the detection result of the click overrun operation is determined to be that there is no click overrun operation on the electronic device. However, when at least one of the multiple sets of detection results indicates that there is a click overrun operation on the electronic device, the detection result of the click overrun operation is determined to be that there is a click overrun operation on the electronic device.
[0111] In another possible implementation, when the detection result of the click overrun operation is that there is a click overrun operation on the electronic device, the detection result may further include target data. The target data is the number of key codes corresponding to the click times within the same target duration. For example, among multiple sets of click times, if the number of key codes corresponding to the click times of a certain set is greater than the first target number, then this number is used as the target data. The target data is the data required to be detected in the first target condition. Since the target data of the electronic device does not meet the first target condition and it is determined that there is a click overrun operation on the electronic device, so the target data is the reason for the click overrun operation on the electronic device. According to this detection result, the tester can know that the number of times the electronic device clicks the button within a short period of time is the above number, which has exceeded the first target number, so it is determined that there is a click overrun operation on the electronic device.
[0112] In a possible implementation, in order to save detection time, after the computer device finds a set of click times that meet the first target condition in the click data sequence, it can determine that the detection result of the click overrun operation is: there is a click overrun operation on the electronic device, and subsequent other click data will no longer be detected.
[0113] Alternatively, in order to find all click data that meet the first target condition while saving detection time, after the computer device selects a set of click times for detection each time, it continues to select other click times for detection until all click times included in the click data sequence are detected, and then the detection ends.
[0114] The embodiment of the present application provides a solution for detecting click overlimit operations. By setting a first target condition applicable to click overlimit operations, based on the first target condition, it is detected whether the number of key codes corresponding to the click times within the same target duration in the click data sequence is greater than the first target number, and the detection result of the click overlimit operation is obtained, so as to detect click overlimit operations specifically and effectively, and improve the detection accuracy.
[0115] 2. The target condition includes a second target condition corresponding to the single-key simultaneous pressing operation. The second target condition is that there is duplicate click data, where the duplicate click data includes the same key code and the same click time.
[0116] The single-key simultaneous pressing operation refers to the operation of repeatedly clicking the same key at the same moment or within a short period of time. Normally, the same key can only be clicked once within a short period of time and cannot be clicked multiple times. Even if the key is held down all the time, there will still be a time interval. If there is duplicate click data in the click data sequence, it means that the same key has been clicked multiple times at the same moment, which is difficult to achieve normally, and it is very likely to be caused by setting the key as a macro key, which belongs to an abnormal situation. For example, the click data sequence is {"t": 1695700249164, "k": 77}, {"t": 1695700249164, "k": 77}, {"t": 1695700249164, "k": 77}, indicating that the key with the key code 77 has been clicked 3 times at the click time of 1695700249164.
[0117] Therefore, according to the provisions of the second target condition, if there is duplicate click data in the electronic device, it means that a single-key simultaneous pressing operation has occurred. Among them, the second target condition can be set in the configuration file and read by the computer device from the configuration file.
[0118] Then refer to Figure 4 The above step 302 includes:
[0119] 3022. The computer device detects whether there is duplicate click data in the click data sequence to obtain the detection result of the single-key simultaneous pressing operation.
[0120] By comparing the key codes and click times of any two pieces of click data in the click data sequence to determine whether the two pieces of click data are exactly the same, duplicate click data is searched for in the click data sequence. If there is duplicate click data in the click data sequence, the detection result of the single-key simultaneous press operation is that the electronic device has a single-key simultaneous press operation. If there is no duplicate click data in the click data sequence, the detection result of the single-key simultaneous press operation is that the electronic device does not have a single-key simultaneous press operation.
[0121] In a possible implementation manner, to save detection time, after the computer device finds two duplicate pieces of click data in the click data sequence, it can determine that the detection result of the single-key simultaneous press operation is that the electronic device has a single-key simultaneous press operation, and no other duplicate click data will be searched for subsequently.
[0122] Alternatively, to find all duplicate click data while saving detection time, for a piece of click data, after the computer device finds a piece of click data that duplicates it in the click data sequence, it will no longer search for duplicate click data for that piece of click data. Instead, according to the order of the click data in the click data sequence, it searches for another different piece of click data, so as to find all duplicate click data at the fastest speed. In this case, the detection result of the single-key simultaneous press operation determined by the computer device is that the electronic device has a single-key simultaneous press operation, and the detection result can also include the found duplicate click data.
[0123] The embodiment of the present application provides a solution for detecting a single-key simultaneous press operation. By setting a second target condition applicable to the single-key simultaneous press operation, based on the second target condition, it is detected whether there is duplicate click data in the click data sequence, and the detection result of the single-key simultaneous press operation is obtained, effectively detecting the single-key simultaneous press operation in a targeted manner and improving the detection accuracy.
[0124] 3. The target condition includes a third target condition corresponding to the single-key simultaneous press operation. The third target condition is that the time interval between click times corresponding to the same key code is less than the target time interval.
[0125] The single-key simultaneous pressing operation refers to the operation of repeatedly clicking the same button at the same moment or within a short period of time. Under normal circumstances, the same button can only be clicked once within a short period of time and cannot be clicked multiple times. If the same button is clicked multiple times within a short period of time, which is difficult to achieve under normal circumstances, it is very likely caused by setting the button as a macro key. Therefore, according to the provisions of the third target condition, if the time interval between the click moments corresponding to the same button code is less than the target time interval, it means that the same button has been clicked multiple times within a short period of time, indicating that a single-key simultaneous pressing operation has occurred. Among them, the target time interval can be 2 milliseconds, 3 milliseconds, etc., which can be the time interval for a normal person to click the same button twice continuously or set by technical personnel. Among them, the third target condition can be set in the configuration file and read by the computer device from the configuration file. Technical personnel can update the target time interval in the third target condition in the configuration file according to requirements.
[0126] Then refer to Figure 4 , the above step 302 includes:
[0127] 3023. The computer device determines the time interval between the click moments corresponding to each button code in the click data sequence, detects whether the determined time interval is less than the target time interval, and obtains the detection result of the single-key simultaneous pressing operation.
[0128] Among them, the time interval between the click moments corresponding to the same button code includes: after the multiple click moments corresponding to the same button code are arranged in order, the time interval between any two adjacent click moments.
[0129] If the time interval between the click moments corresponding to the same button code is less than the target time interval, the detection result of the single-key simultaneous pressing operation is that there is a single-key simultaneous pressing operation on the electronic device; if the time interval between the click moments corresponding to the same button code is not less than the target time interval, the detection result of the single-key simultaneous pressing operation is that there is no single-key simultaneous pressing operation on the electronic device.
[0130] In a possible implementation, the click data sequence includes at least two key codes. For each key code, it is detected whether the time interval between the click moments corresponding to the key code is less than the target time interval, and the detection result corresponding to the key code is obtained. After multiple detections, the detection results corresponding to multiple key codes can be obtained, and then the computer device determines the detection result of the single-key simultaneous pressing operation based on the detection results corresponding to the multiple key codes. In a possible implementation, when the detection results corresponding to multiple key codes all indicate that there is no single-key simultaneous pressing operation on the electronic device, the detection result of the single-key simultaneous pressing operation is determined as that there is no single-key simultaneous pressing operation on the electronic device, and when at least one of the detection results corresponding to the multiple key codes indicates that there is a single-key simultaneous pressing operation on the electronic device, the detection result of the single-key simultaneous pressing operation is determined as that there is a single-key simultaneous pressing operation on the electronic device.
[0131] In another possible implementation, when the detection result of the single-key simultaneous pressing operation is that there is a single-key simultaneous pressing operation on the electronic device, the detection result may further include the key code whose time interval between the corresponding click moments is less than the target time interval, and the click moment corresponding to the key code, so that according to the detection result, the tester can know that the electronic device has clicked the key within a short time and the number of clicks exceeds the normal number, so it is determined that there is a single-key simultaneous pressing operation on the electronic device.
[0132] In a possible implementation, in order to save the detection time, after the computer device detects any key code that meets the third target condition in the click data sequence, it can determine that the detection result of the single-key simultaneous pressing operation is: there is a single-key simultaneous pressing operation on the electronic device, and no other key codes will be detected subsequently.
[0133] Alternatively, in order to find all key codes that meet the third target condition while saving detection time, after the computer device detects whether the time interval between the click times corresponding to a key code is less than the target time interval for one key code, it continues to detect other key codes until all the key codes included in the click data sequence are detected and the detection ends. In this case, if the detection result of the single-key simultaneous press operation determined by the computer device is that there is a single-key simultaneous press operation on the electronic device, the detection result may further include target data. The target data includes the key code whose time interval between the corresponding click times is less than the target time interval, and may also include the time interval between the click times corresponding to the key code. The target data is the data required to be detected in the third target condition. Since the target data of the electronic device does not meet the third target condition and it is determined that there is a single-key simultaneous press operation on the electronic device, the target data is the reason for the single-key simultaneous press operation on the electronic device. According to this detection result, the tester can know that the same key on the electronic device is clicked within a short time, so it is determined that there is a single-key simultaneous press operation on the electronic device.
[0134] Another solution for detecting the single-key simultaneous press operation is provided in the embodiments of the present application. By setting the third target condition applicable to the single-key simultaneous press operation, based on the third target condition, it is detected whether the time interval between the click times corresponding to each key code in the click data sequence is less than the target time interval, and the detection result of the single-key simultaneous press operation is obtained, so as to detect the single-key simultaneous press operation targeted and effectively, and improve the detection accuracy.
[0135] 4. The target condition includes the fourth target condition corresponding to the multi-key simultaneous press operation, and the fourth target condition is that the number of key codes corresponding to the same click time is greater than the second target number.
[0136] The multi-key simultaneous press operation refers to an operation of clicking too many keys at the same time or within a short time. For example, the click data sequence is {"t": 1695700249164, "k": 77}, {"t": 1695700249164, "k": 78}, {"t": 1695700249164, "k": 79}, which means that the keys corresponding to the three key codes 77, 78, and 79 are pressed simultaneously at the click time of 1695700249164.
[0137] Under normal circumstances, a user of an electronic device has only 10 fingers and can only click 10 buttons at the same time or within a short period. If more than 10 buttons are clicked at the same time or within a short period, it is very likely that some buttons are set as macro buttons. Therefore, according to the provisions of the fourth target condition, if the number of button codes corresponding to the same click moment is greater than the second target number, indicating that too many buttons are clicked at the same time, it means that a multi-button press operation has occurred. Among them, the second target number is 10, or any number greater than 10. Among them, the fourth target condition can be set in a configuration file and read by a computer device from the configuration file. Technicians can update the second target number in the fourth target condition in the configuration file according to requirements.
[0138] Then refer to Figure 4 , the above step 302 includes:
[0139] 3024. The computer device determines the number of button codes corresponding to each click moment in the click data sequence, detects whether the determined number is greater than the second target number, and obtains the detection result of the multi-button press operation.
[0140] If the number of button codes corresponding to the same click moment is greater than the second target number, the detection result of the multi-button press operation is that there is a multi-button press operation on the electronic device. If the number of button codes corresponding to the click moment is not greater than the second target number, the detection result of the multi-button press operation is that there is no multi-button press operation on the electronic device.
[0141] In a possible implementation, the click data sequence includes at least two click moments. For each click moment, determining the number of button codes corresponding to the click moment, that is, the number of buttons clicked simultaneously by the electronic device at the click moment, to obtain the detection result corresponding to the click moment. After multiple detections, detection results corresponding to multiple click moments can be obtained. Then the computer device determines the detection result of the multi-button press operation based on the detection results corresponding to the multiple click moments. In a possible implementation, when the detection results corresponding to multiple click moments all indicate that there is no multi-button press operation on the electronic device, the detection result of the multi-button press operation is determined to be that there is no multi-button press operation on the electronic device. When at least one of the detection results corresponding to multiple click moments indicates that there is a multi-button press operation on the electronic device, the detection result of the multi-button press operation is determined to be that there is a multi-button press operation on the electronic device.
[0142] In another possible implementation, when the detection result of the multi-key simultaneous pressing operation indicates that there is a multi-key simultaneous pressing operation on the electronic device, the detection result may further include the click moments at which the number of corresponding key codes is greater than the second target number, and the key codes corresponding to the click moments. Based on this detection result, the tester can know that multiple keys are simultaneously clicked on the electronic device at the click moment, and the number of clicked keys exceeds the normal number, so it is determined that there is a multi-key simultaneous pressing operation on the electronic device.
[0143] In one possible implementation, to save detection time, after the computer device detects any click moment that meets the fourth target condition in the click data sequence, it can determine that the detection result of the multi-key simultaneous pressing operation is that there is a multi-key simultaneous pressing operation on the electronic device, and subsequent click moments will not be detected.
[0144] Alternatively, to find all click moments that meet the fourth target condition while saving detection time, the computer device, after detecting whether the number of key codes corresponding to a click moment is greater than the second target number for one click moment, continues to detect other click moments until all click moments included in the click data sequence are detected and the detection ends. In this case, if the detection result of the multi-key simultaneous pressing operation determined by the computer device is that there is a multi-key simultaneous pressing operation on the electronic device, the detection result may further include target data. The target data includes the click moments at which the number of corresponding key codes is greater than the second target number, and may also include the number of key codes corresponding to the click moments. The target data is the data required to be detected in the fourth target condition. Since the target data of the electronic device does not meet the fourth target condition and it is determined that there is a multi-key simultaneous pressing operation on the electronic device, the target data is the reason for the multi-key simultaneous pressing operation on the electronic device. Based on this detection result, the tester can know that multiple keys are simultaneously clicked on the electronic device at the click moment, and the number of clicked keys exceeds the normal number, so it is determined that there is a multi-key simultaneous pressing operation on the electronic device.
[0145] The embodiment of the present application provides a solution for detecting multi-key simultaneous pressing operations. By setting the fourth target condition applicable to multi-key simultaneous pressing operations, based on the fourth target condition, it is detected whether the number of key codes corresponding to each click moment in the click data sequence is greater than the second target number, and the detection result of the multi-key simultaneous pressing operation is obtained, which effectively and specifically detects multi-key simultaneous pressing operations and improves the detection accuracy.
[0146] 5. The target condition includes the fifth target condition corresponding to the repeated click operation. The fifth target condition is the existence of a repeated subsequence. In the repeated subsequence, the key codes and the arrangement order of the key codes are the same, and the time intervals between the click moments are the same.
[0147] A part of the sequence is a subsequence. For example, {"t": 1688720167758, "k": 87}, {"t": 1688720167768, "k": 69} is a subsequence of {"t": 1688720167748, "k": 81}, {"t": 1688720167758, "k": 87}, {"t": 1688720167768, "k": 69}.
[0148] The repeated click operation refers to an operation with repeated subsequences. A repeated subsequence is a subsequence that appears repeatedly in the sequence. In a repeated subsequence, the key codes and the order of these key codes are the same, and the time intervals between click times are the same. For example, if the click data sequence is {"t": 1688720167748, "k": 81}, {"t": 1688720167758, "k": 87}, {"t": 1688720167768, "k": 69}, {"t": 1688720167873, "k": 81}, {"t": 1688720167883, "k": 87}, {"t": 1688720167773, "k": 22}, then the subsequence composed of the two key codes 81 and 87 repeats twice, and the time interval between the two keys is 10 milliseconds each time.
[0149] Normally, when the user clicks the same key combination multiple times, it will cause repeated key code combinations to appear at different positions in the click data sequence. The key codes and the order of the key codes in these key code combinations are the same, but it is difficult to make the time intervals between the click times corresponding to the key codes the same. Among them, the time interval between click times includes: after the multiple click times corresponding to the multiple key codes in the key code combination are arranged in order, the time interval between any two adjacent click times. If the key codes and the order of the key codes are the same, and the time intervals between click times are also the same, it is very likely that it is caused by setting the key combination to a macro key. Therefore, according to the provisions of the fifth target condition, if there is a repeated subsequence in the click data sequence, it means that a repeated click operation has occurred.
[0150] Among them, the fifth target condition can be set in the configuration file and read by the computer device from the configuration file.
[0151] Then refer to Figure 4 , the above step 302 includes:
[0152] 3025. The computer device detects the repeated subsequences in the click data sequence to obtain the detection result of the repeated click operation.
[0153] In a possible implementation, step 3025 includes: obtaining multiple target numbers, each target number being an integer greater than 1. For example, the multiple target numbers include each integer from 2 to n, where n is the number of click data in the click data sequence. Group the click data sequence according to each target number respectively to obtain pattern subsequences, and the number of key codes in the pattern subsequence is equal to the target number used in this grouping. For each pattern subsequence obtained by grouping, determine the number of repetitions of the pattern subsequence in the click data sequence, where the pattern subsequence with the number of repetitions greater than 0 is a repeated subsequence.
[0154] For example, if the target number is 2, then every two adjacent click data in the click data sequence form a pattern subsequence; if the target number is 3, then every three adjacent click data in the click data sequence form a pattern subsequence, and so on, to obtain pattern subsequences corresponding to multiple target numbers. For any pattern subsequence, the initial number of repetitions is 0. If in other pattern subsequences, a pattern subsequence that is repeated with this pattern subsequence is found, that is, another pattern subsequence with the same key codes and the same arrangement order of key codes and the same time interval between click times, then the number of repetitions of this pattern subsequence is incremented by 1, and so on. After the detection is completed, the number of repetitions of each pattern subsequence can be determined, and thus the detection result of the repeated click operation can be determined based on the number of repetitions of each pattern subsequence.
[0155] In the case where there is a pattern subsequence with the number of repetitions greater than 0, determine this pattern subsequence as a repeated subsequence, and determine the detection result of the repeated click operation as: there is a repeated click operation on the electronic device. In the case where there is no pattern subsequence with the number of repetitions greater than 0, determine the detection result of the repeated click operation as: there is no repeated click operation on the electronic device.
[0156] In another possible implementation, considering that the length of the click data sequence is relatively long, directly searching for repeated subsequences in the click data sequence involves a large amount of work and results in a slow detection speed. Therefore, first shorten the click data sequence, and then detect the target sequence obtained after shortening. That is, the computer device searches for the target sequence in the click data sequence, where the target sequence is the longest subsequence that appears repeatedly at different positions in the click data sequence. If there are repeated subsequences in the click data sequence, the repeated subsequences must also be located in the target sequence. Therefore, in the case where the target sequence is found, determine the repeated subsequences in the target sequence and the corresponding number of repetitions of the repeated subsequences, and generate the detection result of the repeated click operation based on the repeated subsequences and the corresponding number of repetitions of the repeated subsequences. Here, the length of the sequence refers to the number of click data included in the sequence.
[0157] In a possible implementation, the computer device uses a variant of the LCS algorithm to find the target sequence from the click data sequence. Among them, LCS (Longest Common Subsequence) refers to the subsequence that appears in both sequences and has the longest length. For example, if the x sequence is ABCBDAB and the y sequence is BDCABA, then the LCS of the two is BCBA. The LCS algorithm is for two sequences to determine the LCS of these two sequences. If the two sequences are the same, the determined LCS is the original sequence itself. The variant of the LCS algorithm is for one sequence to determine the subsequence that appears repeatedly at different positions in the sequence and has the longest length. In the variant of the LCS algorithm, the sequence is used as the first sequence and the second sequence, then the first sequence and the second sequence are the same, and the LCS of the first sequence and the second sequence is determined. Moreover, in order to avoid finding the first sequence itself, a restriction condition is added in the variant of the LCS algorithm. The restriction condition is that the position where the found LCS appears in the first sequence is different from the position where it appears in the second sequence. Therefore, if it is found that the position where a certain data appears in the first sequence is the same as the position where it appears in the second sequence, this data will not be recognized as the repeatedly appearing data and needs to be excluded. Then, when finding the target sequence based on this restriction condition, the first sequence itself will be excluded, and the subsequence with the longest length is determined from other common subsequences, so as to obtain a target sequence shorter than the first sequence. Therefore, the computer device uses the click data sequence as the first sequence and the second sequence respectively, and uses the variant of the LCS algorithm to determine the LCS of the first sequence and the second sequence, which is the target sequence.
[0158] For example, if the first sequence is ABCABC and the second sequence is YFABC, the LCS of the first sequence and the second sequence determined by the ordinary LCS algorithm is ABC. If the click data sequence is ABCABC, then the first sequence and the second sequence are also determined to be ABCABC. At this time, if the LCS determined by the ordinary LCS algorithm is ABCABC, and the LCS determined by the variant of the LCS algorithm is ABC.
[0159] In a possible implementation, in the case of finding the target sequence, determining the repeated subsequences in the target sequence and the corresponding repeated times of the repeated subsequences includes: obtaining multiple target quantities, each target quantity being an integer greater than 1. For example, the multiple target quantities include each integer from 2 to n, where n is the number of click data in the click data sequence. Group the target sequence according to each target quantity respectively to obtain the pattern subsequences, and the number of key codes in the pattern subsequence is equal to the target quantity used in this grouping; for each pattern subsequence obtained by grouping, determine the repeated times of the pattern subsequence in the target sequence, and the pattern subsequence with the repeated times greater than 0 is the repeated subsequence.
[0160] Among them, the process of grouping the target sequences according to each target quantity is the same as the process of grouping the click data sequences according to each target quantity, which will not be elaborated here. In addition, when determining the number of repetitions of the pattern subsequence in the target sequence, it is necessary to first determine the occurrence position of the pattern subsequence in the target sequence. Optionally, the computer device uses the KMP (Knuth-Morris-Pratt) algorithm to determine the occurrence position of the pattern subsequence in the target sequence. The KMP algorithm is an efficient string matching algorithm mainly used to find a shorter pattern string in a longer text string. The core idea of the KMP algorithm is to use the self-information of the pattern string for searching, avoiding backtracking in the text string, thereby improving the matching speed. The time complexity of the KMP algorithm is O(n + m), where n is the length of the target sequence and m is the length of the pattern subsequence, thus avoiding the overly long matching time caused by sequentially searching for the pattern subsequence and improving the matching efficiency.
[0161] In a possible implementation manner, based on the repeated subsequence and the corresponding number of repetitions of the repeated subsequence, a detection result of the repeated click operation is generated, including: determining the repeated subsequence with the number of repetitions greater than the target number of repetitions and the length greater than the target length as the macro sequence, and generating the detection result of the repeated click operation. The detection result of the repeated click operation includes the macro sequence and the number of repetitions of the macro sequence. Among them, the target number of repetitions and the target length can be set by the computer device.
[0162] In another possible implementation manner, based on the repeated subsequence and the corresponding number of repetitions of the repeated subsequence, a detection result of the repeated click operation is generated, including: determining the repeated subsequence with the largest number of repetitions as the macro sequence, and generating the detection result of the repeated click operation. The detection result of the repeated click operation includes the macro sequence and the number of repetitions of the macro sequence. Among them, if the repeated subsequence with the largest number of repetitions includes at least two different repeated subsequences, then the repeated subsequence with the largest number of repetitions and the longest length is determined as the macro sequence. This solution selects the macro sequence that meets the conditions. When displaying the detection result later, the determined macro sequence and the number of repetitions of the macro sequence can be displayed to represent the reason for determining that there is a repeated click operation on the electronic device. It is not necessary to determine all the repeated subsequences as the macro sequence, reducing the amount of information and being able to display the representative macro sequence.
[0163] Of course, each repeated subsequence with a repetition count greater than 0 can also be determined as a macro sequence, so that the detection result of the repeated click operation includes all the detected repeated subsequences. The computer device can adopt any strategy for selecting macro sequences. For example, the strategy for selecting macro sequences can be configured in a configuration file and updated according to the requirements of technicians. The computer device reads the strategy from the configuration file and uses this strategy to select macro sequences.
[0164] It should be noted that the above various possible implementation manners can be combined in any form, and the embodiments of the present application do not limit this. Exemplarily, the embodiments of the present application provide an operation process for detecting repeated click operations, as Figure 5 shown, this operation process includes:
[0165] 1. Use a variant of the LCS algorithm to find the target sequence from the click data sequence. If the target sequence is found, the repeated subsequence must be located in the target sequence. If the target sequence is not found, an empty set is directly obtained, and this detection ends, determining that the electronic device does not have a repeated click operation.
[0166] 2. According to multiple target quantities, combine possible pattern subsequences from the target sequence. For example, take every two click data as a group, then take every three click data as a group, then take every four click data as a group, and so on, listing the possible pattern subsequences in the target sequence.
[0167] 3. Use the KMP algorithm to match each pattern subsequence with the target sequence, determine the occurrence position of the pattern subsequence in the target sequence, and thus determine the repetition count of the pattern subsequence.
[0168] 4. Based on the repetition count of the pattern subsequence, select macro sequences from the pattern subsequences, so as to obtain the detection result of the repeated click operation.
[0169] In addition, in the case where the target sequence is not found in the click data sequence, it means that there is no possibility of the electronic device performing a repeated click operation at all. Then, it is determined that the detection result of the repeated click operation is: the electronic device does not have a repeated click operation. Therefore, the step of finding the target sequence from the click data sequence can not only shorten the sequence length and reduce the workload, but also, in the case where the electronic device does not have a repeated click operation, the target sequence will not be found, and there is no need to execute the subsequent step of finding the pattern subsequence, reducing the complexity and improving the detection speed. For example, let n represent the length of the click data sequence. Using the brute-force matching algorithm to find the repeated subsequence from the click data sequence, the time complexity is O(n 4 +n 3 +n 2+n), while in the case where the embodiment of the present application combines the LCS variant algorithm and the KMP algorithm for detection, when the target sequence is not found in the click data sequence, the time complexity is o(nlogn), and when the target sequence is found in the click data sequence, the time complexity is O(n 3 +n 2 +n 2 logn + n + nlogn). It can be seen that compared with the brute-force matching algorithm, the embodiment of the present application significantly reduces the matching complexity, saves the detection time, and improves the detection efficiency.
[0170] The embodiment of the present application provides a solution for detecting repeated click operations. By setting a fifth target condition applicable to repeated click operations, based on the fifth target condition, the repeated subsequences in the click data sequence are detected to obtain the detection result of the repeated click operation, which effectively and specifically detects the repeated click operation and improves the detection accuracy.
[0171] In addition, first find the target sequence from the click data sequence, and then find the repeated subsequences in the target sequence and determine the corresponding repetition times of the repeated subsequences, which can effectively shorten the sequence length, reduce the workload. Especially when there is no repeated click operation on the electronic device, the target sequence will not be found, and there is no need to perform the subsequent step of finding the pattern subsequence, reducing the complexity. Therefore, this solution saves the detection time and improves the detection efficiency.
[0172] In addition, group the target sequences according to multiple target quantities to list the possible pattern subsequences to avoid omission, and then match the pattern subsequences with the target sequences, which can accurately detect all the repeated subsequences and improve the detection accuracy.
[0173] The above embodiments respectively describe the detection processes of multiple target operations. In the embodiment of the present application, the target operation may include at least one of the above multiple target operations. Therefore, the computer device detects the click data sequence based on the target conditions corresponding to at least one target operation.
[0174] In the case of setting at least two target operations, the detection processes of different target operations can be combined.
[0175] In a possible implementation manner, in the case of at least two target operations, the target conditions include at least two, and each target condition corresponds to one target operation; the computer device can detect the click data sequence respectively based on the target conditions corresponding to at least two target operations to obtain the detection results of each target operation, and then determine the detection result of the electronic device based on the detection results of at least two target operations. The detection result at least includes the target operations existing in the electronic device.
[0176] Among them, when determining the detection result of the electronic device, the detection results of at least two target operations can be directly combined to obtain the detection result of the electronic device, and the detection result of the electronic device includes the detection result of each target operation. Alternatively, the computer device screens out the first detection result from the detection results of multiple target operations, deletes the second detection result, and combines the first detection results to obtain the detection result of the electronic device. Among them, the first detection result indicates that the electronic device has the corresponding target operation, and the second detection result indicates that the electronic device does not have the corresponding target operation. Then, the detection result of the electronic device includes the detection result of the target operation that the electronic device has, and does not include the detection results of other target operations.
[0177] Regarding the format of the detection result, in a possible implementation, the computer device sets a first template detection report corresponding to the first detection result and a second template detection report corresponding to the second detection result. The first detection result indicates that the electronic device has the corresponding target operation, so the first template detection report includes text information for indicating the existence of the corresponding target operation, but does not include the necessary information related to the electronic device itself. This necessary information includes the reason for the existence of the target operation, the account of the electronic device, the time when the electronic device performs the target operation, etc. For example, the first template detection report includes the text information "Player XX has an over-limit click operation, clicking the same button more than ZZ times within YY", where the position of "XX" needs to be filled with the account of the electronic device, the position of "YY" needs to be filled with the target duration, and the position of "ZZ" needs to be filled with the first target quantity. Then, when the computer device determines that the electronic device has the target operation, it obtains the necessary information of the electronic device and assembles this necessary information with the first template detection report to obtain the detection result of the target operation.
[0178] The second detection result indicates that the electronic device does not have the corresponding target operation, so the second template detection report includes text information for indicating the non-existence of the corresponding target operation, such as "This player does not have an over-limit click operation". The information in this second template detection report is complete and does not require additional necessary information of the electronic device. Then, when the computer device determines that the electronic device does not have the target operation, it uses this second template detection report as the detection result of the target operation. Alternatively, if this second template detection report also requires additional necessary information such as the account of the electronic device, then when the computer device determines that the electronic device does not have the target operation, it obtains the necessary information of the electronic device and assembles this necessary information with the second template detection report to obtain the detection result of the target operation.
[0179] The embodiments of the present application perform summary analysis on the detection results of at least two target operations to generate the detection result of the electronic device, which can not only ensure sufficient detection of the target operations and avoid omission, but also reasonably control the amount of information in the final detection result and avoid information redundancy.
[0180] In another possible implementation, the computer device determines the detection order of at least two target operations. According to the detection order, it sequentially detects the click data sequence based on the target conditions corresponding to the target operation with the earliest current detection order, and obtains the detection result of the target operation. When the detection result of the target operation indicates that the electronic device has the target operation, the detection ends and the detection result of the electronic device is obtained. When the detection result of the target operation indicates that the electronic device does not have the target operation, the detection continues according to the detection order until the detection result indicating that the electronic device has the target operation is obtained, or until the detection of the last target operation is completed.
[0181] In a possible implementation, the embodiments of the present application are applied to the scenario of an e-sports competition. The input devices used by participating players, such as keyboards, mice, or gamepads, can be set with macro keys. Therefore, through a set of combined detection schemes, it is detected whether the input devices of the participating players perform operations such as click limit exceeding, single-key simultaneous pressing, multi-key simultaneous pressing, and repeated clicking, so as to detect whether the input devices of the participating players are set with macro keys, and the detection results are submitted to the game referee for the referee to refer to and determine whether there are any illegal operations, which enhances the fairness of the competition.
[0182] In another possible implementation, the computer device determines the target operation to be detected this time from at least two target operations, and detects the click data sequence only based on the target conditions corresponding to the target operation to be detected this time, rather than based on the target conditions corresponding to other target operations. Among them, the target operation to be detected this time can be set in a configuration file, and the computer device reads it from the configuration file. Technical personnel can update the target operations in the configuration file according to requirements.
[0183] In another possible implementation, step 302 above includes: the computer device determines the historical target operations of the electronic device. The historical target operations are the target operations that the electronic device has performed before. Based on the target conditions corresponding to the historical target operations, the click data sequence is detected to obtain the detection result of the historical target operations. When the detection result of the historical target operations indicates that the electronic device has the historical target operations, the detection ends. For example, the computer device queries the historical target operations of the electronic device from the historical detection records. After each detection, the detection records of the electronic device are stored, and the detection records at least include the target operations that the electronic device has performed before.
[0184] Since the electronic device has performed the historical target operation before, it indicates that the possibility of the electronic device performing the target operation again is relatively high. Therefore, the historical target operation is used as the operation to be preferentially detected, and the click data sequence is detected based on the target condition corresponding to the historical target operation. When the detection result of the historical target operation is that the electronic device has the historical target operation, the detection ends, and no other target operations are detected. When the detection result of the historical target operation is that the electronic device does not have the historical target operation, other target operations are detected. The embodiment of the present application selectively detects the target operation according to the user's historical operation habits, realizing a sampling detection scheme and saving the detection time.
[0185] Based on the above Figure 3 and Figure 4 shown embodiments, the embodiment of the present application also provides another method for detecting a target operation, Figure 6 is a flowchart of another method for detecting a target operation provided by the embodiment of the present application. The embodiment of the present application is executed by a computer device. Refer to Figure 6 and the method includes:
[0186] 601. The electronic device uploads click data to the computer device every first time period.
[0187] In the embodiment of the present application, the electronic device sends the click data within the first time period before the current moment to the computer device every first time period, where the first time period is determined by the electronic device or by the computer device.
[0188] In a possible implementation manner, each time the electronic device clicks a button, it collects click data, stores the click data in the memory of the electronic device, and configures a timer. The duration set by the timer is the first time period. Then, according to the timer, the electronic device will obtain the click data from the memory every first time period and send it to the computer device. Among them, the memory can be Redis (Remote Dictionary Server, remote dictionary service) or other types of memories. Among them, Redis is a Key-Value (key-value) type of NoSQL (Not Only Structured Query Language, not just structured query language) storage component.
[0189] 602. The computer device receives the click data uploaded by the electronic device every first time period and stores the click data in the memory.
[0190] Each time the computer device receives click data sent by the electronic device, it first stores the click data in the memory of the computer device. Among them, the memory can be a memory of types such as MySQL (My Structured Query Language), Redis, or COS (Cloud Object Storage).
[0191] In a possible implementation, the schematic structural diagram of the computer device is as Figure 7 shown. The computer device includes an access layer, a logic layer, and a storage layer. The access layer includes a gateway. The logic layer includes a service interface and a detection logic. The storage layer includes at least one memory, such as a memory of types like MySQL, Redis, or COS. The electronic device reports the click data to the computer device through the gateway. After the computer device receives the click data through the access layer, it sends the click data to the logic layer. After receiving the click data through the service interface of the logic layer, it stores it in the memory of the storage layer.
[0192] 603. The computer device obtains the click data sequence of the electronic device from the memory every second time period.
[0193] The click data sequence includes the click data stored within the second time period before the current moment. Among them, the second time period is greater than the first time period. For example, the second time period is an integer multiple of the first time period.
[0194] In a possible implementation, the electronic device is configured with at least two input systems. For example, the electronic device is connected to an input device, and a virtual keyboard is also configured locally on the electronic device. Then, the click data of the electronic device will also be marked with the identifier of the input system to distinguish the click data of different input systems. From the perspective of the computer device, the computer device can distinguish the click data of different input systems according to the identifier of the input system, so as to obtain the click data sequences of at least two input systems respectively, and detect the click data sequences of at least two input systems respectively to determine whether there is a target operation in each input system. Or it can also not distinguish the click data of different input systems, directly form the click data of different input systems into a click data sequence, and perform the detection together.
[0195] 604. The computer device sorts the click data in the click data sequence according to the click time.
[0196] To facilitate the subsequent detection of abnormal click data, before the formal detection, the click data in the click data sequence is first sorted according to the click time.
[0197] In a possible implementation, the click data in the click data sequence is sorted in ascending order of click time. Alternatively, the click data in the click data sequence is sorted in descending order of click time.
[0198] In addition to sorting, the computer device can also perform other preprocessing operations on the click data sequence, such as cleaning invalid click data in the click data sequence.
[0199] 605. The computer device detects the click data sequence based on the target conditions corresponding to the target operation to obtain the detection result of the electronic device.
[0200] The process of step 605 is the same as that of the embodiments shown above Figure 3 and Figure 4 and will not be elaborated here.
[0201] 606. The computer device displays the detection result on the detection page corresponding to the electronic device.
[0202] The detection page is used to display the detection result of the electronic device and can also display other relevant information of the electronic device.
[0203] In a possible implementation, the detection result includes the target operation existing in the electronic device. In addition, the detection result can also include the type of input device used by the electronic device, the account logged in to the electronic device, the target data that causes the electronic device to be determined to have the target operation, the time corresponding to the target operation, etc.
[0204] In another possible implementation, the detection result also includes an exception label, which is used to indicate that the electronic device has the target operation, and different exception labels correspond to different degrees of exception. Therefore, the exception label can also indicate the degree of exception of the electronic device. For example, different exception labels are displayed in different display manners.
[0205] The computer device displays the detection result on the detection page. In a possible implementation, the computer device is a server, and the detection page is a web page. The server publishes the detection result of the electronic device to the web page, and the detection personnel can access the web page using a device to display the detection page and view the detection result of the electronic device. For example, as shown in Figure 8 the detection page includes the referee account and the participating player account, and the warning information includes the time when the participating player performs the target operation, the type of the target operation is the multi-key simultaneous press operation, the number of keys clicked at the same click time is 12, and the 12 keys clicked at the click time are listed.
[0206] In another possible implementation, the computer device is a server, and the detection page is a page in the detection application. The server sends the detection result to the device corresponding to the account of the detector (the device used by the detector) based on the account of the detector. The device corresponding to the account can then display the detection page through the detection application for the detector to view the detection result.
[0207] Optionally, only devices with access permissions can display the detection page, while other devices cannot. For example, the devices of the referees in an e-sports competition have access permissions and can access the detection pages of each participating player.
[0208] In one possible implementation, as Figure 7 shown, the computer device periodically obtains a click data sequence from the memory through the detection logic, detects the click data sequence to obtain a detection result, and displays the detection result.
[0209] In one possible implementation, the embodiments of the present application provide an exemplary operation process. Refer to Figure 9 . The operation process of the embodiments of the present application includes: After the electronic device collects click data, it reports the click data to the server. The server stores the click data in the memory and periodically obtains the click data sequence from the memory according to the timer, and preprocesses the click data sequence, such as sorting the click data in the click data sequence in the order of click time, or cleaning invalid click data, etc. Then, first, based on the first target condition corresponding to the click limit operation, the click data sequence is detected. If an anomaly is detected, an anomaly detection result is generated, and this anomaly detection result indicates that there is a click limit operation on the electronic device, and this round of detection ends. If no anomaly is detected, the click data sequence is detected based on at least one of the second target condition or the third target condition corresponding to the single-key simultaneous press operation. If an anomaly is detected, an anomaly detection result is generated, and this anomaly detection result indicates that there is a single-key simultaneous press operation on the electronic device, and this round of detection ends. If no anomaly is detected, the click data sequence is detected based on the fourth target condition corresponding to the multi-key simultaneous press operation. If an anomaly is detected, an anomaly detection result is generated, and this anomaly detection result indicates that there is a multi-key simultaneous press operation on the electronic device, and this round of detection ends. If no anomaly is detected, the click data sequence is detected based on the fifth target condition corresponding to the repeated click operation. If an anomaly is detected, an anomaly detection result is generated, and this anomaly detection result indicates that there is a repeated click operation on the electronic device, and this round of detection ends. If no anomaly is detected, this round of detection ends, and the detection result is that there is no target operation on the electronic device.
[0210] An embodiment of the present application provides a solution for detecting a target operation. By obtaining a click data sequence of an electronic device and detecting the click data sequence based on a target condition corresponding to the target operation, the obtained detection result can indicate whether the target operation, that is, the operation of clicking a macro key, exists on the electronic device. The present application can automatically and effectively detect the target operation, improve the detection accuracy, and does not require testers to detect the electronic device and each key, thereby improving the detection efficiency.
[0211] Moreover, in the embodiment of the present application, the electronic device uploads click data every first time period and stores it in the computer device first. The computer device obtains the click data sequence every second time period to detect the click data sequence. This asynchronous processing method not only avoids missing click data but also ensures that the accumulated click data in the click data sequence is sufficient for detection and avoids affecting the running speed of the computer device due to excessive reading of click data.
[0212] Figure 10 It is a schematic structural diagram of a target operation detection device provided by an embodiment of the present application. Refer to Figure 10 The device includes:
[0213] A data acquisition module 1001, configured to obtain a click data sequence of the electronic device. The click data sequence includes at least two pieces of click data, and each piece of click data includes a key code and a click time. The key code represents the key clicked by the electronic device at the click time.
[0214] A detection module 1002, configured to detect the click data sequence based on a target condition corresponding to the target operation to obtain a detection result of the electronic device.
[0215] Wherein, the target operation refers to the operation of clicking a macro key, the target condition is the condition satisfied by the click data sequence of the target operation, and the detection result indicates whether the target operation exists on the electronic device.
[0216] In a possible implementation manner, the target condition includes a first target condition corresponding to a click overrun operation. The first target condition is that the number of key codes corresponding to the click times within the same target time period is greater than the first target number.
[0217] Refer to Figure 11 The detection module 1002 includes: a first detection unit 1012. The first detection unit 1012 is configured to:
[0218] Determine the number of key codes corresponding to the click times within the same target time period in the click data sequence.
[0219] Detect whether the determined number is greater than the first target number to obtain a detection result of the click overrun operation.
[0220] In a possible implementation, the target condition includes a second target condition corresponding to the single-key simultaneous pressing operation, and the second target condition is that there is duplicate click data, where the duplicate click data includes the same key code and the same click time;
[0221] See Figure 11 , the detection module 1002 includes: a second detection unit 1022, and the second detection unit 1022 is used for:
[0222] Detect whether there is duplicate click data in the click data sequence to obtain the detection result of the single-key simultaneous pressing operation.
[0223] In a possible implementation, the target condition includes a third target condition corresponding to the single-key simultaneous pressing operation, and the third target condition is that the time interval between the click times corresponding to the same key code is less than the target time interval;
[0224] See Figure 11 , the detection module 1002 includes: a third detection unit 1032, and the third detection unit 1032 is used for:
[0225] Determine the time interval between the click times corresponding to each key code in the click data sequence;
[0226] Detect whether the determined time interval is less than the target time interval to obtain the detection result of the single-key simultaneous pressing operation.
[0227] In a possible implementation, the target condition includes a fourth target condition corresponding to the multi-key simultaneous pressing operation, and the fourth target condition is that the number of key codes corresponding to the same click time is greater than the second target number;
[0228] See Figure 11 , the detection module 1002 includes: a fourth detection unit 1042, and the fourth detection unit 1042 is used for:
[0229] Determine the number of key codes corresponding to each click time in the click data sequence;
[0230] Detect whether the determined number is greater than the second target number to obtain the detection result of the multi-key simultaneous pressing operation.
[0231] In a possible implementation, the target condition includes a fifth target condition corresponding to the repeated click operation, and the fifth target condition is that there is a repeated subsequence, where in the repeated subsequence, the key codes and the arrangement order of the key codes are the same, and the time intervals between the click times are the same;
[0232] See Figure 11 , the detection module 1002 includes: a fifth detection unit 1052, and the fifth detection unit 1052 is used for:
[0233] Detect the repeated subsequences in the click data sequence to obtain the detection result of the repeated click operation.
[0234] In a possible implementation, the fifth detection unit 1052 is configured to:
[0235] Search for a target sequence in the click data sequence, where the target sequence is the subsequence that appears repeatedly at different positions in the click data sequence and has the longest length;
[0236] In the case of finding the target sequence, determine the repeated subsequences in the target sequence and the corresponding number of repetitions of the repeated subsequences;
[0237] Generate the detection result of the repeated click operation based on the repeated subsequences and the corresponding number of repetitions of the repeated subsequences.
[0238] In a possible implementation, the fifth detection unit 1052 is configured to:
[0239] Obtain multiple target quantities, each target quantity being an integer greater than 1;
[0240] Group the target sequence according to each target quantity respectively to obtain pattern subsequences, and the number of key codes in the pattern subsequences is equal to the target quantity used in this grouping;
[0241] For each pattern subsequence obtained by grouping, determine the number of repetitions of the pattern subsequence in the target sequence, where the pattern subsequence with the number of repetitions greater than 0 is the repeated subsequence.
[0242] In a possible implementation, the fifth detection unit 1052 is configured to:
[0243] Determine the repeated subsequences with the number of repetitions greater than the target number of repetitions and the length greater than the target length as macro sequences;
[0244] Generate the detection result of the repeated click operation, and the detection result of the repeated click operation includes the macro sequence and the number of repetitions of the macro sequence.
[0245] In a possible implementation, the fifth detection unit 1052 is further configured to:
[0246] In the case of not finding the target sequence in the click data sequence, determine the detection result of the repeated click operation as: there is no repeated click operation on the electronic device.
[0247] In a possible implementation, the target conditions include at least two, and each target condition corresponds to a target operation; the detection module 1002 is configured to:
[0248] Determine the historical target operation of the electronic device, where the historical target operation is the target operation that the electronic device has ever performed;
[0249] Based on the target conditions corresponding to the historical target operation, detect the click data sequence to obtain the detection result of the historical target operation;
[0250] When the detection result of the historical target operation indicates that the electronic device has a historical target operation, the detection ends.
[0251] In a possible implementation manner, the target conditions include at least two, and each target condition corresponds to a target operation; the detection module 1002 is configured to:
[0252] Based on the target conditions corresponding to at least two target operations, detect the click data sequence to obtain the detection results of at least two target operations;
[0253] Based on the detection results of at least two target operations, generate the detection result of the electronic device, and the detection result at least includes the target operations existing in the electronic device.
[0254] In a possible implementation manner, refer to Figure 11 , the device further includes:
[0255] The data receiving module 1003 is configured to receive the click data uploaded by the electronic device every first time period;
[0256] The storage module 1004 is configured to store the click data in the memory;
[0257] The data acquisition module 1001 is configured to obtain the click data sequence of the electronic device from the memory every second time period, and the click data sequence includes the click data stored within the second time period before the current moment;
[0258] Wherein, the second time period is greater than the first time period.
[0259] It should be noted that: for the target operation detection device provided in the above embodiments, only the above-mentioned division of each functional module is used for illustration. In practical applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the target operation detection device provided in the above embodiments and the embodiments of the target operation detection method belong to the same concept, and the specific implementation process is detailed in the method embodiments and will not be elaborated here.
[0260] An embodiment of the present application further provides a computer device, which includes a processor and a memory. At least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the operations performed in the target operation detection method of the above embodiment.
[0261] Optionally, the computer device is provided as a terminal. Figure 12 The structural schematic diagram of a terminal 1200 provided by an exemplary embodiment of the present application is shown.
[0262] The terminal 1200 includes: a processor 1201 and a memory 1202.
[0263] The processor 1201 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1201 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1201 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1201 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1201 may further include an AI (Artificial Intelligence) processor, and the AI processor is used to process computational operations related to machine learning.
[0264] The memory 1202 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 1202 may further include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1202 is used to store at least one computer program, and the at least one computer program is used to be possessed by the processor 1201 to implement the target operation detection method provided by the method embodiment of the present application.
[0265] In some embodiments, the terminal 1200 may further optionally include: a peripheral device interface 1203 and at least one peripheral device. The processor 1201, the memory 1202, and the peripheral device interface 1203 may be connected through a bus or signal lines. Each peripheral device may be connected to the peripheral device interface 1203 through a bus, signal lines, or a circuit board. Optionally, the peripheral device includes at least one of: a radio frequency circuit 1204, a display screen 1205, a camera assembly 1206, and a power supply 1207.
[0266] The peripheral device interface 1203 can be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1201 and the memory 1202. In some embodiments, the processor 1201, the memory 1202, and the peripheral device interface 1203 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1201, the memory 1202, and the peripheral device interface 1203 can be implemented on a separate chip or circuit board, and this embodiment does not limit this.
[0267] The radio frequency circuit 1204 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1204 communicates with a communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1204 converts an electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1204 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so on. The radio frequency circuit 1204 can communicate with other devices through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: a metropolitan area network, each generation of mobile communication networks (2G, 3G, 4G, and 5G), a wireless local area network, and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1204 may further include a circuit related to NFC (Near Field Communication), and this application does not limit this.
[0268] The display screen 1205 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1205 is a touch display screen, the display screen 1205 also has the ability to collect touch signals on or above the surface of the display screen 1205. The touch signals can be input as control signals to the processor 1201 for processing. At this time, the display screen 1205 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, there can be one display screen 1205, which is arranged on the front panel of the terminal 1200; in other embodiments, there can be at least two display screens 1205, which are respectively arranged on different surfaces of the terminal 1200 or are in a foldable design; in other embodiments, the display screen 1205 can be a flexible display screen, which is arranged on the curved surface or the folding surface of the terminal 1200. Even, the display screen 1205 can also be arranged in an irregular non-rectangular shape, that is, a special-shaped screen. The display screen 1205 can be prepared from materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0269] The camera module 1206 is used to collect images or videos. Optionally, the camera module 1206 includes a front camera and a rear camera. The front camera is arranged on the front panel of the terminal 1200, and the rear camera is arranged on the back of the terminal 1200. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth-of-field camera, a wide-angle camera, and a telephoto camera respectively, so as to realize the function of background blurring by fusing the main camera and the depth-of-field camera, the function of panoramic shooting by fusing the main camera and the wide-angle camera, and the VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera module 1206 can also include a flash. The flash can be a single-color-temperature flash or a two-color-temperature flash. The two-color-temperature flash refers to the combination of a warm-light flash and a cold-light flash, which can be used for light compensation under different color temperatures.
[0270] The power supply 1207 is used to supply power to each component in the terminal 1200. The power supply 1207 can be alternating current, direct current, a disposable battery, or a rechargeable battery. When the power supply 1207 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0271] Those skilled in the art can understand, Figure 12The structure shown does not constitute a limitation on the terminal 1200, and it may include more or fewer components than shown, or combine certain components, or adopt a different component arrangement.
[0272] Optionally, the computer device is provided as a server. Figure 13 It is a schematic structural diagram of a server provided by an embodiment of the present application. The server 1300 may vary greatly due to different configurations or performances, and may include one or more processors (Central Processing Units, CPUs) 1301 and one or more memories 1302. Among them, at least one computer program is stored in the memory 1302, and the at least one computer program is loaded and executed by the processor 1301 to implement the methods provided by the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input / output interface for input and output. The server may also include other components for implementing the functions of the device, which will not be elaborated here.
[0273] An embodiment of the present application also provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is loaded and executed by a processor to implement the operations performed by the target operation detection method in the above embodiment.
[0274] An embodiment of the present application also provides a computer program product, including a computer program, and the computer program is loaded and executed by a processor to implement the operations performed by the target operation detection method in the above embodiment.
[0275] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by a program instructing related hardware. The program can be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a disk, or an optical disc, etc.
[0276] The above are only optional embodiments of the embodiments of the present application, and are not intended to limit the embodiments of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the embodiments of the present application shall be included in the protection scope of the present application.
Claims
1. A target operation detection method, characterized in that, The method includes: Obtaining a click data sequence of an electronic device, where the click data sequence includes at least two pieces of click data, and each piece of click data includes a key code and a click moment, and the key code represents the key clicked by the electronic device at the click moment; Detecting the click data sequence based on a target condition corresponding to the target operation to obtain a detection result of the electronic device; Wherein, the target operation refers to an operation of clicking a macro key, the target condition is a condition satisfied by the click data sequence of the target operation, and the detection result indicates whether the target operation exists on the electronic device.
2. The method according to claim 1, characterized in that, The target condition includes a first target condition corresponding to an over-click operation, and the first target condition is that the number of key codes corresponding to the click moments within the same target duration is greater than a first target number; The detecting the click data sequence based on the target condition corresponding to the target operation to obtain a detection result of the electronic device includes: Determining the number of key codes corresponding to the click moments within the same target duration in the click data sequence; Detecting whether the determined number is greater than the first target number to obtain a detection result of the over-click operation.
3. The method according to claim 1, wherein The target condition includes a second target condition corresponding to a single-key simultaneous press operation, and the second target condition is that there are duplicate click data, where the duplicate click data includes the same key code and the same click moment; The detecting the click data sequence based on the target condition corresponding to the target operation to obtain a detection result of the electronic device includes: Detecting whether there is duplicate click data in the click data sequence to obtain a detection result of the single-key simultaneous press operation.
4. The method according to claim 1, wherein The target condition includes a third target condition corresponding to a single-key simultaneous press operation, and the third target condition is that the time interval between the click moments corresponding to the same key code is less than a target time interval; The detecting the click data sequence based on the target condition corresponding to the target operation to obtain a detection result of the electronic device includes: Determining the time interval between the click moments corresponding to each key code in the click data sequence; Detecting whether the determined time interval is less than the target time interval to obtain a detection result of the single-key simultaneous press operation.
5. The method according to claim 1, characterized in that The target condition includes a fourth target condition corresponding to a multi-key simultaneous press operation, and the fourth target condition is that the number of key codes corresponding to the same click moment is greater than a second target number; The detecting the click data sequence based on the target condition corresponding to the target operation to obtain a detection result of the electronic device includes: Determining the number of key codes corresponding to each click moment in the click data sequence; Detecting whether the determined number is greater than the second target number to obtain a detection result of the multi-key simultaneous press operation.
6. The method according to claim 1, characterized in that The target condition includes a fifth target condition corresponding to a repeated click operation, and the fifth target condition is that there is a repeated subsequence, where in the repeated subsequence, the key codes and the arrangement order of the key codes are the same, and the time interval between the click moments is the same; Detecting the click data sequence based on the target conditions corresponding to the target operation to obtain the detection result of the electronic device, including: Detecting repeated subsequences in the click data sequence to obtain the detection result of the repeated click operation.
7. The method according to claim 6, characterized in that, The detecting repeated subsequences in the click data sequence to obtain the detection result of the repeated click operation includes: Searching for a target sequence in the click data sequence, where the target sequence is the longest subsequence that appears repeatedly at different positions in the click data sequence; When the target sequence is found, determining the repeated subsequences in the target sequence and the corresponding number of repetitions of the repeated subsequences; Generating the detection result of the repeated click operation based on the repeated subsequences and the corresponding number of repetitions of the repeated subsequences.
8. The method according to claim 7, characterized in that, The determining the repeated subsequences in the target sequence and the corresponding number of repetitions of the repeated subsequences when the target sequence is found includes: Obtaining multiple target numbers, each target number being an integer greater than 1; Grouping the target sequence according to each target number respectively to obtain pattern subsequences, and the number of key codes in the pattern subsequences is equal to the target number used in this grouping; For each pattern subsequence obtained by grouping, determining the number of repetitions of the pattern subsequence in the target sequence, where the pattern subsequence with the number of repetitions greater than 0 is the repeated subsequence.
9. The method according to claim 7, characterized in that, The generating the detection result of the repeated click operation based on the repeated subsequences and the corresponding number of repetitions of the repeated subsequences includes: Determining the repeated subsequences with the number of repetitions greater than the target number of repetitions and the length greater than the target length as macro sequences; Generating the detection result of the repeated click operation, where the detection result of the repeated click operation includes the macro sequence and the number of repetitions of the macro sequence.
10. The method according to claim 7, wherein The method further includes: When the target sequence is not found in the click data sequence, determining the detection result of the repeated click operation as: the electronic device does not have the repeated click operation.
11. The method according to any one of claims 1 to 10, characterized in that, The target conditions include at least two, and each target condition corresponds to a target operation; Detecting the click data sequence based on the target conditions corresponding to the target operation to obtain the detection result of the electronic device, including: Determining the historical target operation of the electronic device, where the historical target operation is the target operation that the electronic device has performed; Detecting the click data sequence based on the target conditions corresponding to the historical target operation to obtain the detection result of the historical target operation; When the detection result of the historical target operation is that the electronic device has the historical target operation, the detection ends.
12. The method according to any one of claims 1-10, characterized in that, The target conditions include at least two, and each target condition corresponds to a target operation; Detecting the click data sequence based on the target conditions corresponding to the target operation to obtain the detection result of the electronic device, including: Detect the click data sequence based on the target conditions corresponding to at least two target operations, and obtain the detection results of the at least two target operations; Generate the detection result of the electronic device based on the detection results of the at least two target operations, where the detection result at least includes the target operations existing in the electronic device.
13. The method according to any one of claims 1-10, characterized in that, The method further includes: Receive the click data uploaded by the electronic device every first time period, and store the click data in the memory; The obtaining the click data sequence of the electronic device includes: Every second time period, obtain the click data sequence of the electronic device from the memory, where the click data sequence includes the click data stored within the second time period before the current moment; Wherein, the second time period is greater than the first time period.
14. An object operation detection device, characterized in that, The device includes: A data acquisition module, configured to acquire a click data sequence of an electronic device, where the click data sequence includes at least two pieces of click data, and each piece of click data includes a key code and a click moment, and the key code represents the key clicked by the electronic device at the click moment; A detection module, configured to detect the click data sequence based on the target conditions corresponding to the target operations, and obtain the detection result of the electronic device; Wherein, the target operation refers to an operation of clicking a macro key, the target condition is the condition satisfied by the click data sequence of the target operation, and the detection result indicates whether the target operation exists in the electronic device.
15. A computer device, characterized in that, The computer device includes a processor and a memory, and at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the operations performed by the target operation detection method according to any one of claims 1 to 13.
16. A computer-readable storage medium, characterized in that, At least one computer program is stored in the computer-readable storage medium, and the at least one computer program is loaded and executed by a processor to implement the operations performed by the target operation detection method according to any one of claims 1 to 13.
17. A computer program product, comprising a computer program, characterized in that, The computer program is loaded and executed by a processor to implement the operations performed by the target operation detection method according to any one of claims 1 to 13.