Coordinate operation method and device, storage medium and electronic device

By decrypting and encrypting, coordinate encryption objects are created and destroyed, ensuring that encryption can still be performed in the event of an exception or program exit. This solves the problem of plaintext exposure in coordinate operations and improves security and stability.

CN115703013BActive Publication Date: 2026-07-21WUHAN DOUYU NETWORK TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUHAN DOUYU NETWORK TECHNOLOGY CO LTD
Filing Date
2021-08-16
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

During coordinate manipulation, encryption processing cannot be performed in existing technologies, resulting in coordinate information being exposed in plaintext.

Method used

The second coordinate is obtained by decrypting the first coordinate. A coordinate encryption object is created and the second coordinate is encrypted using the coordinate encryption function. After the processing is completed, the coordinate encryption object is destroyed and the coordinate encryption function is executed to ensure that the encryption process can still be performed in the event of an exception or program exit.

Benefits of technology

Even when coordinate operations malfunction or exit, the coordinate information is still stored in an encrypted state, avoiding plaintext exposure and improving the security and stability of coordinate operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115703013B_ABST
    Figure CN115703013B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a coordinate operation method and related equipment, and relates to the technical field of data processing. The method comprises the following steps: decrypting a first coordinate to obtain a second coordinate; creating a coordinate encryption object; performing coordinate processing on the second coordinate to obtain a third coordinate; and destroying the coordinate encryption object after the coordinate processing is completed, so that a coordinate encryption function is executed through a destructor of the coordinate encryption object to obtain a fourth coordinate. The application is used for coordinate operation, and mainly aims at solving the problem that the encryption processing cannot be executed when the coordinate operation is performed at present, so that the coordinate information is in a plaintext state, and thus the problem that the coordinate is exposed in the plaintext state after the coordinate operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a coordinate manipulation method, apparatus, storage medium, and electronic device. Background Technology

[0002] In the use of some applications, it is necessary to manipulate the coordinates of objects, and also to protect the data security of coordinates to prevent them from being maliciously tampered with or read by third-party tools when performing normal operations.

[0003] Currently, coordinates are usually encrypted to prevent them from being maliciously tampered with or read by third-party tools during normal operations. However, coordinate operations require plaintext coordinates. Therefore, if an error occurs during coordinate processing or the current coordinate operation is interrupted, subsequent encryption processing will not be executed, resulting in the coordinate information being in plaintext. This leads to the problem of the coordinates being exposed in plaintext after the coordinate operation. Summary of the Invention

[0004] In view of the above problems, the present invention provides a coordinate operation method and related equipment, the main purpose of which is to solve the problem that when performing coordinate operations, the encryption process is not executed, resulting in the coordinate information being in plaintext, and thus the coordinates are exposed in plaintext after the coordinate operation.

[0005] To address the aforementioned technical problems, in a first aspect, the present invention provides a coordinate manipulation method, the method comprising:

[0006] Decrypt the first coordinate to obtain the second coordinate, where the first coordinate is the initial coordinate of the encrypted state and the second coordinate is the initial coordinate of the plaintext state;

[0007] Create a coordinate encryption object, which includes a coordinate encryption function used to encrypt coordinates in plaintext state;

[0008] The second coordinate is processed to obtain the third coordinate, where the third coordinate is the target coordinate in plaintext state;

[0009] After the coordinate processing is completed, the coordinate encryption object is destroyed. Then, the coordinate encryption function is executed through the destructor of the coordinate encryption object to obtain the fourth coordinate, which is either the initial coordinate of the encryption state or the target coordinate of the encryption state.

[0010] Preferably, the coordinate encryption object further includes: a first variable, wherein the first variable is a Boolean variable, and the first variable is used to set whether to execute the coordinate encryption function. When the first variable is false, the coordinate encryption function is executed; otherwise, the coordinate encryption function is not executed.

[0011] Preferably, the coordinate encryption object further includes: a second variable, wherein the second variable is a Boolean variable, and the second variable is used to set whether the destructor can throw an exception. When the second variable is false, the destructor can throw an exception; otherwise, the destructor cannot throw an exception.

[0012] Preferably, the step of executing the coordinate encryption function further includes:

[0013] If the second variable is true and an exception occurs when executing the coordinate encryption function, the current program is terminated; otherwise, the current program continues to execute.

[0014] Preferably, the coordinate encryption object further includes a third variable, wherein the third variable is used to store the number of program exceptions when the coordinate encryption object is created.

[0015] Preferably, the step of executing the coordinate encryption function through the destructor of the coordinate encryption object further includes:

[0016] When the second variable is false, the fourth variable is obtained through the destructor of the object encrypted with coordinates. The fourth variable is the number of program exceptions that occurred when the destructor was executed.

[0017] If the third variable is less than the fourth variable, then the first variable is set to true and the coordinate encryption function is not executed; otherwise, the first variable is set to false and the coordinate encryption function is executed.

[0018] Preferably, the step of executing the coordinate encryption function through the destructor of the coordinate encryption object further includes:

[0019] When the second variable is true, the fifth variable is obtained through the destructor of the object encrypted with coordinates. The fifth variable is the number of program exceptions that occurred when the destructor was executed.

[0020] If the third variable is not less than the fifth variable, then the first variable is set to true and the coordinate encryption function is not executed; otherwise, the first variable is set to false and the coordinate encryption function is executed.

[0021] To achieve the above objectives, according to a second aspect of the present invention, a coordinate manipulation device is provided, comprising:

[0022] The decryption unit is used to decrypt the first coordinate to obtain the second coordinate, wherein the first coordinate is the initial coordinate of the encrypted state and the second coordinate is the initial coordinate of the plaintext state;

[0023] A creation unit is used to create a coordinate encryption object, wherein the coordinate encryption object includes a coordinate encryption function, which is used to encrypt the coordinates in plaintext state;

[0024] The processing unit is used to perform coordinate processing on the second coordinate to obtain the third coordinate, wherein the third coordinate is the target coordinate in plaintext state;

[0025] The destructor unit is used to destroy the coordinate encryption object after the coordinate processing is completed. The coordinate encryption function is executed through the destructor function of the coordinate encryption object to obtain the fourth coordinate, which is either the initial coordinate of the encryption state or the target coordinate of the encryption state.

[0026] To achieve the above objectives, according to a third aspect of the present invention, a storage medium is provided, the storage medium including a stored program, wherein, when the program is running, the device where the storage medium is located executes the steps of the coordinate operation method of any one of the first aspects described above.

[0027] To achieve the above objectives, according to a fourth aspect of the present invention, an electronic device is provided, the electronic device including at least one processor and at least one memory connected to the processor; wherein the processor is configured to call program instructions in the memory to execute the steps of the coordinate operation method of any of the first aspects described above.

[0028] By employing the above technical solution, this application provides a coordinate manipulation method, apparatus, storage medium, and electronic device. The main objective is to solve the problem that in current coordinate manipulation operations, encryption processing is not executed, resulting in coordinate information being exposed in plaintext after the operation. This application achieves coordinate manipulation by decrypting a first coordinate to obtain a second coordinate; creating a coordinate encryption object; processing the second coordinate to obtain a third coordinate; destroying the coordinate encryption object after processing; and then executing the coordinate encryption function through the destructor of the coordinate encryption object to obtain a fourth coordinate, thus realizing the coordinate manipulation. This solution ensures that encryption processing is executed even in cases where coordinate processing encounters an exception or the program exits the coordinate manipulation operation due to some logic issues, thereby solving the problem of coordinates being exposed in plaintext after the operation. Attached Figure Description

[0029] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of exemplary embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0030] Figure 1 A schematic flowchart illustrating a coordinate manipulation method provided in Embodiment 1 of this application;

[0031] Figure 2 This is a schematic flowchart illustrating a coordinate manipulation method provided in Embodiment 2 of this application;

[0032] Figure 3 This is a schematic flowchart illustrating a coordinate manipulation method provided in Embodiment 3 of this application;

[0033] Figure 4 This is a schematic flowchart illustrating a coordinate manipulation method provided in Embodiment 4 of this application;

[0034] Figure 5 This is a schematic structural block diagram of a coordinate manipulation device provided in Embodiment 5 of this application;

[0035] Figure 6 This is a schematic structural block diagram of an electronic device provided in Embodiment 7 of this application. Detailed Implementation

[0036] Exemplary embodiments of the present application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this application will be thorough and complete, and will fully convey the scope of the present application to those skilled in the art.

[0037] Example 1

[0038] To address the issue that encryption processing is not performed during coordinate operations, resulting in plaintext coordinate information and the coordinates being exposed in plaintext after the operation, Embodiment 1 of this application provides a coordinate operation method, such as... Figure 1 As shown, the method may include:

[0039] Step 101: Decrypt the first coordinate to obtain the second coordinate;

[0040] Wherein, the first coordinate is the initial coordinate of the encrypted state, and the second coordinate is the initial coordinate of the plaintext state.

[0041] Specifically, the specific implementation logic for decrypting coordinates can be encapsulated in a coordinate decryption function. The specific implementation logic for decrypting coordinates will use different decryption algorithms, keys, and other information depending on different needs. Therefore, different decryption algorithms, keys, or coordinate decryption function bodies can be passed into the coordinate decryption function to achieve the decryption of coordinates. The specific implementation of coordinate decryption in this application embodiment is not limited.

[0042] It should be noted that the initial coordinates of the plaintext state can be obtained through step 101, so that the initial coordinates can be processed in the future.

[0043] Step 102: Create a coordinate encryption object;

[0044] The coordinate encryption object includes a coordinate encryption function, which is used to encrypt the coordinates in plaintext.

[0045] Specifically, the coordinate encryption function encapsulates the specific implementation logic for encrypting coordinates. The specific implementation logic for encrypting coordinates will use different encryption algorithms, keys, and other information depending on different needs. Therefore, different encryption algorithms, keys, or coordinate encryption function bodies can be passed into the coordinate encryption function to achieve the encryption of coordinates. The specific implementation of the coordinate encryption function is not limited in the embodiments of this application.

[0046] It should be noted that step 102 can create a coordinate encryption object containing a coordinate encryption function during the coordinate operation, so that the coordinates can be encrypted later.

[0047] Step 103: Perform coordinate processing on the second coordinate to obtain the third coordinate;

[0048] The third coordinate is the target coordinate in plaintext state.

[0049] Specifically, developers will write the specific implementation logic for coordinate processing according to different needs. For example, in some video game scenarios, the next character coordinates that need to be updated are calculated based on the initial coordinates, movement speed, and time of the game character. The calculated new character coordinates are the target coordinates. Of course, the specific implementation of coordinate processing is not limited in this application embodiment.

[0050] It should be noted that the coordinate processing process requires the execution of the plaintext state coordinates. Step 103 can update the initial coordinates of the plaintext state to the target coordinates of the plaintext state.

[0051] Step 104: After coordinate processing is completed, destroy the coordinate encryption object so that the coordinate encryption function can be executed through the destructor of the coordinate encryption object to obtain the fourth coordinate;

[0052] The fourth coordinate is either the initial coordinate of the encrypted state or the target coordinate of the encrypted state.

[0053] Specifically, the destructor is a method in object-oriented programming (major object-oriented programming languages ​​include C++, Common Lisp, Python, Objective-C, Delphi, Swift, Perl, Ruby, JavaScript, and PHP, etc.). When the object's lifecycle ends (i.e., when the coordinate encryption object is destroyed), the destructor is automatically called and executed. After execution, the destructor clears and releases the memory resources previously created or occupied by the object (such as the coordinate encryption function in this embodiment). Regardless of how the coordinate processing ends (including normal execution, an exception, or the program exiting the coordinate operation due to some logic in the coordinate processing), the destructor of the coordinate encryption object will be executed. When the coordinate processing ends normally, the target coordinates of the encrypted state are obtained. When an exception occurs or the program exits the coordinate operation due to some logic in the coordinate processing, resulting in the coordinate processing not being executed, the initial coordinates of the encrypted state are obtained. When only part of the coordinate processing is executed, a coordinate between the initial coordinates and the target coordinates of the encrypted state is obtained.

[0054] It should be noted that in the prior art, coordinate operations are usually executed in the logical order of decryption, coordinate processing, and encryption. If an exception occurs during the coordinate processing or the program exits the coordinate operation process due to some logic of the coordinate processing, the subsequent encryption process will not be executed, resulting in the coordinates being exposed in plaintext. However, the embodiments of this application ensure that the encryption process is executed even if an exception occurs during the coordinate processing or the program exits the coordinate operation due to some logic of the coordinate processing, by creating a coordinate encryption object before the coordinate processing in step 102 and executing the destructor of the coordinate encryption object after the coordinate processing in step 104. This avoids the situation where the coordinates after coordinate processing are not encrypted.

[0055] By employing the above technical solution, Embodiment 1 of this application provides a coordinate operation method, the main purpose of which is to solve the problem that when performing coordinate operations, the encryption process is not executed, resulting in the coordinate information being in plaintext, thus exposing the coordinates in plaintext after the coordinate operation. Embodiment 1 of this application decrypts the first coordinate to obtain the second coordinate, wherein the first coordinate is the initial coordinate in the encrypted state, and the second coordinate is the initial coordinate in the plaintext state; a coordinate encryption object is created, wherein the coordinate encryption object includes a coordinate encryption function used to encrypt the coordinates in the plaintext state; coordinate processing is performed on the second coordinate to obtain the third coordinate, wherein the third coordinate is the target coordinate in the plaintext state; after the coordinate processing is completed, the coordinate encryption object is destroyed, and the coordinate encryption function is executed through the destructor of the coordinate encryption object to obtain the fourth coordinate, wherein the fourth coordinate is either the initial coordinate in the encrypted state or the target coordinate in the encrypted state, thus realizing the coordinate operation. The above solution can achieve the technical effect that the encryption process will be executed even if an exception occurs during coordinate processing or the program exits the coordinate operation due to some logic in the coordinate processing, thereby solving the problem that the coordinates are exposed in plaintext after the coordinate operation.

[0056] Example 2

[0057] To enable those skilled in the art to more thoroughly understand this application and to fully convey the scope of this application to them, Embodiment Two of this application, based on Embodiment One described above, further illustrates a coordinate manipulation method defined in this application, such as... Figure 2 As shown, the method includes:

[0058] Step 201: Decrypt the first coordinate to obtain the second coordinate;

[0059] Wherein, the first coordinate is the initial coordinate of the encrypted state, and the second coordinate is the initial coordinate of the plaintext state.

[0060] It should be noted that the initial coordinates of the plaintext state can be obtained through step 201, so that the initial coordinates can be processed in the future.

[0061] Step 202: Create a coordinate encryption object;

[0062] The coordinate encryption object includes a coordinate encryption function, which is used to encrypt the coordinates in plaintext.

[0063] It should be noted that step 202 can create a coordinate encryption object including a coordinate encryption function during the coordinate operation, so that the coordinates can be encrypted later.

[0064] Preferably, the coordinate encryption object may also include a first variable;

[0065] The first variable is a Boolean variable used to determine whether to execute the coordinate encryption function. If the first variable is false, the coordinate encryption function is executed; otherwise, the coordinate encryption function is not executed.

[0066] Specifically, Boolean is a logical data type in computer science, named after George Boole, the mathematician who invented Boolean algebra. Boolean is a primitive type with only two values, typically true or false. The creation and assignment of the first variable are encapsulated at the underlying level and can be exposed to the outside through a unified interface. It can also be inherited and extended according to actual needs. The constructor of the class to which the first variable belongs can be encapsulated using the keyword protected as an access modifier, allowing derived classes of that class to access and use the constructor, while external program code cannot access or use it. This prevents it from being used directly from the outside and requires inheritance. This decouples the creation and assignment of the first variable from the encryption process, thereby ensuring the concealment and security of the encryption process and the low coupling of the coordinate operation process.

[0067] It should be noted that by limiting the selection of the coordinate encryption object as described above, the encryption operation can be selectively executed to meet the needs of different scenarios regarding whether or not to perform encryption processing on the coordinates.

[0068] For example, the creation of the first variable and related operations can be implemented using the following code:

[0069]

[0070] Here, "class EncryptBase" represents a class named EncryptBase; "bool disable_;" represents the creation of a first variable of boolean type named disable_; "void disable() {disable_=true;}" represents an interface named disable, which can assign the first variable the value of true; "protected:" represents the encapsulation of subsequent constructors in a protected state; "EncryptBase():disable_(false){}" represents a parameterless constructor that can assign the first variable the value of false.

[0071] It should be noted that when the first variable disable_ is true, it indicates that the coordinate encryption function is not executed; when the first variable disable_ is false, it indicates that the coordinate encryption function is executed. The above code exemplarily demonstrates the implementation of some operations related to the creation of the first variable, but it is not the only implementation of this part in the embodiments of this application.

[0072] Preferably, the coordinate encryption object may also include a second variable;

[0073] The second variable is a Boolean variable used to determine whether the destructor can throw an exception. When the second variable is false, the destructor can throw an exception; otherwise, the destructor cannot throw an exception.

[0074] Specifically, add a second variable to the noexcept specifier of the destructor of the coordinate encryption object.

[0075] It should be noted that the noexcept specifier of the destructor is used to declare whether the destructor will throw an exception. The second variable can be set differently to meet different needs in different scenarios. For example, during the program development or testing phase, the second variable can be set to false so that the destructor can throw an exception, allowing developers to improve and refine the program based on the thrown exception. During the production or application phase, the second variable can be set to true so that the destructor cannot throw an exception, avoiding program crashes caused by exceptions, and thus preventing users from being affected by exceptions. Of course, those skilled in the art can set the second variable according to different specific scenarios, and the embodiments of this application do not limit it.

[0076] Step 203: Perform coordinate processing on the second coordinate to obtain the third coordinate;

[0077] Among them, the third coordinate is the target coordinate in plaintext state;

[0078] It should be noted that the coordinate processing process requires the plaintext state coordinates to be executed. Step 203 can update the initial coordinates of the plaintext state to the target coordinates of the plaintext state.

[0079] Step 204: After coordinate processing is completed, destroy the coordinate encryption object. Then, through the destructor of the coordinate encryption object, execute the coordinate encryption function. If the second variable is true and an exception occurs when executing the coordinate encryption function, terminate the current program. Otherwise, continue executing the current program to obtain the fourth coordinate.

[0080] The fourth coordinate is either the initial coordinate of the encrypted state or the target coordinate of the encrypted state.

[0081] Specifically, you can use try and catch statements to catch exceptions that occur when the coordinate encryption function is used.

[0082] It should be noted that in existing technologies, coordinate operations are typically executed in the logical order of decryption, coordinate processing, and encryption. If an exception occurs during coordinate processing or the program exits the coordinate operation process due to some logic issues, subsequent encryption processing will not be executed, resulting in the coordinates being exposed in plaintext. However, in this embodiment, by creating a coordinate encryption object before coordinate processing in step 202 and executing the destructor of the coordinate encryption object after coordinate processing in step 204, the encryption process is ensured to be executed even if an exception occurs during coordinate processing or the program exits the coordinate operation due to some logic issues, thus avoiding the situation where the coordinates after processing are not encrypted. When the second variable is true, it indicates that the destructor cannot throw an exception. If an exception occurs when executing the coordinate encryption function, it will cause the program to crash. However, through step 204, the exception generated during the coordinate encryption function can be caught using try and catch statements, which can normally terminate the continued execution of the current program, avoiding program crashes during coordinate operations, ensuring the stability of coordinate operations, and making it easy to find where the program terminated through stack traces when troubleshooting, facilitating troubleshooting of coordinate operations.

[0083] For example, step 204 can be implemented by the following code section:

[0084]

[0085] In the code above, lines 1 and 4 determine whether the second variable is true. If it is true, lines 2 and 3 are executed; otherwise, line 5 is executed. Here, "Execute" represents the second variable, and "function_();" represents the coordinate encryption function. Lines 2 and 3 indicate that if an exception occurs during the execution of the coordinate encryption function, the current program is terminated. Here, "std::terminate();" indicates normal termination of the current program's continued execution.

[0086] It should be noted that the above code exemplifies the implementation of step 204, but is not the only implementation of this part of the embodiments of this application.

[0087] By employing the above technical solution, Embodiment 2 of this application provides a coordinate operation method. Its main purpose is to solve the problem that, in current coordinate operations, encryption processing is not executed, resulting in plaintext coordinate information and the coordinates being exposed in plaintext after the operation. Furthermore, it also solves the problem of program crashes caused by exceptions during the execution of the coordinate encryption function. Embodiment 2 of this application decrypts the first coordinate to obtain the second coordinate; creates a coordinate encryption object; processes the second coordinate to obtain the third coordinate; destroys the coordinate encryption object after the processing is complete; and executes the coordinate encryption function through the destructor of the coordinate encryption object. If the second variable is true and an exception occurs during the execution of the coordinate encryption function, the current program terminates; otherwise, the current program continues to obtain the fourth coordinate, thus realizing the coordinate operation. This solution achieves the technical effect that encryption processing is executed even when an exception occurs during coordinate processing or the program exits the coordinate operation due to some logic in the coordinate processing, thereby solving the problem of coordinates being exposed in plaintext after the operation. The above solution, based on Embodiment 1 of this application, further ensures the stability of coordinate operations and facilitates troubleshooting during coordinate operations.

[0088] Example 3

[0089] To enable those skilled in the art to more thoroughly understand this application and to fully convey the scope of this application to them, Embodiment 3 of this application, based on Embodiment 1 above, further describes a coordinate manipulation method defined in this application, such as... Figure 3 As shown, the method includes:

[0090] Step 301: Decrypt the first coordinate to obtain the second coordinate;

[0091] Wherein, the first coordinate is the initial coordinate of the encrypted state, and the second coordinate is the initial coordinate of the plaintext state.

[0092] It should be noted that the initial coordinates of the plaintext state can be obtained through step 301, so that the initial coordinates can be processed in the future.

[0093] Step 302: Create a coordinate encryption object;

[0094] The coordinate encryption object includes a coordinate encryption function, a first variable, a second variable, and a third variable. The coordinate encryption function is used to encrypt the coordinates in the plaintext state. The first variable is a Boolean variable used to determine whether the coordinate encryption function is executed. If the first variable is false, the coordinate encryption function is executed; otherwise, it is not executed. The second variable is also a Boolean variable used to determine whether the destructor can throw an exception. If the second variable is false, the destructor can throw an exception; otherwise, it cannot throw an exception. The third variable stores the number of program exceptions encountered when the coordinate encryption object was created.

[0095] Specifically, the creation and assignment of the first variable are encapsulated at the underlying level and can be exposed to a unified interface for external calls. It can also be inherited and extended according to actual needs. The constructor of the class to which the first variable belongs can be encapsulated using the keyword `protected` as an access modifier, allowing derived classes of that class to access and use the constructor, while external program code cannot access or use it. This prevents direct external use and requires inheritance, thus decoupling the creation and assignment of the first variable from the encryption process, thereby ensuring the concealment and security of the encryption process and low coupling in the coordinate operation process. A second variable is added to the `noexcept` specifier of the destructor of the coordinate encryption object. The third variable can be assigned a value using the function `uncaught_exceptions()`, which is used to obtain the number of exceptions in the current program.

[0096] It should be noted that the number of exceptions in the current program can be determined through the third variable. This allows for comparison of the number of exceptions during destructor execution with the third variable, thus determining whether any exceptions occurred during coordinate processing. Step 302 allows the creation of a coordinate encryption object, including a coordinate encryption function, during coordinate operations, enabling subsequent coordinate encryption. The encryption operation can be selectively executed to meet the needs of different scenarios regarding whether or not to perform coordinate encryption. Different settings can be applied to the second variable to satisfy different requirements in different scenarios. The number of exceptions in the current program when the function encryption object is created can be determined.

[0097] Step 303: Perform coordinate processing on the second coordinate to obtain the third coordinate;

[0098] Among them, the third coordinate is the target coordinate in plaintext state;

[0099] It should be noted that the coordinate processing process requires the plaintext state coordinates to be executed. Step 303 can update the initial coordinates of the plaintext state to the target coordinates of the plaintext state.

[0100] Step 304: After coordinate processing is completed, destroy the coordinate encryption object. When the second variable is false, obtain the fourth variable through the destructor of the coordinate encryption object. If the third variable is less than the fourth variable, set the first variable to true and do not execute the coordinate encryption function. Otherwise, set the first variable to false, execute the coordinate encryption function, and obtain the fourth coordinate.

[0101] The fourth variable is the number of program exceptions during the execution of the destructor, and the fourth coordinate is the initial coordinate of the encrypted state or the target coordinate of the encrypted state.

[0102] Specifically, the fourth variable and the third variable can be obtained in the same way; if the destructor throws an exception and the coordinate processing produces an exception, set the first variable to true and do not execute the coordinate encryption function; otherwise, set the first variable to false and execute the coordinate encryption function.

[0103] It should be noted that step 304 ensures that encryption is performed only when no anomalies occur during coordinate processing, thus obtaining the fourth coordinate. This satisfies the scenario where coordinates need to be encrypted only when no anomalies occur in the program, thereby improving program performance during coordinate operations.

[0104] For example, a portion of the implementation of Embodiment 3 of this application can be accomplished by the following code:

[0105]

[0106] Here, "class EncryptBase" represents a class named EncryptBase; "bool disable_;" represents the creation of a first variable of boolean type named disable_; "void disable() {disable_=true;}" represents an interface named disable, which can assign the first variable the value of true; "protected:" represents the encapsulation of subsequent constructors in a protected state; "EncryptBase():disable_(false){}" represents a parameterless constructor that can assign the first variable the value of false.

[0107] Specifically, the constructor of the class to which the first variable belongs can be encapsulated using the keyword `protected` as an access modifier. This allows derived classes of that class to access and use the constructor, but external program code cannot access or use it. Consequently, it cannot be used directly from the outside and must be used through inheritance. This decouples the creation and assignment of the first variable from the encryption process, thereby ensuring the concealment and security of the encryption process and the low coupling of the coordinate operation process. The code above is used to implement the creation of the first variable and other related operations.

[0108]

[0109]

[0110] The code snippet is structured as follows: Line 1 declares the template with two parameters, "typename Func" and "bool Execute". "Func" is used to pass the coordinate processing function, and "Execute" is used to pass the second variable. Line 2 indicates that the AutoEncrypt class template inherits from the previously mentioned EncryptBase class. Line 3 creates a class member variable named "function_". Line 4 creates a constructor that stores the coordinate processing function in the member variable. Line 5 creates a destructor that throws an exception when the second variable Execute is false, and does not throw an exception when Execute is true. Line 6 checks if the first variable disable_ is false. If it is, execution continues; otherwise, execution terminates. Lines 7-10 indicate that if the second variable is true and an exception occurs during coordinate encryption, the current program terminates; otherwise, execution continues.

[0111] Specifically, using try and catch statements to catch exceptions generated during coordinate encryption functions allows for the normal termination of the current program's execution, preventing program crashes during coordinate operations, ensuring the stability of coordinate operations, and making it easy to find where the program terminated through stack traces when troubleshooting, facilitating problem investigation during coordinate operations; the code in the aforementioned AutoEncrypt class template is used to pass in the encryption processing function and implement the encryption processing to provide the encryption processing function functionality to the outside world.

[0112]

[0113] The code snippet is as follows: Line 1 declares a template with two parameters, "typename Func" and "bool Execute". "Func" is used to pass in the coordinate processing function, and "Execute" is used to pass in the second variable. Lines 1 and 2 encapsulate a class template named "ExceptionEncrypt". Line 3 defines a member variable `safe_` of the `AutoEncrypt` class and passes the coordinate processing function and the second variable to it. Line 4 creates a third variable `exIndex_` to record the number of exceptions in the current program. Line 5 creates a constructor that stores the coordinate processing function in a member variable. Line 6 creates a destructor that throws an exception when the value of the second variable `Execute` is false, and does not throw an exception when the value of `Execute` is true. The "***" indicates omitted code (used to execute: create a fourth variable, compare the third and fourth variables, and not execute the coordinate encryption function when the second variable is false and the third variable is less than the fourth variable, or when the second variable is true and the third variable is not less than the fourth variable).

[0114] Specifically, the number of exceptions in the current program can be determined through the third variable. This allows us to compare the number of exceptions during the execution of the destructor with the third variable in the destructor, thus determining whether any exceptions occurred during coordinate processing. The code of the ExceptionEncrypt class template mentioned above can serve as a base class for subsequent specialization for different needs.

[0115] It should be noted that in scenarios where coordinates need to be encrypted only in the event of a program exception, the code `ExceptionEncryptSuc` can be used.<typename Func,false> Specialize the coordinate encryption object with the parameter Execute set to false; By comparing the execution code of the coordinate operation in Embodiment 3 of this application with the prior art below, the advantages and benefits of Embodiment 3 of this application can be better understood:

[0116] Existing technology:

[0117]

[0118] Example 3 of this application:

[0119] Void ProcessPosition(vector3 pos){ / / The passed parameter is the initial coordinates of the encrypted state.

[0120] Decrypt(pos); / / Decryption process

[0121] ExceptionEncryptSuc obj(Encrypt(pos)); / / Create a coordinate encryption object

[0122] *** / / Code for coordinate processing omitted

[0123] }

[0124] It should be noted that the content after " / / " in each line is used to comment out the meaning of that line of code. Existing technology executes the decryption, coordinate processing, and encryption processing in a logical order. If an exception occurs during the coordinate processing or the program exits the coordinate operation process due to some logic of the coordinate processing, the subsequent encryption processing will not be executed, causing the coordinates to be exposed in plaintext. However, in the third embodiment of this application, the above code can ensure that the encryption processing is performed only when no exception occurs in the coordinate processing, so as to obtain the fourth coordinate, thereby improving the program performance during coordinate operations.

[0125] By employing the above technical solutions, Embodiment 3 of this application provides a coordinate operation method. Its main purpose is to solve the problem that, in current coordinate operations, encryption processing is not executed, resulting in plaintext coordinate information and the coordinates being exposed in plaintext after the operation. Furthermore, it ensures that encryption processing is only performed when no anomalies occur during coordinate processing. Embodiment 3 of this application decrypts the first coordinate to obtain the second coordinate; creates a coordinate encryption object; performs coordinate processing on the second coordinate to obtain the third coordinate; destroys the coordinate encryption object after coordinate processing; when the second variable is false, a fourth variable is obtained through the destructor of the coordinate encryption object; if the third variable is less than the fourth variable, the first variable is set to true, and the coordinate encryption function is not executed; otherwise, the first variable is set to false, the coordinate encryption function is executed, and the fourth coordinate is obtained, thus realizing the coordinate operation. This solution, based on Embodiment 1 of this application, further satisfies the scenario where coordinate encryption processing is only required when no program anomalies occur, improving program performance during coordinate operations.

[0126] Example 4

[0127] To enable those skilled in the art to more thoroughly understand this application and to fully convey the scope of this application to them, Embodiment 4 of this application, based on Embodiment 1 above, further describes a coordinate manipulation method defined in this application, such as... Figure 4 As shown, the method includes:

[0128] Step 401: Decrypt the first coordinate to obtain the second coordinate;

[0129] Wherein, the first coordinate is the initial coordinate of the encrypted state, and the second coordinate is the initial coordinate of the plaintext state.

[0130] It should be noted that the initial coordinates of the plaintext state can be obtained through step 401, so that the initial coordinates can be processed in the future.

[0131] Step 402: Create a coordinate encryption object;

[0132] The coordinate encryption object includes a coordinate encryption function, a first variable, a second variable, and a third variable. The coordinate encryption function is used to encrypt the coordinates in the plaintext state. The first variable is a Boolean variable used to determine whether the coordinate encryption function is executed. If the first variable is false, the coordinate encryption function is executed; otherwise, it is not executed. The second variable is also a Boolean variable used to determine whether the destructor can throw an exception. If the second variable is false, the destructor can throw an exception; otherwise, it cannot throw an exception. The third variable stores the number of program exceptions encountered when the coordinate encryption object was created.

[0133] Specifically, the creation and assignment of the first variable are encapsulated at the underlying level and can be exposed to a unified interface for external calls. It can also be inherited and extended according to actual needs. The constructor of the class to which the first variable belongs can be encapsulated using the keyword `protected` as an access modifier, allowing derived classes of that class to access and use the constructor, while external program code cannot access or use it. This prevents direct external use and requires inheritance, thus decoupling the creation and assignment of the first variable from the encryption process, thereby ensuring the concealment and security of the encryption process and low coupling in the coordinate operation process. A second variable is added to the `noexcept` specifier of the destructor of the coordinate encryption object. The third variable can be assigned a value using the function `uncaught_exceptions()`, which is used to obtain the number of exceptions in the current program.

[0134] It should be noted that the number of exceptions in the current program can be determined through the third variable. This allows for comparison of the number of exceptions during destructor execution with the third variable, thus determining whether any exceptions occurred during coordinate processing. Step 402 allows the creation of a coordinate encryption object, including a coordinate encryption function, during coordinate operations, enabling subsequent coordinate encryption. The encryption operation can be selectively executed to meet the needs of different scenarios regarding whether or not to perform coordinate encryption. Different settings can be applied to the second variable to satisfy different requirements in different scenarios. The number of exceptions in the current program when the function encryption object is created can be determined.

[0135] Step 403: Perform coordinate processing on the second coordinate to obtain the third coordinate;

[0136] Among them, the third coordinate is the target coordinate in plaintext state;

[0137] It should be noted that the coordinate processing process requires the plaintext state coordinates to be executed. Step 403 can update the initial coordinates of the plaintext state to the target coordinates of the plaintext state.

[0138] Step 404: After coordinate processing is completed, destroy the coordinate encryption object. When the second variable is false, obtain the fifth variable through the destructor of the coordinate encryption object. If the third variable is not less than the fifth variable, set the first variable to true and do not execute the coordinate encryption function. Otherwise, set the first variable to false, execute the coordinate encryption function, and obtain the fourth coordinate.

[0139] The fifth variable is the number of program exceptions during the execution of the destructor, and the fourth coordinate is the initial coordinate of the encrypted state or the target coordinate of the encrypted state.

[0140] Specifically, the fifth variable and the third variable can be obtained in the same way; if the destructor throws an exception and the coordinate processing produces an exception, set the first variable to true and do not execute the coordinate encryption function; otherwise, set the first variable to false and execute the coordinate encryption function.

[0141] It should be noted that step 404 ensures that encryption is performed only when an anomaly occurs in coordinate processing, resulting in the fourth coordinate. This satisfies the scenario where coordinates need to be encrypted only in the event of a program malfunction, thus ensuring coordinate security during coordinate operations.

[0142] For example, a portion of the implementation of Embodiment 4 of this application can be accomplished by the following code:

[0143]

[0144] Here, "class EncryptBase" represents a class named EncryptBase; "bool disable_;" represents the creation of a first variable of boolean type named disable_; "void disable() {disable_=true;}" represents an interface named disable, which can assign the first variable the value of true; "protected:" represents the encapsulation of subsequent constructors in a protected state; "EncryptBase():disable_(false){}" represents a parameterless constructor that can assign the first variable the value of false.

[0145] Specifically, the constructor of the class to which the first variable belongs can be encapsulated using the keyword `protected` as an access modifier. This allows derived classes of that class to access and use the constructor, but external program code cannot access or use it. Consequently, it cannot be used directly from the outside and must be used through inheritance. This decouples the creation and assignment of the first variable from the encryption process, thereby ensuring the concealment and security of the encryption process and the low coupling of the coordinate operation process. The code above is used to implement the creation of the first variable and other related operations.

[0146]

[0147] The code snippet is structured as follows: Line 1 declares the template with two parameters, "typename Func" and "bool Execute". "Func" is used to pass the coordinate processing function, and "Execute" is used to pass the second variable. Line 2 indicates that the AutoEncrypt class template inherits from the previously mentioned EncryptBase class. Line 3 creates a class member variable named "function_". Line 4 creates a constructor that stores the coordinate processing function in the member variable. Line 5 creates a destructor that throws an exception when the second variable Execute is false, and does not throw an exception when Execute is true. Line 6 checks if the first variable disable_ is false. If it is, execution continues; otherwise, execution terminates. Lines 7-10 indicate that if the second variable is true and an exception occurs during coordinate encryption, the current program terminates; otherwise, execution continues.

[0148] Specifically, using try and catch statements to catch exceptions generated during coordinate encryption functions allows for the normal termination of the current program's execution, preventing program crashes during coordinate operations, ensuring the stability of coordinate operations, and making it easy to find where the program terminated through stack traces when troubleshooting, facilitating problem investigation during coordinate operations; the code in the aforementioned AutoEncrypt class template is used to pass in the encryption processing function and implement the encryption processing to provide the encryption processing function functionality to the outside world.

[0149]

[0150] The code snippet is structured as follows: Line 1 declares a template with two parameters: "typename Func" and "bool Execute". "Func" is used to pass in the coordinate processing function, and "Execute" is used to pass in the second variable. Lines 1 and 2 encapsulate a class template named "ExceptionEncrypt". Line 3 defines a member variable `safe_` of the `AutoEncrypt` class and passes the coordinate processing function and the second variable to it. Line 4 creates a third variable `exIndex_` to record the number of exceptions in the current program. Line 5 creates a constructor that stores the coordinate processing function in a member variable. Line 6 creates a destructor that throws an exception when the value of the second variable `Execute` is false, and does not throw an exception when the value of `Execute` is true. The "***" indicates omitted code (used to execute: create a fifth variable, compare the third and fifth variables, and not execute the coordinate encryption function when the second variable is false and the third variable is less than the fifth variable, or when the second variable is true and the third variable is not less than the fifth variable).

[0151] Specifically, the number of exceptions in the current program can be determined through the third variable. This allows us to compare the number of exceptions during the execution of the destructor with the third variable in the destructor, thus determining whether any exceptions occurred during coordinate processing. The code of the ExceptionEncrypt class template mentioned above can serve as a base class for subsequent specialization for different needs.

[0152] It should be noted that in scenarios where coordinates need to be encrypted only in the event of a program exception, the code `ExceptionEncryptFail` should be used.<typename Func,true> Specialize the coordinate encryption object with the parameter Execute set to true; By comparing the execution code of the coordinate operation in Embodiment 4 of this application with the prior art, the advantages and benefits of Embodiment 4 of this application can be better understood:

[0153] Existing technology:

[0154]

[0155]

[0156] Example 4 of this application:

[0157] Void ProcessPosition(vector3 pos){ / / The passed parameter is the initial coordinates of the encrypted state.

[0158] Decrypt(pos); / / Decryption process

[0159] ExceptionEncryptFail obj(Encrypt(pos)); / / Create a coordinate encryption object

[0160] *** / / Code for coordinate processing omitted

[0161] }

[0162] It should be noted that the content after " / / " in each line is used to comment out the meaning of that line of code. Existing technology executes the decryption, coordinate processing, and encryption processing in a logical order. If an exception occurs during the coordinate processing or the program exits the coordinate operation process due to some logic of the coordinate processing, the subsequent encryption processing will not be executed, causing the coordinates to be exposed in plaintext. However, in the fourth embodiment of this application, the above code can ensure that encryption processing is only performed when an exception occurs in the coordinate processing, thus obtaining the fourth coordinate and ensuring the coordinate security during coordinate operations.

[0163] By employing the above technical solutions, Embodiment 4 of this application provides a coordinate operation method. Its main purpose is to solve the problem that, in current coordinate operations, encryption processing is not executed, resulting in plaintext coordinate information and the coordinates being exposed in plaintext after the operation. Furthermore, it ensures that encryption processing is only performed when coordinate processing malfunctions. Embodiment 4 of this application decrypts the first coordinate to obtain the second coordinate; creates a coordinate encryption object; performs coordinate processing on the second coordinate to obtain the third coordinate; destroys the coordinate encryption object after coordinate processing; when the second variable is false, the fifth variable is obtained through the destructor of the coordinate encryption object; if the third variable is not less than the fifth variable, the first variable is set to true, and the coordinate encryption function is not executed; otherwise, the first variable is set to false, the coordinate encryption function is executed, and the fourth coordinate is obtained, thus realizing the coordinate operation. The above solution, based on Embodiment 1 of this application, further satisfies the scenario where coordinate encryption processing is only performed in the event of a program malfunction, ensuring coordinate security during coordinate operations.

[0164] Example 5

[0165] Furthermore, as an implementation of the aforementioned method embodiments, Embodiment 5 of this application provides a coordinate manipulation device for implementing the aforementioned method embodiments. This device embodiment corresponds to the aforementioned method embodiments. For ease of reading, this coordinate manipulation device embodiment will not repeat the details of the aforementioned method embodiments one by one, but it should be understood that the device in Embodiment 5 of this application can correspondingly implement all the contents of the aforementioned method embodiments. For example... Figure 5 As shown, the device 50 includes: a decryption unit 501, a creation unit 502, a processing unit 503, and a backhoe unit 504, wherein,

[0166] The decryption unit 501 is used to decrypt the first coordinates to obtain the second coordinates, wherein the first coordinates are the initial coordinates of the encrypted state and the second coordinates are the initial coordinates of the plaintext state.

[0167] Creation unit 502 is used to create a coordinate encryption object, wherein the coordinate encryption object includes a coordinate encryption function, which is used to encrypt the coordinates in the plaintext state;

[0168] The processing unit 503 is used to perform coordinate processing on the second coordinate to obtain the third coordinate, wherein the third coordinate is the target coordinate in plaintext state;

[0169] Destruction unit 504 is used to destroy the coordinate encryption object after coordinate processing is completed, so as to execute the coordinate encryption function through the destructor function of the coordinate encryption object to obtain the fourth coordinate, where the fourth coordinate is the initial coordinate of the encryption state or the target coordinate of the encryption state.

[0170] Preferably, the coordinate encryption object may further include: a first variable, wherein the first variable is a Boolean variable, and the first variable is used to set whether to execute the coordinate encryption function. When the first variable is false, the coordinate encryption function is executed; otherwise, the coordinate encryption function is not executed.

[0171] Preferably, the coordinate encryption object may further include: a second variable, wherein the second variable is a Boolean variable, and the second variable is used to set whether the destructor can throw an exception. When the second variable is false, the destructor can throw an exception; otherwise, the destructor cannot throw an exception.

[0172] Preferably, the destructor unit 504 may further include: for executing a coordinate encryption function, if the second variable is true and an exception occurs when executing the coordinate encryption function, then the current program is terminated; otherwise, the current program continues to be executed.

[0173] Preferably, the coordinate encryption object may further include a third variable, wherein the third variable is used to store the number of program exceptions when the coordinate encryption object is created.

[0174] Preferably, the destructor unit 504 may further include: when the second variable is false, obtaining the fourth variable through the destructor function of the coordinate encryption object, wherein the fourth variable is the number of program exceptions when the destructor function is executed; if the third variable is less than the fourth variable, then setting the first variable to true and not executing the coordinate encryption function; otherwise, setting the first variable to false and executing the coordinate encryption function.

[0175] Preferably, the destructor unit 504 may further include: when the second variable is true, obtaining the fifth variable through the destructor function of the coordinate encryption object, wherein the fifth variable is the number of program exceptions when the destructor function is executed; if the third variable is not less than the fifth variable, then setting the first variable to true and not executing the coordinate encryption function; otherwise, setting the first variable to false and executing the coordinate encryption function.

[0176] Based on the above technical solution, Embodiment 5 of this application also provides a coordinate manipulation device, the main purpose of which is to solve the problem that in current coordinate manipulation, encryption processing is not executed, resulting in the coordinate information being in plaintext, thus exposing the coordinates in plaintext after the coordinate manipulation. Embodiment 5 of this application decrypts the first coordinate to obtain the second coordinate, wherein the first coordinate is the initial coordinate in the encrypted state, and the second coordinate is the initial coordinate in the plaintext state; a coordinate encryption object is created, wherein the coordinate encryption object includes a coordinate encryption function used to encrypt the coordinates in the plaintext state; coordinate processing is performed on the second coordinate to obtain the third coordinate, wherein the third coordinate is the target coordinate in the plaintext state; after the coordinate processing is completed, the coordinate encryption object is destroyed, and the coordinate encryption function is executed through the destructor of the coordinate encryption object to obtain the fourth coordinate, wherein the fourth coordinate is either the initial coordinate in the encrypted state or the target coordinate in the encrypted state, thus realizing the coordinate manipulation. The above solution can achieve the technical effect that encryption processing will be executed even if an anomaly occurs during coordinate processing or the program exits the coordinate manipulation due to some logic in the coordinate processing, thereby solving the problem that the coordinates are exposed in plaintext after the coordinate manipulation.

[0177] Example 6

[0178] This application also provides a storage medium storing a program that, when executed by a processor, implements the following coordinate manipulation method:

[0179] Decrypt the first coordinate to obtain the second coordinate, where the first coordinate is the initial coordinate of the encrypted state and the second coordinate is the initial coordinate of the plaintext state;

[0180] Create a coordinate encryption object, which may include a coordinate encryption function, used to encrypt coordinates in plaintext state;

[0181] The second coordinate is processed to obtain the third coordinate, where the third coordinate is the target coordinate in plaintext state;

[0182] After the coordinate processing is completed, the coordinate encryption object is destroyed. Then, the coordinate encryption function is executed through the destructor of the coordinate encryption object to obtain the fourth coordinate, which is either the initial coordinate of the encryption state or the target coordinate of the encryption state.

[0183] Preferably, the coordinate encryption object may further include: a first variable, wherein the first variable is a Boolean variable, and the first variable is used to set whether to execute the coordinate encryption function. When the first variable is false, the coordinate encryption function is executed; otherwise, the coordinate encryption function is not executed.

[0184] Preferably, the coordinate encryption object may further include: a second variable, wherein the second variable is a Boolean variable, and the second variable is used to set whether the destructor can throw an exception. When the second variable is false, the destructor can throw an exception; otherwise, the destructor cannot throw an exception.

[0185] Preferably, the step of executing the coordinate encryption function may further include:

[0186] If the second variable is true and an exception occurs when executing the coordinate encryption function, the current program is terminated; otherwise, the current program continues to execute.

[0187] Preferably, the coordinate encryption object may further include a third variable, wherein the third variable is used to store the number of program exceptions when the coordinate encryption object is created.

[0188] Preferably, the step of executing the coordinate encryption function through the destructor of the coordinate encryption object may further include:

[0189] When the second variable is false, the fourth variable is obtained through the destructor of the object encrypted with coordinates. The fourth variable is the number of program exceptions that occurred when the destructor was executed.

[0190] If the third variable is less than the fourth variable, then the first variable is set to true and the coordinate encryption function is not executed; otherwise, the first variable is set to false and the coordinate encryption function is executed.

[0191] Preferably, the step of executing the coordinate encryption function through the destructor of the coordinate encryption object may further include:

[0192] When the second variable is true, the fifth variable is obtained through the destructor of the object encrypted with coordinates. The fifth variable is the number of program exceptions that occurred when the destructor was executed.

[0193] If the third variable is not less than the fifth variable, then the first variable is set to true and the coordinate encryption function is not executed; otherwise, the first variable is set to false and the coordinate encryption function is executed.

[0194] Example 7

[0195] Embodiment 7 of this application provides an electronic device 60, such as... Figure 6 As shown, the device includes at least one processor 601 and at least one memory 602 connected to the processor; wherein the processor 601 is used to call program instructions in the memory 602 to execute the coordinate operation method described above.

[0196] By employing the above technical solutions, this application provides a coordinate operation method and related apparatus, primarily aimed at solving the problem that encryption processing is not executed during coordinate operations, resulting in plaintext coordinate information and the coordinates being exposed in plaintext after the operation. Embodiment 1 of this application decrypts a first coordinate to obtain a second coordinate, where the first coordinate is the initial coordinate in the encrypted state and the second coordinate is the initial coordinate in the plaintext state; a coordinate encryption object is created, including a coordinate encryption function used to encrypt the plaintext coordinates; coordinate processing is performed on the second coordinate to obtain a third coordinate, where the third coordinate is the target coordinate in the plaintext state; after the coordinate processing is completed, the coordinate encryption object is destroyed, and the coordinate encryption function is executed through the destructor of the coordinate encryption object to obtain a fourth coordinate, where the fourth coordinate is either the initial coordinate in the encrypted state or the target coordinate in the encrypted state, thus realizing the coordinate operation. This solution achieves the technical effect that encryption processing is executed even when an anomaly occurs during coordinate processing or the program exits the coordinate operation due to some logic in the coordinate processing, thereby solving the problem of coordinates being exposed in plaintext after the operation.

[0197] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application; it should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions; these computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable process management device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable process management device, generate instructions for implementing the process Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0198] In a typical configuration, an electronic device may include one or more processors (CPUs), memory, and buses; the electronic device may also include input / output interfaces, network interfaces, etc.

[0199] The memory may include non-permanent memory in a computer-readable medium, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip; the memory is an example of a storage medium.

[0200] Storage media, including permanent and non-permanent, removable and non-removable media, can be used to store information by any method or technology; the information can be computer-readable instructions, data structures, program modules, or other data; examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information that can be accessed by a computing device; as defined herein, storage media does not include transient media, such as modulated data signals and carrier waves.

[0201] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence; it should be understood that such data used can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein.

[0202] It should also be noted that the terms “comprising,” “including,” or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus; and, without further limitation, an element defined by the phrase “comprising one…” does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0203] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products; therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects; moreover, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0204] Computer program code for performing the operations of the embodiments of this application can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages—such as Common Lisp, Python, C++, Objective-C, Smalltalk, Delphi, Java, Swift, C#, Perl, Ruby, JavaScript, and PHP, etc.—as well as conventional procedural programming languages—such as Fortran, ALGOL, COBOL, PL / I, BASIC, Pascal, and C, etc.—and any other programming language—such as Lisp, Tcl, Prolog, Visual Basic.NET, SQL, and R, etc. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0205] The above are merely embodiments of this application and are not intended to limit this application; various modifications and variations can be made to this application by those skilled in the art; any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of this application should be included within the scope of the claims of this application.

Claims

1. A coordinate manipulation method, characterized in that, include: Decrypt the first coordinates to obtain the second coordinates, wherein the first coordinates are the initial coordinates in the encrypted state, and the second coordinates are the initial coordinates in the plaintext state; Create a coordinate encryption object, wherein the coordinate encryption object includes a coordinate encryption function, which is used to encrypt the coordinates in plaintext state; The second coordinate is processed to obtain the third coordinate, wherein the third coordinate is the target coordinate in plaintext state; After the coordinate processing is completed, the coordinate encryption object is destroyed, and the coordinate encryption function is executed through the destructor of the coordinate encryption object to obtain the fourth coordinate, wherein the fourth coordinate is the initial coordinate in the encryption state or the target coordinate in the encryption state; The coordinate encryption object further includes: a second variable, wherein the second variable is a Boolean variable, and the second variable is used to set whether the destructor can throw an exception. When the second variable is false, the destructor can throw an exception; otherwise, the destructor cannot throw an exception. The step of executing the coordinate encryption function further includes: executing the coordinate encryption function; if the second variable is true and an exception occurs when executing the coordinate encryption function, then the current program is terminated; otherwise, the current program continues to be executed.

2. The method according to claim 1, characterized in that, The coordinate encryption object further includes: a first variable, wherein the first variable is a Boolean variable, and the first variable is used to set whether to execute the coordinate encryption function. When the first variable is false, the coordinate encryption function is executed; otherwise, the coordinate encryption function is not executed.

3. The method according to claim 2, characterized in that, The coordinate encryption object further includes a third variable, wherein the third variable is used to store the number of program exceptions when the coordinate encryption object was created.

4. The method according to claim 3, characterized in that, The step of executing the coordinate encryption function through the destructor of the object encrypted by the coordinates further includes: When the second variable is false, the fourth variable is obtained through the destructor of the object encrypted with the coordinates, wherein the fourth variable is the number of program exceptions when the destructor is executed; If the third variable is less than the fourth variable, then the first variable is set to true and the coordinate encryption function is not executed; otherwise, the first variable is set to false and the coordinate encryption function is executed.

5. The method according to claim 4, characterized in that, The step of executing the coordinate encryption function through the destructor of the object encrypted by the coordinates further includes: When the second variable is true, the fifth variable is obtained through the destructor of the object encrypted with the coordinates, wherein the fifth variable is the number of program exceptions when the destructor is executed; If the third variable is not less than the fifth variable, then the first variable is set to true and the coordinate encryption function is not executed; otherwise, the first variable is set to false and the coordinate encryption function is executed.

6. A coordinate manipulation device, characterized in that, include: A decryption unit is used to decrypt the first coordinates to obtain the second coordinates, wherein the first coordinates are the initial coordinates in the encrypted state, and the second coordinates are the initial coordinates in the plaintext state; A creation unit is used to create a coordinate encryption object, wherein the coordinate encryption object includes a coordinate encryption function, which is used to encrypt the coordinates in plaintext state; A processing unit is configured to perform coordinate processing on the second coordinate to obtain a third coordinate, wherein the third coordinate is the target coordinate in plaintext state; The destructing unit is used to destroy the coordinate encryption object after the coordinate processing is completed, so as to execute the coordinate encryption function through the destructing function of the coordinate encryption object to obtain the fourth coordinate, wherein the fourth coordinate is the initial coordinate in the encryption state or the target coordinate in the encryption state; The coordinate encryption object further includes a second variable, which is a Boolean variable used to set whether the destructor can throw an exception. When the second variable is false, the destructor can throw an exception; otherwise, the destructor cannot throw an exception. The destructor unit is also configured to: execute the coordinate encryption function; if the second variable is true and an exception occurs when executing the coordinate encryption function, terminate the current program; otherwise, continue executing the current program.

7. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, it controls the device containing the storage medium to perform the steps of the coordinate manipulation method as described in any one of claims 1 to 5.

8. An electronic device, characterized in that, The electronic device includes at least one processor and at least one memory connected to the processor; wherein the processor is configured to call program instructions in the memory to execute the steps of the coordinate manipulation method as described in any one of claims 1 to 5.