Plug-in detection method and device for billiard game and storage medium
By establishing a three-level anti-cheating check between the billiard game client and server, detecting the physical parameters of the game physics engine and comparing the hitting information, the problem of accuracy of cheating detection in the billiard game is solved, and efficient cheating identification and prevention is achieved.
Patent Information
- Application Number
- CN202511035078.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-10-17
AI Technical Summary
It is difficult to effectively detect and prevent cheats in billiard games with existing technologies, especially those specific cheats that bypass or hide cheat detection.
The game physics engine is loaded on the client, the hitting information is collected and the validity of the physical parameters is tested, and an alarm message is sent to the server; the server performs comparison and verification to determine whether a plug-in is used.
It improves the accuracy of plug-in detection, avoids bypassing detection and rootkit hiding, and reduces the computing power cost of the server.
Smart Images

Figure CN120789663A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of anti-game plug-ins, and in particular to a billiards game plug-in detection method, device and storage medium. BACKGROUND
[0002] Game manufacturers provide a plurality of small game programs, and a unified game virtual engine is used in the client to load the game programs for user selection.
[0003] At present, in order to facilitate management, the client uses a monitoring process memory, code signature and the like to uniformly detect game plug-ins.
[0004] However, illegal elements have developed specific plug-ins for popular game programs such as billiards to bypass plug-in detection or rootkit concealment. SUMMARY
[0005] Therefore, the present application provides a billiards game plug-in detection method, device and storage medium to improve the accuracy of billiards game program plug-in detection in the client.
[0006] A first aspect of the present application provides a billiards game plug-in detection method, comprising:
[0007] In the client, a game physics engine of a billiards game program is loaded, and hit ball information generated when hitting a billiard ball is collected from the game physics engine, and the hit ball information is sent to a server; the hit ball information includes first billiard state information after hitting a billiard ball;
[0008] In the client, the effectiveness of a physical parameter for simulating a billiard ball in the game physics engine is detected, and when the effectiveness is invalid, an alarm information is sent to the server;
[0009] In the server, the first billiard state information of a battle end is compared to obtain hit ball comparison information; the battle end is the client participating in the same billiards game;
[0010] In the server, when the alarm information and the hit ball comparison information satisfy a preset detection condition, whether the battle end uses a plug-in to modify the billiards game program is detected according to the hit ball information of the battle end.
[0011] A second aspect of the present application provides a billiards game plug-in detection device, and the device comprises a client and a server.
[0012] The client is used for loading a game physics engine of a billiards game program, collecting hitting ball information generated when hitting billiards from the game physics engine, and sending the hitting ball information to the server; the hitting ball information includes first billiard state information after hitting;
[0013] The client is further used for detecting validity of a physical parameter for simulating billiards in the game physics engine, and sending alarm information to the server when the validity is invalid.
[0014] The server is used for comparing the first billiard state information of the game end, obtaining hitting ball comparison information, and the game end is the client participating in the same billiard game.
[0015] The server is further used for detecting whether the game end uses an external plug-in to modify the billiards game program according to the hitting ball information of the game end when the alarm information and the hitting ball comparison information satisfy a preset detection condition.
[0016] A third aspect of the present application provides an electronic device, the electronic device comprising:
[0017] at least one processor; and
[0018] a memory connected with the at least one processor in communication; wherein,
[0019] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the billiards game external plug-in detection method of the first aspect.
[0020] A fourth aspect of the present application provides a computer readable storage medium, the computer readable storage medium stores a computer program, and the computer program is executed by a processor to realize the billiards game external plug-in detection method of the first aspect.
[0021] A fifth aspect of the present application provides a computer program product, the computer program product comprises a computer program, and the computer program is executed by a processor to realize the billiards game external plug-in detection method of the first aspect.
[0022] In the embodiment, in the client, a game physics engine of a billiards game program is loaded, the ball hitting information generated when hitting the billiards is collected from the game physics engine, and the ball hitting information is sent to the server; the ball hitting information includes first billiard state information after hitting the ball; in the client, the effectiveness of the physical parameters for simulating billiards in the game physics engine is detected, and when the effectiveness is invalid, an alarm information is sent to the server; in the server, the first billiard state information of the battle side is compared to obtain hitting comparison information; the battle side is a client participating in the same billiards game; in the server, when the alarm information and the hitting comparison information satisfy a preset detection condition, whether the battle side uses an external plug-in to modify the billiards game program is detected according to the ball hitting information of the battle side. The embodiment establishes a three-level anti-external plug-in verification from the client to the server, which not only can check the external plug-in that modifies the billiards game program at the game physics engine level, avoids bypassing or rootkit hiding, improves the accuracy of external plug-in detection, and the client and the server have clear division of labor, which can reduce the computing power cost of the server.
[0023] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the application, nor is it used to limit the scope of the application. Other features of the application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiments description. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0025] Figure 1 is a flowchart of a billiards game external plug-in detection method provided by the first embodiment of the application.
[0026] Figure 2 is a structural schematic diagram of a billiards game external plug-in detection device provided by the second embodiment of the application.
[0027] Figure 3 is a structural schematic diagram of an electronic device provided by the third embodiment of the application. DETAILED DESCRIPTION
[0028] In the following, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by a person of ordinary skill in the art without creative effort should belong to the protection scope of the present application.
[0029] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can encompass the order of implementation other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or device including a series of steps or units does not necessarily have to be limited to the clearly listed steps or units, but can include other steps or units not clearly listed or inherent to the process, method, product, or device.
[0030] Embodiment one
[0031] Referring to Figure 1 , a flowchart of a method for detecting an external plug-in of a table tennis game is shown, which can be executed by a table tennis game external plug-in detection device. The table tennis game external plug-in detection device can be realized in the form of hardware and / or software, and can be configured in an electronic device. As shown in Figure 1 , the method comprises:
[0032] Step 101, in the client, load the game physics engine of the table tennis game program, collect the hitting information generated when hitting the table tennis from the game physics engine, and send the hitting information to the server.
[0033] In actual application, a plurality of game programs can be integrated in the client in the manner of Flutter, ReactNative, Web, Hybrid, etc., especially some small game programs.
[0034] The game physics engine, such as Box2D, is configured in the client to support the running of a plurality of game programs.
[0035] The user can log in his account in the client, and select the table tennis game program from a plurality of game programs in the client. At this time, the game physics engine can be loaded to load the table tennis game program to run, wherein the table tennis game program is a game program simulating table tennis.
[0036] Different clients can participate in the same billiards game in the billiards game program through random matching, inviting friends, etc.
[0037] At present, the external plug-ins developed for the billiards game program are mostly to modify the physical parameters of the billiards game program for simulating billiards, such as the size of the billiards, the force of the hitting, the angle of the hitting, the friction coefficient, the trajectory of the collision, etc.
[0038] To this end, the embodiment performs initial anti-external plug-in verification on the game physics engine in the client, so that not only part of the anti-external plug-in operation can be shared in the client to reduce the computing power burden of the server, but also the behavior consistency verification of the same account when logging in on multiple devices (such as PC (personal computer), mobile terminal) can be adapted.
[0039] In the process of initial anti-external plug-in verification in the client, the hitting information generated by the current client when hitting the billiards each time can be collected from the game physics engine and sent to the server.
[0040] The hitting information includes the first billiard state information after hitting, and the first billiard state information is the state of the billiard table and each billiard when the billiard is still after hitting.
[0041] Exemplarily, the first billiard state information includes the size of the billiard table, the position of each billiard, etc.
[0042] Step 102, in the client, detecting the validity of the physical parameters for simulating billiards in the game physics engine, and sending alarm information to the server when the validity is invalid.
[0043] In the process of initial anti-external plug-in verification in the client, the validity of the physical parameters for simulating billiards in the game physics engine can be detected in real time, and when the validity is invalid, it indicates that the physical parameters for simulating billiards in the game physics engine may be tampered with. At this time, the client generates an alarm information and sends the alarm information to the server.
[0044] In an embodiment of the application, step 102 can include the following steps:
[0045] Step 1021, calling a callback function in the game physics engine when updating the billiards game program each frame.
[0046] In actual application, a probe implantation layer can be set in the game physics engine, that is, some key nodes are screened out in the game physics engine to inject monitoring code.
[0047] In the embodiment, a detection function can be set in the callback function for updating the billiards game program each frame in the game physics engine, and the monitoring code is injected.
[0048] Exemplarily, in the Box2D physics engine, the physical simulation is in units of "steps", and each time the onStep function (or the b2World::Step function) is called, the Box2D physics engine performs custom logic and calculates the physical state (such as position, velocity, collision, etc.) once.
[0049] In the present example, the detection function checkValid can be set in the onStep function, and the monitoring code is injected.
[0050] Then, the callback function is called each time the billiards game program is updated in the game physics engine, and since the callback function includes the detection function, the detection function is called synchronously at this time.
[0051] Step 1022, calling the detection function to detect the validity of the physical parameters for simulating billiards in the game physics engine.
[0052] In the process of running the detection function, the validity of the physical parameters for simulating billiards in the game physics engine is detected according to the detection logic defined by the detection function.
[0053] In an embodiment of the present application, step 1022 can further include the following steps:
[0054] Step 10221, reading the physical parameters of multiple types for simulating billiards from the memory of the game physics engine.
[0055] In the present embodiment, the detection function queries the memory allocated by the game physics engine, especially the memory address of the physical parameters for simulating billiards in the game physics engine, and reads the physical parameters of multiple types for simulating billiards from the memory allocated by the game physics engine in real time.
[0056] Step 10222, determining the standard parameters of multiple types for simulating billiards.
[0057] In the detection function, a set of physical parameters of multiple types for simulating billiards is built in, and the physical parameters of the detection function are independent of the physical parameters of the game physics engine and can be used as a standard for checking the physical parameters of the game physics engine. Therefore, the physical parameters of the detection function can be referred to as standard parameters.
[0058] In a specific implementation, the physical parameters of the detection function are encrypted in a symmetric key algorithm or the like, forming parameter ciphertext pre-embedded in the detection function. Therefore, the detection function can load the pre-set parameter ciphertext into the memory allocated by the detection function, decrypt the parameter ciphertext using a symmetric key algorithm or the like, and obtain the standard parameters of multiple types for simulating billiards.
[0059] Step 10223, for the same type, calculate the parameter difference between the physical parameter and the standard parameter.
[0060] Generally, the decryption process of the symmetric key algorithm is bit-level accurate matching. If the key and the ciphertext are stored or calculated using floating-point numbers, the precision error may cause:
[0061] 1. Key value deviation: for example, 1.23456789 is actually stored as 1.2345679, and the correct key cannot be restored during decryption;
[0062] 2. Inconsistent intermediate results: for example, different results are generated due to floating-point error in modulus operation and bit shift operation.
[0063] Therefore, for the same type, the absolute value of the difference between the physical parameter and the standard parameter can be taken to obtain the parameter difference between the physical parameter and the standard parameter.
[0064] The parameter difference corresponding to the physical parameter of each type is compared with the error threshold value corresponding thereto, wherein the error threshold value is usually a very small value, such as 0.000000001.
[0065] Step 10224, if the parameter differences of multiple types are all less than the preset error threshold value, it is determined that the validity of the physical parameter is valid.
[0066] If the parameter differences of multiple types are all less than the corresponding error threshold value, it indicates that the physical parameters of multiple types are within a reasonable error range, and the risk of tampering is low, and then it is determined that the validity of the physical parameter is valid.
[0067] Step 10225, if the parameter differences of at least one type are all greater than or equal to the preset error threshold value, it is determined that the validity of the physical parameter is invalid.
[0068] If the parameter differences of at least one type are all less than the corresponding error threshold value, it indicates that the physical parameters of at least one type are outside a reasonable error range, and the risk of tampering is high, and then it is determined that the validity of the physical parameter is invalid.
[0069] If the validity of the physical parameter is detected, the parameter ciphertext and the standard parameter are released from the memory to ensure security.
[0070] In an embodiment of the present application, step 1022 can further include the following steps:
[0071] Step 10226, determine the timer.
[0072] Step 10227, compare the time length with the preset time threshold value; when the time length is greater than or equal to the time threshold value, execute steps 10221-10225.
[0073] Tampering with the physical parameters of the game physics engine is usually a long-term behavior, in order to reduce the resource occupation of the client, a timer can be set in the game physics engine, which is used to count the time interval from the last detection of the validity of the physical parameters, that is, the timer is reset every time the detection of the validity of the physical parameters is completed.
[0074] The detection function reads the time interval from the last detection of the validity of the physical parameters from the timer, compares the time interval from the last detection of the validity of the physical parameters with a preset time threshold (such as 50 ms), and when the time interval from the last detection of the validity of the physical parameters is greater than or equal to the time threshold, detects the validity of the physical parameters in the game physics engine, and when the time interval from the last detection of the validity of the physical parameters is less than the time threshold, continues to wait.
[0075] Step 103, in the service end, comparing the first table ball state information of the opponent end, obtaining the ball hitting comparison information.
[0076] The service end filters the first table ball state information of the opponent end for secondary anti-hacking verification when receiving the first table ball state information sent by each client, and compares each item of data in the first table ball state information of the opponent end to obtain the ball hitting comparison information.
[0077] The opponent end is a client participating in the same table ball game.
[0078] Step 104, in the service end, when the alarm information and the ball hitting comparison information satisfy the preset detection condition, detecting whether the opponent end uses the external plug-in to modify the table ball game program according to the ball hitting information of the opponent end.
[0079] The service end maintains two data streams for the opponent end, one of which is the alarm information and the other of which is the ball hitting comparison information.
[0080] The service end compares the two data streams to trigger three anti-hacking verifications, specifically, when the alarm information and the ball hitting comparison information satisfy the preset detection condition, detecting whether the opponent end uses the external plug-in to modify the table ball game program according to the ball hitting information of the opponent end.
[0081] In the service end, when the alarm information appears and the ball hitting comparison information is the same as the first table ball state information, that is, the result of the first anti-hacking verification is different from the result of the second anti-hacking verification, it is determined that the opponent end (user) is suspected of using the external plug-in to modify the table ball game program.
[0082] In the recent period of time, if the frequency of a same user suspected of using the external plug-in to modify the table ball game program exceeds a preset frequency threshold, it can be determined that the user is suspected of using the external plug-in to modify the table ball game program.
[0083] Exemplarily, the detection condition comprises at least one of the following:
[0084] The ball hitting comparison information is that the first table tennis state information of the battle end is different, and the alarm information appears at the same time.
[0085] The ball hitting comparison information is that the number of times that the first table tennis state information of the battle end is the same is greater than or equal to a preset frequency threshold.
[0086] The former detection condition indicates that the primary anti-external hanging check and the secondary anti-external hanging check both show alarms, and the risk of the client using external hanging is higher. The latter detection condition indicates that the client is subjected to random inspection.
[0087] In an embodiment of the present application, the ball hitting information further comprises second table tennis state information before the ball hitting and a ball hitting operation instruction, wherein the second table tennis state information describes the state of the table and each table tennis when the table tennis is static before the ball hitting, and the ball hitting operation instruction comprises a ball hitting direction, a ball hitting strength and the like. Exemplarily, the second table tennis state information comprises the size of the table, the position of each table tennis and the like.
[0088] The game physics engine has loaded the table tennis game program.
[0089] Therefore, in the present embodiment, step 104 can comprise the following steps:
[0090] Step 1041, controlling the game physics engine to execute the ball hitting operation according to the ball hitting operation instruction on the basis of the second table tennis state information, and obtaining third table tennis state information.
[0091] The server can send the second table tennis state information and the ball hitting operation instruction to the game physics engine deployed thereby, control the game physics engine to execute the ball hitting operation according to the ball hitting operation instruction on the basis of the second table tennis state information, and obtain third table tennis state information.
[0092] The third table tennis state information describes the state of the table and each table tennis when the table tennis is static after the ball hitting.
[0093] Exemplarily, the third table tennis state information comprises the size of the table, the position of each table tennis and the like.
[0094] Step 1042, calculating a first difference value between the first table tennis state information of the battle end in the table tennis distribution.
[0095] In the present embodiment, the first table tennis state information of the battle end can be compared, and the first difference value between the first table tennis state information of the battle end in the table tennis distribution can be calculated.
[0096] In practical application, the first table ball state information includes positions of each table ball, and each table ball has an ID or the like identifier.
[0097] The absolute values of the differences between the positions of the same table ball on the battle side are obtained to obtain first ball deviation values.
[0098] The first ball deviation values corresponding to each table ball are compared.
[0099] The first ball deviation value with the largest value is screened out as a first difference value between the first table ball state information of the battle side in table ball distribution.
[0100] If the client A and the client B are the battle side, the first difference value can be expressed as Delta(A, B) = Max(abs(ai-bi)), wherein Delta(A, B) is the first difference value of the client A and the client B, ai is the i-th table ball in the client A, bi is the i-th table ball in the client B, abs is an absolute value function, and MAX is an absolute value function.
[0101] In step 1043, if the first difference value is greater than or equal to a preset difference threshold, a second difference value between the third table ball state information and the first table ball state information of the battle side in table ball distribution is calculated.
[0102] The first difference value is compared with the preset difference threshold (for example, 0.5).
[0103] If the first difference value is greater than or equal to the difference threshold, it is indicated that the difference in the hitting result of the battle side is large, and the possibility that at least one battle side uses an external plug-in is high, and then the second difference value between the third table ball state information of the service side and the first table ball state information of each battle side in table ball distribution is calculated.
[0104] In practical application, the third table ball state information includes positions of each table ball, and each table ball has an ID or the like identifier.
[0105] The absolute values of the differences between the positions of the same table ball on the battle side are obtained to obtain first ball deviation values.
[0106] The first ball deviation values corresponding to each table ball are compared.
[0107] The first ball deviation value with the largest value is screened out as a first difference value between the third table ball state information and the first table ball state information of the battle side in table ball distribution.
[0108] Supposing that client A and client B are the game ends, and C is the service end, then the second difference value can be expressed as Delta(A, C) = Max(abs(ai-ci)), Delta(B, C) = Max(abs(bi-ci)), wherein Delta(A, C) is the second difference value of client A and service end C, Delta(B, C) is the second difference value of client B and service end C, ai is the i th table ball in client A, bi is the i th table ball in client B, ci is the i th table ball in service end C, abs is the function of taking absolute value, and MAX is the function of taking absolute value.
[0109] Step 1044, if the second difference value is greater than or equal to the preset difference threshold, it is determined that the game end uses the external plug-in to modify the table ball game program.
[0110] The second difference value corresponding to each game end is compared with the preset difference threshold.
[0111] If the second difference value corresponding to a certain game end is greater than or equal to the preset difference threshold, it is determined that the game end (user) uses the external plug-in to modify the table ball game program.
[0112] If the game end using the external plug-in to modify the table ball game program is the serving end, the third table ball state information simulated by the service end is synchronously sent to the serving end, the serving end is prompted to commit a foul, and another game end (i.e. non-serving end) re-serve.
[0113] If the game end using the external plug-in to modify the table ball game program is the non-serving end, the third table ball state information simulated by the service end is synchronously sent to the non-serving end, the non-serving end is prompted to commit a foul, and the first table ball state information of the serving end is used as the criterion to continue the table ball game.
[0114] For the case that the client uses the external plug-in to modify the table ball game program, the client is suspected to use the external plug-in to modify the table ball game program, etc., the user can be processed according to the business rules.
[0115] In one case, if it is determined that the user uses the external plug-in to modify the table ball game program, the user can be listed as an abnormal user, and the game permission (such as matching queue, joining the game) is limited differently according to the number of times of using the external plug-in to modify the table ball game program, for example, when the number of times of using the external plug-in to modify the table ball game program reaches 3 times, the user enters the matching queue of the abnormal user in the future 14 days, and is prohibited from joining the game for 4320 minutes.
[0116] In another case, if it is determined that the user is suspected of using the external plug-in to modify the table tennis game program, different restrictions are imposed on the game authority (such as matching the queue and joining the game) according to the number of times of suspected use of the external plug-in to modify the table tennis game program. For example, if the number of times of suspected use of the external plug-in to modify the table tennis game program exceeds 10 times, the user will enter the matching queue of the abnormal user for 7 days in the future, and if the number of times of suspected use of the external plug-in to modify the table tennis game program exceeds 30 times, the user will be prohibited from joining the game for 720 minutes.
[0117] Of course, an appeal channel can be established, and when the user promises not to use the external plug-in to modify the table tennis game program in the future, the restriction on the game authority can be relaxed.
[0118] After the method in the embodiment is put into use, the number of users using the external plug-in of the table tennis game program is reduced from more than 1700 to a single digit, the initial violation rate is reduced from 0.5% to 0%, and part of the external plug-in manufacturing groups of the table tennis game program give up the external plug-in project of the table tennis game program and no longer update the external plug-in of the table tennis game program.
[0119] In the embodiment, in the client, a game physics engine of the table tennis game program is loaded, and hit information generated when a table tennis ball is hit is collected from the game physics engine and sent to the server; the hit information includes first table tennis state information after the hit; in the client, the effectiveness of the physical parameters for simulating the table tennis in the game physics engine is detected, and when the effectiveness is invalid, an alarm information is sent to the server; in the server, the first table tennis state information of the battle end is compared to obtain hit comparison information; the battle end is a client participating in the same table tennis game; in the server, when the alarm information and the hit comparison information satisfy a preset detection condition, whether the battle end uses the external plug-in to modify the table tennis game program is detected according to the hit information of the battle end. The embodiment establishes a three-level anti-external plug-in verification from the client to the server, which not only can verify the external plug-in that modifies the table tennis game program at the game physics engine level, avoids bypassing or rootkit hiding, improves the accuracy of external plug-in detection, and the client and the server have clear division of labor, which can reduce the computing power cost of the server.
[0120] Embodiment Two
[0121] Referring to Figure 2 , a structure schematic diagram of a table tennis game external plug-in detection device provided by an embodiment two of the application is shown. As Figure 2 shown, the device includes a client 210 and a server 220;
[0122] The client 210 is configured to load a game physics engine of a table tennis game program, collect hit information generated when a table tennis ball is hit from the game physics engine, and send the hit information to the server; the hit information includes first table tennis state information after the hit.
[0123] The client 210 is further configured to detect validity of the physical parameters for simulating the table game in the game physics engine, and send an alarm information to the server when the validity is invalid.
[0124] The server 220 is configured to compare the first table game state information of the game end to obtain hit ball comparison information, and the game end is the client participating in the same table game.
[0125] The server 220 is further configured to detect whether the game end uses an external plug-in to modify the table game program according to the hit ball information of the game end when the alarm information and the hit ball comparison information satisfy a preset detection condition.
[0126] In an embodiment of the present application, the client 210 is further configured to:
[0127] invoke a callback function when updating the table game program in the game physics engine every frame; the callback function includes a detection function;
[0128] invoke the detection function to detect the validity of the physical parameters for simulating the table game in the game physics engine.
[0129] In an embodiment of the present application, the client 210 is further configured to:
[0130] read multiple types of physical parameters for simulating the table game from the memory of the game physics engine;
[0131] determine multiple types of standard parameters for simulating the table game;
[0132] calculate parameter differences between the physical parameters and the standard parameters for the same type;
[0133] if the parameter differences of the multiple types are all less than a preset error threshold, determine that the validity of the physical parameters is valid;
[0134] if the parameter differences of at least one type are all greater than or equal to the preset error threshold, determine that the validity of the physical parameters is invalid.
[0135] In an embodiment of the present application, the client 210 is further configured to:
[0136] determine a timer; the timer is used to count a time interval from the last detection of the validity of the physical parameters;
[0137] compare the time length with a preset time threshold; when the time length is greater than or equal to the time threshold, the reading of the plurality of types of physical parameters for simulating the table game from the memory of the game physics engine is performed.
[0138] In an embodiment of the present application, the client 210 is further configured to:
[0139] loading the preset parameter ciphertext into the memory;
[0140] decrypting the parameter ciphertext to obtain a plurality of types of standard parameters for simulating the table game;
[0141] The client 210 is further configured to:
[0142] if the validity of the physical parameters is detected, releasing the parameter ciphertext and the standard parameters from the memory.
[0143] In an embodiment of the present application, the ball hitting information further includes second table game state information before ball hitting and a ball hitting operation instruction; the game physics engine is deployed in the server to simulate the environment of the client;
[0144] The server 220 is further configured to:
[0145] controlling the game physics engine to perform a ball hitting operation according to the ball hitting operation instruction on the basis of the second table game state information to obtain third table game state information;
[0146] calculating a first difference value between the first table game state information of the client and the first table game state information of the opponent in terms of table game distribution;
[0147] if the first difference value is greater than or equal to a preset difference threshold, calculating a second difference value between the third table game state information and the first table game state information of the opponent in terms of table game distribution;
[0148] if the second difference value is greater than or equal to a preset difference threshold, determining that the opponent uses an external program to modify the table game program.
[0149] In an embodiment of the present application, the first table game state information includes positions of respective table games, and the third table game state information includes positions of respective table games.
[0150] The server 220 is further configured to:
[0151] taking an absolute value of a difference between corresponding positions of the same table game on the client and the opponent to obtain a first ball deviation value;
[0152] Screening the first ball deviation value with the largest value as the first difference value between the first table ball state information of the battle end on the table ball distribution.
[0153] The service end 220 is further used for:
[0154] For the same table ball, the absolute value of the difference between the corresponding position of the table ball in the service end and the corresponding position of the table ball in the battle end is taken to obtain a second ball deviation value.
[0155] Screening the second ball deviation value with the largest value as the second difference value between the third table ball state information and the first table ball state information of the battle end on the table ball distribution.
[0156] In an embodiment of the present application, the detection condition comprises at least one of the following:
[0157] The ball hitting comparison information is that the first table ball state information of the battle end is different, and the alarm information appears at the same time;
[0158] The ball hitting comparison information is that the first table ball state information of the battle end is the same for a number of times greater than or equal to a preset frequency threshold;
[0159] The service end 220 is further used for determining that the battle end is suspected to use a plug-in to modify the table ball game program when the alarm information appears and the ball hitting comparison information is that the first table ball state information is the same.
[0160] The table ball game plug-in detection device provided by the embodiments of the present application can execute the table ball game plug-in detection method provided by any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of executing the table ball game plug-in detection method.
[0161] Embodiment three
[0162] Referring to Figure 3 , a structure schematic diagram of an electronic device provided by an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present application described and / or claimed in this document.
[0163] As Figure 3As shown, the electronic device 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., connected to the at least one processor 11 in communication. The memory stores computer programs executable by the at least one processor 11, and the processor 11 can perform various appropriate actions and processes according to the computer programs stored in the read-only memory (ROM) 12 or loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0164] Various components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc., an output unit 17, such as various types of displays, a speaker, etc., a storage unit 18, such as a magnetic disk, an optical disk, etc., and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0165] The processor 11 can be various general and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as the cheat detection method for table games.
[0166] In some embodiments, the cheat detection method for table games can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded onto the RAM 13 and executed by the processor 11, one or more steps of the cheat detection method for table games described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the cheat detection method for table games by any other appropriate means, such as by means of firmware.
[0167] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a load programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0168] Computer programs used to implement the processes of the application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer program
[0169] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store computer programs for use by or in connection with an instruction execution system, apparatus, or device. Computer-readable storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium will include one or more lines of a program of instructions in a transitory signal, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0170] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0171] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), blockchain network, and the Internet.
[0172] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.
[0173] Embodiment Four
[0174] The embodiment of the present application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the plug-in detection method of the table tennis game provided by any of the embodiments of the present application.
[0175] The computer program code can also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce the computer implemented process such that the
[0176] It should be understood that the various forms of flow shown in the figures are illustrative examples of implementing the steps of the application. Several steps have been described as being performed by a single device. It will be understood that these steps can be performed by a single device or multiple devices, and that the steps can be performed in an order different from that shown in the figures. For example, the steps described in the figures can be performed in parallel or in a different order, as long as the desired results of the application are achieved. The application is not limited in this regard.
[0177] The specific embodiments have been shown and described for the purposes of illustrating the physiological principles of the application and its practical application. It is therefore to be understood that various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the application. The scope of the application is not to be limited by specific illustrative embodiments. The application is to cover any and all modifications and the same is therefore intended to be within the scope of the application.
Claims
1. A method for detecting cheats in a billiard game, characterized in that: include: In the client, a game physics engine of the billiard game program is loaded, hitting information generated when hitting the billiard ball is collected from the game physics engine, and the hitting information is sent to the server; the hitting information includes first billiard ball state information after the hitting; In the client, detecting the validity of the physical parameters used to simulate the billiard ball in the game physics engine, and sending an alarm message to the server when the validity is invalid; In the server, the first billiard status information of the opponent terminal is compared to obtain shot comparison information; the opponent terminal is the client terminal participating in the same billiard game; In the server, when the alarm information and the shot comparison information meet a preset detection condition, it is detected based on the shot information of the opponent whether the opponent uses a plug-in to modify the billiard game program.
2. The method according to claim 1, characterized in that The detecting the validity of the physical parameters used to simulate the billiard ball in the game physics engine includes: calling a callback function when the billiard game program is updated in each frame in the game physics engine; the callback function includes a detection function; The detection function is called to detect the validity of the physical parameters used to simulate the billiard ball in the game physics engine.
3. The method according to claim 2, characterized in that The calling of the detection function to detect the validity of the physical parameters used to simulate the billiard ball in the game physics engine includes: Reading multiple types of physical parameters for simulating billiards from the memory of the game physics engine; Determine standard parameters for various types of simulated billiards; For the same type, calculating the parameter difference between the physical parameter and the standard parameter; If the differences between the parameters of the plurality of types are all smaller than a preset error threshold, determining the validity of the physical parameter to be valid; If the parameter differences of at least one type are greater than or equal to a preset error threshold, the validity of the physical parameter is determined to be invalid.
4. The method according to claim 3, characterized in that The calling of the detection function to detect the validity of the physical parameters used to simulate the billiard ball in the game physics engine further includes: Determine a timer; the timer is used to count the length of time between the validity of the physical parameter and the last detection; The duration is compared with a preset time threshold; when the duration is greater than or equal to the time threshold, the multiple types of physical parameters for simulating billiards are read from the memory of the game physics engine.
5. The method according to claim 3, characterized in that The determination is used to simulate various types of standard parameters for billiards, including: Load the preset parameter ciphertext into memory; Decrypting the parameter ciphertext to obtain various types of standard parameters for simulating billiards; The calling of the detection function to detect the validity of the physical parameters used to simulate the billiard ball in the game physics engine further includes: If the validity of the physical parameter is detected, the parameter ciphertext and the standard parameter are released from the memory.
6. The method according to any one of claims 1 to 5, characterized in that The hitting information also includes the second table tennis state information and the hitting operation instruction before hitting the ball; the server simulates the environment of the client and deploys the game physics engine; The detecting, based on the hitting information of the opponent terminal, whether the opponent terminal uses a plug-in to modify the billiard game program includes: controlling the game physics engine to perform a hitting operation according to the hitting operation instruction based on the second billiard ball state information, to obtain third billiard ball state information; calculating a first difference value in billiard ball distribution between the first billiard ball status information of the competing terminals; If the first difference value is greater than or equal to a preset difference threshold, calculating a second difference value in billiard ball distribution between the third billiard ball state information and the first billiard ball state information of the competing end; If the second difference value is greater than or equal to a preset difference threshold, it is determined that the opponent terminal uses a plug-in to modify the billiard game program.
7. The method according to claim 6, characterized in that The first billiard ball status information includes the position of each billiard ball, and the third billiard ball status information includes the position of each billiard ball; The calculating a first difference value in billiard ball distribution between the first billiard ball status information of the competing terminals includes: Taking the absolute value of the difference between the positions of the same billiard ball at the opposing ends to obtain a first ball deviation value; Filtering the first ball deviation value with the largest value as the first difference value in the distribution of the billiard balls between the first billiard ball status information of the competing end; The calculating a second difference value in billiard ball distribution between the third billiard ball status information and the first billiard ball status information of the competing end includes: For the same billiard ball, taking the absolute value of the difference between the position of the billiard ball at the server end and the position of the billiard ball at the opponent end, to obtain a second ball deviation value; The second ball deviation value having the largest value is selected as the second difference value in the distribution of the billiard balls between the third billiard ball status information and the first billiard ball status information of the opponent end.
8. The method according to any one of claims 1 to 5, characterized in that The detection conditions include at least one of the following: The shot comparison information is that the first billiard ball status information of the competing end is different and the alarm information appears at the same time; The number of times that the shot comparison information is continuously the same as the first billiard ball status information of the competing end is greater than or equal to a preset frequency threshold; The method further comprises: In the server, when the alarm message appears and the shot comparison information is the same as the first billiard state information, it is determined that the opponent terminal is suspected of using a plug-in to modify the billiard game program.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the cheat detection method for a billiard game according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for detecting cheats in a billiard game according to any one of claims 1 to 8 is implemented.