Request processing method and device, electronic equipment and storage medium
By intercepting and decrypting ciphertext data in data query requests, the contradiction between data security and business needs in the express delivery industry is solved, and secure parsing and encryption of data are realized to ensure the security and availability of data during the query and update process. .
Patent Information
- Application Number
- CN202310319125.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-21
- Publication Date
- 2024-09-24
AI Technical Summary
In business applications in the express delivery industry, how to meet the business needs of data query and update while ensuring the security of user data, especially how to deal with the problem of ciphertext data contained in data query requests.
By intercepting the data request, it detects whether it contains ciphertext data, obtains the decryption method of the ciphertext data, decrypts and replaces the ciphertext data, sends plaintext data to the requester, and encrypts the request input parameters when the data is updated.
It realizes that when data is stored in ciphertext, it can be automatically parsed into plaintext data to ensure data security and avoid data leakage. At the same time, it provides usable query results to meet business needs.
Smart Images

Figure CN118694552A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and more specifically, to a request processing method, device, electronic device and storage medium. Background Art
[0002] With the rapid development of computer technology and network technology, the degree of information digitization in the express delivery industry is also constantly improving, and the amount of user data in the express delivery industry is also increasing sharply. User data, such as user phone numbers, addresses, email addresses, etc., are highly private, so it is necessary to protect the security of user data. However, in actual business needs, such as sending SMS notifications for pickup, user data is also needed. Therefore, how to ensure data security in the process of business applications is a technical problem that needs to be solved urgently in related technologies. Summary of the invention
[0003] In view of the above problems, the embodiments of the present application propose a request processing method, device, electronic device and storage medium to effectively ensure the security of data during business applications.
[0004] According to one aspect of an embodiment of the present application, a request processing method is provided, including: intercepting a received data request; if the intercepted data request is a data query request, detecting whether the query result corresponding to the data query request includes ciphertext data; if the query result includes ciphertext data, obtaining first annotation information corresponding to the object to which the ciphertext data in the query result belongs; the first annotation information indicates a first decryption method corresponding to the ciphertext data in the query result; decrypting the ciphertext data in the query result according to the first decryption method to obtain corresponding decrypted data; replacing the ciphertext data in the query result with the corresponding decrypted data, and sending the replaced query result to the initiator of the data request.
[0005] According to one aspect of an embodiment of the present application, a request processing device is provided, including: a request interception module, used to intercept a received data request; a first detection module, used to detect whether the query result corresponding to the data query request includes ciphertext data if the intercepted data request is a data query request; a first acquisition module, used to obtain first annotation information corresponding to the object to which the ciphertext data in the query result belongs if the query result includes ciphertext data; the first annotation information indicates a first decryption method corresponding to the ciphertext data in the query result; a decryption module, used to decrypt the ciphertext data in the query result according to the first decryption method to obtain corresponding decrypted data; a replacement module, used to replace the ciphertext data in the query result with the corresponding decrypted data, and send the replaced query result to the initiator of the data request.
[0006] In some embodiments, the request processing device also includes: a second acquisition module, which is used to obtain second annotation information corresponding to the object to which the request input parameter in the first data request belongs if the intercepted data request is a first data request; the first data request is a data update request or a data addition request; an encryption module, which is used to encrypt the request input parameter to be encrypted in the first data request according to the first encryption method indicated by the second annotation information to obtain the corresponding encrypted data if the second annotation information indicates that the request input parameter in the first data request needs to be encrypted; and a storage module, which is used to store the encrypted data.
[0007] In some embodiments, the query results include ciphertext data of at least one data type; in this embodiment, the request processing device also includes: a merging module, used to merge the ciphertext data belonging to the same data type in the query results to obtain a merged ciphertext data set corresponding to each data type; the decryption module is further configured to: for each data type, decrypt the merged ciphertext data set corresponding to the data type according to the first decryption method corresponding to the data type to obtain decrypted data corresponding to the merged ciphertext data set of each data type.
[0008] In some embodiments, the request processing device is configured in a target plug-in accessed by the server, and the target plug-in includes an instance configuration file; the instance configuration file includes annotation information configured for each object; in this embodiment, the first acquisition module includes: obtaining the first annotation information corresponding to the object to which the encrypted data of each data type in the query result belongs from the instance configuration file.
[0009] In some embodiments, the target plug-in includes a configured first interceptor and a second interceptor; in this embodiment, the request interception module is further configured to: call the first interceptor and the second interceptor to intercept the received data request; if the first interceptor intercepts the data request, determine that the data request is a data query request; if the second interceptor intercepts the data request, determine that the data request is a first data request.
[0010] In some embodiments, the first annotation information includes a first annotation identifier and a second annotation identifier; the request processing device also includes: a decryption determination module, used to determine whether the ciphertext data in the query result needs to be decrypted according to the first annotation identifier in the first annotation information; a first decryption method determination module, used to determine the first decryption method according to the second annotation identifier if it is determined that the ciphertext data in the query result needs to be decrypted.
[0011] In some embodiments, the request processing device further includes: a sending module, configured to send the query result to the initiator of the data request if the query result corresponding to the data query request does not include ciphertext data.
[0012] According to one aspect of an embodiment of the present application, an electronic device is provided, including: a processor; a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the request processing method as described above is implemented.
[0013] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the request processing method as described above is implemented.
[0014] According to one aspect of an embodiment of the present application, a computer program product is provided, which includes computer instructions, and when the computer instructions are executed by a processor, the above request processing method is implemented.
[0015] In the present application, for a received data query request, when the query result corresponding to the data query request includes ciphertext data, the corresponding ciphertext data in the query result is decrypted according to the first decryption method indicated by the first annotation information corresponding to the object to which the ciphertext data in the query result belongs, and the ciphertext data in the query result is replaced with the decrypted data obtained by decryption. It can be understood that if the query result includes ciphertext data, it indicates that the corresponding data is stored in the form of ciphertext, that is, it is encrypted. Therefore, the scheme of the present application realizes plaintext query when the data is stored in the form of ciphertext, ensures that the data in the query result is plaintext data, and realizes automatic parsing of ciphertext data query into plaintext data. In this way, the storage of ciphertext data ensures the security of data and prevents data leakage, and can provide normal data query services to the outside for business needs, ensuring that the query result received by the sender of the data request is available, that is, the received query result is plaintext data. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0017] Figure 1 It is a schematic diagram of an application scenario shown according to an embodiment of the present application.
[0018] Figure 2It is a flowchart of a request processing method according to an embodiment of the present application.
[0019] Figure 3 It is a flowchart of the steps after step 210 according to another embodiment of the present application.
[0020] Figure 4 It is a flowchart of a request processing method according to another embodiment of the present application.
[0021] Figure 5 It is a flowchart of accessing a target plug-in according to an embodiment of the present application.
[0022] Figure 6 The figure is a schematic diagram of configuring an encryption / decryption switch and configuring a ciphertext prefix according to an embodiment of the present application.
[0023] Figure 7 It is a schematic diagram of configuration of annotation information according to an embodiment of the present application.
[0024] Figure 8 It is a schematic diagram of defining a first annotation identifier according to an embodiment of the present application.
[0025] Fig. 9 It is a schematic diagram of defining a second annotation identifier according to an embodiment of the present application.
[0026] Fig.10 It is a block diagram of a request processing device according to an embodiment of the present application.
[0027] Fig.11 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application is shown. DETAILED DESCRIPTION
[0028] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0029] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0030] It should be noted that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0031] Figure 1 is a schematic diagram of an application scenario according to an embodiment of the present application, such as Figure 1 As shown, the application scenario includes a terminal 110 and a server 120, and the terminal 110 is connected to the server 120 through a wired or wireless network. The server 120 can be a physical server or a cloud server. The server 120 can receive a data request sent by the terminal, and then the server 120 can intercept the received data request, and then, in the case of determining that the data request is a data query request, detect whether the query result corresponding to the data query request includes ciphertext data; if the ciphertext data is included, obtain the first annotation information corresponding to the object to which the ciphertext data in the query result belongs; then, decrypt the ciphertext data according to the first decryption method indicated by the first annotation information, and replace the ciphertext data in the query result with the decrypted data obtained by decryption; then, the replaced query result can be sent to the terminal 110.
[0032] Of course, the solution of the present application is not limited to processing data requests sent by terminals, but can also process data requests sent by other servers.
[0033] The implementation details of the technical solution of the embodiment of the present application are described in detail below:
[0034] Figure 2 is a flowchart of a request processing method according to an embodiment of the present application, which method can be executed by an electronic device with processing capabilities, and the electronic device can be a server. Figure 2 As shown, the method at least includes steps 210 to 250, which are described in detail as follows:
[0035] Step 210: intercept the received data request.
[0036] The data request received by the server may be sent by the terminal or other servers, which is not specifically limited here. The data request may be a data query request for querying data from a database, a data request for updating data stored in the server, or a data request for storing new data, which is not specifically limited here.
[0037] Step 220: If the intercepted data request is a data query request, it is detected whether the query result corresponding to the data query request includes ciphertext data.
[0038] A data query request refers to a data request for querying data. Usually, a data request is expressed through a SQL (Structured Query Language) statement, and the SQL statement corresponding to the data query request generally includes the keyword "select". Therefore, in some embodiments, whether the data request is a data query request can be identified by whether the SQL statement corresponding to the data request includes the "select" keyword, that is, if the SQL statement corresponding to a data request includes the "select" keyword, then the data request is determined to be a data query request.
[0039] It is understandable that before step 220, a query operation is first performed on the data query request, that is, a data query is performed in a data set stored in the server, or a data query is performed in a database associated with the server, and a query result corresponding to the data query request is obtained.
[0040] Ciphertext data refers to encrypted data. It is understandable that if the query result includes ciphertext data, it indicates that the ciphertext data is also stored in an encrypted form in the server. In some embodiments, an identifier representing the ciphertext data can be added to the ciphertext data in advance (the identifier representing the ciphertext data is referred to as a ciphertext identifier), for example, by adding a prefix representing the ciphertext data to the ciphertext data, and the prefix is the ciphertext identifier. In this way, in step 220, it can be determined whether the query result includes ciphertext data by detecting whether each data in the query result includes a ciphertext identifier, that is, if the query result includes data with a ciphertext identifier added, it is determined that the query result includes ciphertext data; if none of the data in the query result includes a ciphertext identifier, it is determined that the query result does not include ciphertext data.
[0041] Typically, after receiving a data request, the server processes the data request at the business layer deployed in the server. This processing process is different from the processing process provided in the present application. In a specific embodiment, a proxy layer may be deployed in the business layer of the server, and the proxy layer first intercepts the received data request, and then processes the data query request at the requesting business layer (i.e., performs a data query) to obtain a query result corresponding to the data query request. After that, the proxy layer continues to detect whether ciphertext data is included based on the query result, and decrypts the ciphertext data if ciphertext data is included.
[0042] Step 230: If the query result includes ciphertext data, obtain first annotation information corresponding to the object to which the ciphertext data in the query result belongs; the first annotation information indicates a first decryption method corresponding to the ciphertext data in the query result.
[0043] Specifically, an object can be regarded as a data type. In practice, a piece of data is usually the value of a field. Thus, a field represents a data type. For example, if field A represents a mobile phone number, field B represents an email address, and field C represents a bank card number, then if a piece of data is the value of field A, the data type (or object) to which the data belongs is a mobile phone number. If a piece of data is the value of field B, the data type (or object) to which the data belongs is an email address. If a piece of data is the value of field C, the data type (or object) to which the data belongs is a bank card number.
[0044] The first annotation information refers to the annotation information corresponding to the object to which the ciphertext data in the query result belongs. Among them, the annotation information corresponding to the object is used to indicate the decryption method of the object. In the present application, the decryption method indicated by the first annotation information is referred to as the first decryption method. It can be understood that if the query result includes ciphertext data of multiple data types, in step 230, the first annotation information corresponding to each data type is obtained respectively, wherein the first decryption methods indicated by different first annotation information may be different. In a specific embodiment, the decryption methods corresponding to different data types (objects) can be pre-configured as the annotation information of the object, such as the decryption method for the mobile phone number, the decryption method for the mailbox, the decryption method for the address, etc. The decryption method is, for example, the BASE64 decryption algorithm, the DES (Data Encryption Standard) decryption algorithm, the AES (Advanced Encryption Standard) decryption algorithm, etc. In a specific embodiment, the correspondence between the object and the annotation information can be pre-configured, and then the first annotation information can be determined according to the object to which the ciphertext data in the query result belongs.
[0045] It is understandable that the decryption method of data corresponds to the encryption method of data. Therefore, for data belonging to an object, it is necessary to configure the annotation information corresponding to the object according to the encryption method of the data belonging to the object in the server, so as to ensure that the decryption method indicated by the annotation information corresponding to the object corresponds to the encryption method corresponding to the data belonging to the object. In other words, for data belonging to an object, the decryption method indicated by the annotation information of the object must be able to decrypt the encrypted data belonging to the object, and there will be no situation where the decryption method indicated by the annotation information corresponding to an object cannot decrypt the encrypted data belonging to the object.
[0046] Step 240: decrypt the ciphertext data in the query result according to the first decryption method to obtain corresponding decrypted data.
[0047] It is worth mentioning that if the query results include ciphertext data of multiple data types, in step 240, for the encrypted data of each data type, the encrypted data of the data type is decrypted according to the first decryption method indicated by the first annotation information corresponding to the data type to obtain the decrypted data of the data type.
[0048] In some embodiments, the query result includes ciphertext data of at least one data type; before step 240, the method further includes: merging the ciphertext data of the same data type in the query result to obtain a merged ciphertext data set corresponding to each data type; in this embodiment, step 240 includes: for each data type, decrypting the merged ciphertext data set corresponding to the data type according to the first decryption method corresponding to the data type to obtain decrypted data corresponding to the merged ciphertext data set of each data type.
[0049] In this embodiment, before step 240, multiple ciphertext data of the same data type are merged according to the data type. In this way, in step 240, all the data in the merged ciphertext data set are decrypted uniformly without the need to decrypt each ciphertext data individually. In this way, the efficiency of the decryption process can be improved and the decryption time of all the ciphertext data in the query results can be shortened.
[0050] For example, if the query result includes multiple encrypted phone numbers, all the encrypted phone numbers are merged to obtain a merged ciphertext data set corresponding to the phone numbers, and then the merged ciphertext data set is uniformly decrypted.
[0051] In a specific embodiment, during the data merging process, multiple ciphertext data of the same data type and the same data value are filtered, that is, only one ciphertext data is retained among the multiple ciphertext data of the same type. For example, if the query result includes multiple encrypted mobile phone numbers, and the multiple encrypted mobile phone numbers include 100 identical mobile phone numbers, then one of the 100 identical mobile phone numbers is added to the merged ciphertext data set, so that the amount of data to be decrypted can be reduced, and thus, the data decryption time can be shortened to a certain extent.
[0052] In some embodiments, the query result may also include empty data, for example, the value of the field representing the mobile phone number is empty, so in order to avoid invalid decryption processing, the empty data in the query result may be filtered before step 240. In this way, filtering the empty data and merging the same values under the same data type can reduce the amount of data to be decrypted, thereby reducing the data processing pressure of the server.
[0053] In some embodiments, the query results may include ciphertext data of multiple data types, for example, multiple encrypted mobile phone numbers, multiple encrypted bank card numbers, multiple encrypted mailing addresses, etc. In this case, after obtaining the merged ciphertext data set of each data type, in order to shorten the response time, the merged ciphertext data set of multiple data types may be decrypted in parallel by multiple threads to obtain the decrypted data corresponding to the merged ciphertext data set of each data type. The use of multiple threads can shorten the decryption time and improve the decryption throughput of the server.
[0054] In some embodiments, the first annotation information includes a first annotation identifier and a second annotation identifier. Before step 240, the method further includes: determining whether the ciphertext data in the query result needs to be decrypted based on the first annotation identifier in the first annotation information; if it is determined that the ciphertext data in the query result needs to be decrypted, determining the first decryption method based on the second annotation identifier.
[0055] The first annotation identifier and the second annotation identifier are different fields, the first annotation identifier is used to indicate whether decryption is required, and the second annotation identifier is used to indicate the decryption method. For example, the first annotation identifier may be "@CryptEntity" and the second annotation identifier may be "@CryptField". Of course, the first annotation identifier and the second annotation identifier are not limited thereto.
[0056] Specifically, the content of the first annotation identifier can be content indicating that decryption is required, or content indicating that decryption is not required. On this basis, whether the corresponding ciphertext data in the query result needs to be decrypted is determined according to the content of the first annotation identifier in the first annotation information. The content of the second annotation identifier is used to indicate the corresponding decryption method. Therefore, when it is determined that the ciphertext data needs to be decrypted, the first decryption method is determined according to the content of the second annotation identifier in the first annotation information.
[0057] Step 250: Replace the ciphertext data in the query result with the corresponding decrypted data, and send the replaced query result to the initiator of the data request.
[0058] In the case where the query result includes ciphertext data of multiple data types, the ciphertext data of each data type in the query result is replaced with the decrypted data corresponding to the data type, so that the query result after replacement is guaranteed to be plaintext data (i.e., unencrypted data). Based on the above steps 210 to 250, during the data query process, the ciphertext data stored in the server is parsed into plaintext data and returned to the initiator of the data query request. Since the data query is performed on the basis of storing the ciphertext data instead of directly storing the data in plaintext, the risk of data leakage and illegal decryption can be reduced.
[0059] In the present application, for a received data query request, when the query result corresponding to the data query request includes ciphertext data, the corresponding ciphertext data in the query result is decrypted according to the first decryption method indicated by the first annotation information corresponding to the object to which the ciphertext data in the query result belongs, and the ciphertext data in the query result is replaced with the decrypted data obtained by decryption. It can be understood that if the query result includes ciphertext data, it indicates that the corresponding data is stored in the form of ciphertext, that is, it is encrypted. Therefore, the scheme of the present application realizes plaintext query when the data is stored in the form of ciphertext, ensures that the data in the query result is plaintext data, and realizes automatic parsing of ciphertext data query into plaintext data. In this way, the storage of ciphertext data ensures the security of data and prevents data leakage, and can provide normal data query services to the outside world, ensuring that the query result received by the sender of the data request is available, that is, the received query result is plaintext data.
[0060] In some embodiments, after step 220, the method further includes: if the query result corresponding to the data query request does not include ciphertext data, sending the query result to the initiator of the data query request. In other words, if the query result corresponding to the data query request does not include ciphertext data, decryption processing is not required, and the query result is directly returned to the initiator of the data query request without any other additional processing. The solution based on this embodiment can realize the query of plaintext data stored in the server.
[0061] In some embodiments, Figure 3 As shown, after step 210, the method further includes the following steps 310 to 330, which are described in detail as follows:
[0062] Step 310: If the intercepted data request is a first data request, obtain second annotation information corresponding to the object to which the request input parameter in the first data request belongs; the first data request is a data update request or a data addition request.
[0063] A data update request refers to a data request for updating stored data, for example, a data request for updating stored data K to data M. A data addition request refers to a data request for storing newly added data.
[0064] Generally, for a data update request, the SQL of the data update request includes the keyword "update"; for a data addition request, the SQL corresponding to the data addition request includes the keyword "insert". On this basis, it is possible to identify whether the data request is a data update request or a data addition request based on the SQL corresponding to the data request. That is, if the SQL corresponding to the data request includes the keyword "update", the data request is determined to be a data update request; if the SQL corresponding to the data request includes the keyword "insert", the data request is determined to be a data addition request.
[0065] Request input parameters refer to the parameters passed from the initiator to the receiver in the data request. For a data update request, the request input parameters in the data update request indicate the data to be updated; for a data addition request, the request input parameters in the data addition request indicate the newly added data.
[0066] As described above, the correspondence between the object and the annotation information is preconfigured, so that the annotation information corresponding to the object to which the request input parameter in the first data request belongs can be determined according to the object to which the request input parameter in the first data request belongs. As described above, the encryption method and the decryption method are corresponding, that is, the encryption process and the decryption process are inverse, therefore, the annotation information corresponding to the object indicates the decryption method while also indicating the encryption method of the object. In the present application, the annotation information corresponding to the object to which the request input parameter in the first data request belongs is referred to as the second annotation information. It is worth mentioning that the request input parameter in the first data request may be one or more. When there are multiple request input parameters in the first data request, in step 310, the second annotation information corresponding to the object to which each request input parameter in the first data request belongs is obtained.
[0067] Step 320: If the second annotation information indicates that the request input parameter in the first data request needs to be encrypted, encrypt the request input parameter to be encrypted in the first data request according to the first encryption method indicated by the second annotation information to obtain corresponding encrypted data.
[0068] The first encryption method refers to the encryption method indicated by the second annotation information. It is worth mentioning that if the first data request includes request input parameters belonging to multiple data types, in step 320, for each request input parameter of the data type, the request input parameter of the data type is encrypted according to the first encryption method indicated by the second annotation information corresponding to the data type to obtain the corresponding encrypted data.
[0069] In some embodiments, the first data request includes request input parameters of at least one data type; before step 320, the method further includes: merging request input parameters of the same data type in the first data request to obtain a request input parameter collection corresponding to each data type; in this embodiment, step 320 includes: for each data type, encrypting the request input parameter collection corresponding to the data type according to a first encryption method corresponding to the data type to obtain encrypted data corresponding to the request input parameter collection of each data type.
[0070] In this embodiment, before step 320, multiple request input parameters of the same data type are merged according to the data type. In this way, in step 320, all data in the request input parameter set are encrypted uniformly without the need to encrypt each request input parameter individually. In this way, the efficiency of the encryption processing can be improved and the encryption time can be shortened.
[0071] In a specific embodiment, during the process of merging request input parameters, multiple request input parameters of the same data type and the same data value are filtered, that is, only one request input parameter is retained among multiple request input parameters with the same value. In this way, the amount of data to be decrypted can be reduced, and thus, the data decryption time can be shortened to a certain extent.
[0072] In some embodiments, the first data request may include request input parameters of multiple data types, for example, multiple mobile phone numbers that need to be encrypted, multiple bank card numbers that need to be encrypted, multiple recipient addresses that need to be encrypted, etc. In this case, after obtaining the request input parameter collection of each data type, in order to shorten the response time, the request input parameter collection of multiple data types can be encrypted in parallel using multiple threads to obtain the encrypted data corresponding to the request input parameter collection of each data type. Using a multi-threaded approach can shorten the encryption time and improve the encryption throughput of the server.
[0073] In some embodiments, the second annotation information includes a first annotation identifier and a second annotation identifier; before step 320, the method also includes: determining whether the request input parameter in the first data request needs to be encrypted based on the first annotation identifier in the second annotation information; if it is determined that the request input parameter in the first data request needs to be encrypted, determining the first encryption method based on the second annotation identifier in the second annotation information.
[0074] As described above, the first annotation identifier and the second annotation identifier are different fields, the first annotation identifier is used to indicate whether encryption is required, and the second annotation identifier is used to indicate the encryption method. For example, the first annotation identifier may be "@CryptEntity" and the second annotation identifier may be "@CryptField". Of course, the first annotation identifier and the second annotation identifier are not limited thereto.
[0075] Specifically, the content of the first annotation identifier can indicate that encryption is required or not. On this basis, the content of the first annotation identifier in the second annotation information is used to determine which request input parameters in the first data request need to be encrypted and which request input parameters do not need to be encrypted. The content of the second annotation identifier is used to indicate the corresponding encryption method. Therefore, for the request input parameters that need to be encrypted in the first data request, the corresponding encryption method (i.e., the first encryption method) is determined according to the content of the second annotation identifier in the corresponding second annotation information.
[0076] Step 330: store the encrypted data.
[0077] In a specific embodiment, if a database is provided in the server, in step 330, the encrypted data may be written into the database for storage.
[0078] Through the above steps 310 to 330, the plaintext data is encrypted and stored in the server. Moreover, different encryption methods can be used to encrypt data of different data types, meeting the need to encrypt data of different data types with different encryption methods in practice. This can improve the confidentiality of the data, reduce the risk of data leakage, and ensure the security of the data.
[0079] In some embodiments, after step 310, the method further includes: if the second annotation information indicates that the request input parameters in the first data request do not need to be encrypted, executing the SQL corresponding to the first data request to store the request input parameters in the first data request in the form of plain text data in the server.
[0080] In some embodiments, part of the request input parameters in the first data request may need to be encrypted, while part of the request input parameters do not need to be encrypted. In this case, the request input parameters that need to be encrypted are processed according to the process of steps 320 to 330; and the request input parameters that do not need to be encrypted are stored in the server in the form of plain text data.
[0081] Figure 4 is a flowchart of a request processing method according to an embodiment of the present application. The method can be Figure 1 The server execution in Figure 4 As shown, the method includes:
[0082] Step 410, intercepting the data request.
[0083] Step 420, identifying the SQL type; that is, identifying the type of the data request through the SQL corresponding to the data request. If the data request is identified as a data query request (the corresponding SQL is a select statement), execute step 430; if the data request is identified as a data update request (the corresponding SQL is an update statement), or a data addition request (the corresponding SQL is an insert statement), execute step 440.
[0084] Step 430, checking whether the query result includes ciphertext data; if yes, executing step 431, if no, executing step 434;
[0085] Step 431, decrypting the ciphertext data; specifically, decrypting the ciphertext data according to a first decryption method indicated by first annotation information corresponding to the object to which the ciphertext data belongs.
[0086] Step 432: Replace the ciphertext data with the decrypted data, that is, replace the ciphertext data in the query result with the corresponding decrypted data.
[0087] Step 433: Send the replaced query result to the sender.
[0088] Step 434, sending the query result to the sender.
[0089] Step 440, check whether the request input parameter that needs to be encrypted is included; if yes, execute step 441, if no, execute step 444.
[0090] Step 441, encrypting the request input parameter. Specifically, encrypting the corresponding request input parameter according to the encryption method indicated by the second annotation information corresponding to the object to which the request input parameter belongs in the data request, to obtain corresponding encrypted data.
[0091] Step 442, store the encrypted data corresponding to the requested input parameter.
[0092] Step 443, returning response information to the sender.
[0093] Step 444: Execute SQL, that is, process the data request according to the normal processing flow without first encrypting the request input parameters.
[0094] Figure 4 For details on the implementation of each step, see Figure 2 and Figure 3 The corresponding steps in the corresponding embodiments are not described in detail here. Figure 4The illustrated embodiment can realize querying plaintext data and ciphertext data during data query, and encrypting and storing plaintext data or directly storing data that does not need to be encrypted during data update or data addition.
[0095] In some embodiments, the method is performed by a target plug-in accessed by the server, that is, as described above Figure 2 and Figure 3 The processing logic shown is executed by the target plug-in, so that the original business code of the business layer in the server does not need to be modified, the original business code of the business layer is decoupled from the logic of encryption processing or the logic of decryption processing, and there is zero intrusion on the business logic of the business layer. The target plug-in includes an instance configuration file; the instance configuration file includes annotation information configured for each object; in this embodiment, step 230 includes: obtaining the first annotation information corresponding to the object to which the ciphertext data of each data type in the query result belongs from the instance configuration file.
[0096] In some embodiments, the server can be a MyBatis framework, which supports customized SQL, stored procedures and advanced mapping. MyBatis can use simple XML or annotations to configure and map native information, and the POJOs (Plain Ordinary Java Object, common Java object) of the interface and Java are mapped into the record in the database. On this basis, based on the configured instance configuration file, the reflection (Reflection) mechanism of Java can be utilized to determine the object to which the ciphertext data of each data type belongs, and obtain the corresponding annotation information. The reflection mechanism of Java refers to that in the running state of the program, the object of any class can be constructed, the class to which any object belongs can be understood, the member variables and methods of any class can be understood, and the properties and methods of any object can be called. This function of dynamically obtaining program information and dynamically calling objects is called the reflection mechanism of Java language.
[0097] Similarly, when the server is connected to the target plug-in, in step 310, the second annotation information corresponding to the object to which the request input parameter in the first data request belongs is obtained from the instance configuration file.
[0098] In some embodiments, the target plug-in includes a configured first interceptor and a second interceptor; in this embodiment, step 210 includes: calling the first interceptor and the second interceptor to intercept the received data request; if the first interceptor intercepts the data request, determining that the data request is a data query request; if the second interceptor intercepts the data request, determining that the data request is a first data request.
[0099] In other words, the target plug-in includes a first interceptor for intercepting data query requests and a second interceptor for intercepting data addition requests and data update requests, so that the type of data request intercepted can be determined based on the interceptor that intercepts the data request.
[0100] In a specific embodiment, the first interceptor may be DecryptInterceptor, and the second interceptor may be EecryptInterceptor, that is, DecryptInterceptor intercepts select query statements, and EecryptInterceptor intercepts insert, update and other insert and update statements.
[0101] After the select statement (data query request) is intercepted by DecryptInterceptor (the first interceptor), the first interceptor will detect whether the query result after the execution of the select statement contains ciphertext data. If it contains ciphertext data, the ciphertext data will be merged according to the data type configured by its POJO field, and decrypted in a multi-threaded manner, and the ciphertext data in the query result will be replaced with the decrypted data obtained by the corresponding decryption. After that, the replaced query result will be sent to the sender. In this process, the data query operation completes a conversion from the saved ciphertext data to the plaintext query. In a specific embodiment, the plaintext data obtained by decryption can also be displayed desensitized according to the different scenarios accessed by the user to ensure the security of user data.
[0102] After the insert statement (data addition request) and the update statement (data update request) are intercepted by EecryptInterceptor (the second interceptor), the second interceptor will detect the second annotation information corresponding to the POJO class (that is, the object to which the request input parameter belongs) corresponding to the request input parameter in the data request, that is, determine whether it contains "CryptEntity" and "CryptField" annotations. If so, determine that the request input parameter in the data request needs to be encrypted and stored. After that, the request input parameters are merged according to the data type, and encrypted in a multi-threaded manner. After encryption, the encrypted data is stored, and the ciphertext data is stored in the database. This process realizes a conversion from plaintext data request to ciphertext storage.
[0103] In the case where the encryption processing logic and decryption processing logic of the present application are executed by the target plug-in in the server, it is necessary to connect the target plug-in to the server in advance, that is, connect the target plug-in to the business layer in the server. The target plug-in access process can be as follows: Figure 5 As shown, the method specifically includes the following steps 510 to 530, which are described in detail as follows:
[0104] Step 510, introducing dependencies.
[0105] The business module needs to be connected by introducing the SDK jar package dependency. Taking Maven application as an example, Maven application uses pom file to manage its jar package dependency. The way to introduce dependency is to adjust its pom file and add portal-utils dependency in the pom file with version 1.0.0.
[0106] Specifically, you can add the following portal-utils dependency to the pom file in the server:
[0107] <dependency>
[0108] <groupid> com.sf.tech< / groupid>
[0109] <artifactid> portal-utils< / artifactid>
[0110] <version> 1.0.0< / version>
[0111] < / dependency> .
[0112] Step 520, adding a new plug-in.
[0113] Add a MyBatis configuration file to the business layer that introduces portal-utails dependency for adjustment. Specifically, add the MyBatis plug-ins (i.e. plugins) defined in the two SDKs, such as DecryptInterceptor (the first interceptor) and EecryptInterceptor (the second interceptor), so that the initialization and instance creation of the two interceptors can be completed.
[0114] In some embodiments, in the MyBatis configuration file, encryption and decryption switch configuration and ciphertext prefix configuration can be added, wherein the configured encryption and decryption switch is used to indicate whether to enable the encryption and decryption function, and the configured ciphertext prefix is used to identify the ciphertext data. The encryption and decryption switch configuration and the ciphertext prefix configuration can be as follows: Figure 6 As shown in the figure, the encryption and decryption switch field "encryptEnable" is configured, and the value of the encryption and decryption switch field "encryptEnable" is true, indicating that the encryption and decryption function is enabled. Figure 6 In the configuration, the ciphertext prefix is "DE". Of course, Figure 6 This is just an illustrative example, and the encryption / decryption switch field and the ciphertext prefix may also be configured as other fields.
[0115] It can be understood that, in the case of configuring the encryption and decryption switch, before step 210, the method also includes: obtaining the value of the encryption and decryption switch field, and if it is determined according to the value of the encryption and decryption switch field that the encryption and decryption function is enabled, then executing step 210; conversely, if it is determined according to the value of the encryption and decryption switch field that the encryption and decryption function is not enabled, the business layer processes the data request.
[0116] Step 530, adding annotations.
[0117] Specifically, add the SDK-defined "@CryptEntity" (first annotation identifier) and "@CryptField" (second annotation identifier) annotations to the objects (POJO classes) and their attribute fields (Field) used by the MyBatis data access layer (DAO) of the business layer. When the DAO layer method with the annotations is called, it can automatically complete the encryption when adding and modifying data, and automatically decrypt when querying data.
[0118] Specifically, for data requests that require encryption or decryption, in its Mapper, based on the business scenario and whether the SQL of the data request is a select statement or an insert / update statement, an annotation is added to the input or reverse parameter entity (i.e., POJO) of the corresponding method in this Mapper.
[0119] For example, taking the scenario that requires decryption as an example, you can add Figure 7 The annotations shown in Figure 7 In the example, two annotation identifiers are used, namely the first annotation identifier "@CryptEntity" and the second annotation identifier "@CryptField", where "@CryptEntity" is used to identify whether this object (entity class) needs to be encrypted or decrypted; "@CryptField" is used to identify and configure the encryption method or decryption method corresponding to the attribute of this field, such as the encryption method / decryption method of a mobile phone number, ID card, bank card, etc. In a specific embodiment, the definition of the first annotation identifier "@CryptEntity" can be as follows Figure 8 As shown, the definition of the second annotation identifier "@CryptField" can be as follows Fig. 9 shown.
[0120] Through the above steps 510 to 530, the target plug-in can be accessed and configured. Afterwards, based on the target plug-in, private data (such as mobile phone number, address, email address, bank card number) can be stored in ciphertext and decrypted on demand when used. It can fully protect user privacy, and the access is simple and the configuration is convenient. The whole process does not invade the business code at all, the coupling is low, and it is easy to maintain.
[0121] In addition, the solution of the present application supports configuring different encryption and decryption methods for data of different data types. It is flexible to use and simple to configure. It only needs to mark the type attribute with the second annotation "@CryptField" on the field to dynamically parse the encryption and decryption methods corresponding to the data of this data type at the bottom layer, and encrypt according to the corresponding encryption method, or decrypt according to the corresponding decryption method.
[0122] In the traditional encryption and decryption business scenario, corresponding coding is usually done for specific business, and the business logic is deeply coupled with the data encryption and decryption logic, which will lead to a large amount of development of encryption and decryption logic, and difficulty in later maintenance, and cannot meet the business needs of rapid development and change. In the present embodiment, the encryption and decryption function is realized based on the MyBatis plug-in (target plug-in), and the technology such as Java reflection and dynamic proxy is combined to realize the high decoupling of business code and encryption and decryption logic, and only the first annotation mark "@CryptEntity" and the second annotation mark "@CryptField" are used for the POJO class in the business code to mark the field of this entity class (object) to be encrypted and decrypted, and the business logic is zero-intrusive. The development cost is low, the maintenance is simple, and even the stock business can be easily accessed. In this way, private data can be effectively protected, which is more conducive to the landing of user privacy protection in the full business scenario. And it supports a variety of encryption and decryption methods, and supports configuration, different data classification encryption storage, and the safety factor is higher. The scheme of the present application can be applied to logistics collection and delivery, contract signing and other scenes, and can effectively ensure the security of the user's private data.
[0123] The following describes an apparatus embodiment of the present application, which can be used to execute the method in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the above-mentioned method embodiment of the present application.
[0124] Fig.10 is a block diagram of a request processing device according to an embodiment of the present application. The request processing device can be configured in a server to execute the request processing method provided by the present application, such as Fig.10 As shown, the request processing device includes: a request interception module 1010, which is used to intercept the received data request; a first detection module 1020, which is used to detect whether the query result corresponding to the data query request includes ciphertext data if the intercepted data request is a data query request; a first acquisition module 1030, which is used to obtain the first annotation information corresponding to the object to which the ciphertext data in the query result belongs if the query result includes ciphertext data; the first annotation information indicates the first decryption method corresponding to the ciphertext data in the query result; a decryption module 1040, which is used to decrypt the ciphertext data in the query result according to the first decryption method to obtain the corresponding decrypted data; a replacement module 1050, which is used to replace the ciphertext data in the query result with the corresponding decrypted data, and send the replaced query result to the initiator of the data request.
[0125] In some embodiments, the request processing device also includes: a second acquisition module, which is used to obtain second annotation information corresponding to the object to which the request input parameter in the first data request belongs if the intercepted data request is a first data request; the first data request is a data update request or a data addition request; an encryption module, which is used to encrypt the request input parameter to be encrypted in the first data request according to the first encryption method indicated by the second annotation information to obtain the corresponding encrypted data if the second annotation information indicates that the request input parameter in the first data request needs to be encrypted; and a storage module, which is used to store the encrypted data.
[0126] In some embodiments, the query results include ciphertext data of at least one data type; in this embodiment, the request processing device also includes: a merging module, used to merge the ciphertext data belonging to the same data type in the query results to obtain a merged ciphertext data set corresponding to each data type; the decryption module 1040 is further configured to: for each data type, decrypt the merged ciphertext data set corresponding to the data type according to the first decryption method corresponding to the data type to obtain the decrypted data corresponding to the merged ciphertext data set of each data type.
[0127] In some embodiments, the request processing device is configured in a target plug-in accessed by the server, and the target plug-in includes an instance configuration file; the instance configuration file includes annotation information configured for each object; in this embodiment, the first acquisition module 1030 includes: obtaining the first annotation information corresponding to the object to which the encrypted data of each data type in the query result belongs from the instance configuration file.
[0128] In some embodiments, the target plug-in includes a configured first interceptor and a second interceptor; in this embodiment, the request interception module 1010 is further configured to: call the first interceptor and the second interceptor to intercept the received data request; if the first interceptor intercepts the data request, determine that the data request is a data query request; if the second interceptor intercepts the data request, determine that the data request is a first data request.
[0129] In some embodiments, the first annotation information includes a first annotation identifier and a second annotation identifier; the request processing device also includes: a decryption determination module, used to determine whether the ciphertext data in the query result needs to be decrypted according to the first annotation identifier in the first annotation information; a first decryption method determination module, used to determine the first decryption method according to the second annotation identifier if it is determined that the ciphertext data in the query result needs to be decrypted.
[0130] In some embodiments, the request processing device further includes: a sending module, configured to send the query result to the initiator of the data request if the query result corresponding to the data query request does not include ciphertext data.
[0131] Fig.11 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. The electronic device may be Figure 1 The server in the electronic device is used to execute the request processing method provided by the present application.
[0132] like Fig.11 As shown, the electronic device may include: a processor 1101, such as a CPU, a network interface 1104, a user interface 1103, a memory 1105, and a communication bus 1102. Among them, the communication bus 1102 is used to realize the connection and communication between these components. The user interface 1103 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and optionally, the user interface 1103 may also include a standard wired interface and a wireless interface. The network interface 1104 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1105 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1105 may optionally be a storage device independent of the aforementioned processor 1101.
[0133] Those skilled in the art will understand that Fig.11 The structure of the electronic device shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0134] like Fig.11 As shown, the memory 1105 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a program for implementing the request processing method. Fig.11 In the electronic device shown, the network interface 1104 is mainly used to communicate with other devices, such as Figure 1 The user interface 1103 is mainly used to connect to the client (user end) and perform data communication with the client; and the processor 1101 can be used to call the program for implementing the request processing method stored in the memory 1105 and execute the steps of the request processing method in any of the above method embodiments.
[0135] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the request processing method in any of the above method embodiments is implemented.
[0136] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a device or a device or used in combination with it. In the present application, a computer-readable signal medium can include a data signal propagated in a baseband or as a part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0137] According to one aspect of an embodiment of the present application, a computer program product is provided, which includes computer instructions, and when the computer instructions are executed by a processor, the request processing method in any of the above method embodiments is implemented.
[0138] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0139] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0140] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0141] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.
[0142] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A request processing method, characterized in that: include: Intercepting received data requests; If the intercepted data request is a data query request, detecting whether the query result corresponding to the data query request includes ciphertext data; If the query result includes ciphertext data, obtaining first annotation information corresponding to the object to which the ciphertext data in the query result belongs; The first annotation information indicates a first decryption method corresponding to the ciphertext data in the query result; Decrypt the ciphertext data in the query result according to the first decryption method to obtain corresponding decrypted data; The ciphertext data in the query result is replaced with the corresponding decrypted data, and the replaced query result is sent to the initiator of the data request.
2. The method according to claim 1, characterized in that After intercepting the received data request, the method further includes: If the intercepted data request is a first data request, obtain second annotation information corresponding to the object to which the request input parameter in the first data request belongs; the first data request is a data update request or a data addition request; If the second annotation information indicates that the request input parameter in the first data request needs to be encrypted, encrypt the request input parameter to be encrypted in the first data request according to the first encryption method indicated by the second annotation information to obtain corresponding encrypted data; The encrypted data is stored.
3. The method according to claim 1, characterized in that The query result includes ciphertext data of at least one data type; Before decrypting the ciphertext data in the query result according to the first decryption method to obtain corresponding decrypted data, the method further includes: Merging the ciphertext data of the same data type in the query results to obtain a merged ciphertext data set corresponding to each data type; Decrypting the ciphertext data in the query result according to the first decryption method to obtain corresponding decrypted data includes: For each data type, the combined ciphertext data set corresponding to the data type is decrypted according to the first decryption method corresponding to the data type to obtain decrypted data corresponding to the combined ciphertext data set of each data type.
4. The method according to any one of claims 1 to 3, characterized in that The method is executed by a target plug-in accessed by a server, wherein the target plug-in includes an instance configuration file; the instance configuration file includes annotation information configured for each object; The obtaining of first annotation information corresponding to the object to which the ciphertext data in the query result belongs includes: The first annotation information corresponding to the object to which the ciphertext data of each data type in the query result belongs is obtained from the instance configuration file.
5. The method according to claim 4, characterized in that The target plug-in includes a configured first interceptor and a second interceptor; The intercepting of the received data request includes: Calling the first interceptor and the second interceptor to intercept the received data request; If the first interceptor intercepts the data request, determining that the data request is a data query request; If the second interceptor intercepts the data request, it is determined that the data request is the first data request.
6. The method according to claim 1, characterized in that The first annotation information includes a first annotation identifier and a second annotation identifier; Before decrypting the ciphertext data in the query result according to the first decryption method to obtain corresponding decrypted data, the method further includes: Determining whether the ciphertext data in the query result needs to be decrypted according to the first annotation identifier in the first annotation information; If it is determined that the ciphertext data in the query result needs to be decrypted, the first decryption method is determined according to the second annotation identifier.
7. The method according to claim 1, characterized in that If the intercepted data request is a data query request, after detecting whether the query result corresponding to the data query request includes ciphertext data, the method further includes: If the query result corresponding to the data query request does not include ciphertext data, the query result is sent to the initiator of the data request.
8. A request processing device, characterized in that: include: A request interception module, used to intercept received data requests; A first detection module, configured to detect, if the intercepted data request is a data query request, whether the query result corresponding to the data query request includes ciphertext data; A first acquisition module, configured to acquire first annotation information corresponding to an object to which the ciphertext data in the query result belongs if the query result includes ciphertext data; The first annotation information indicates a first decryption method corresponding to the ciphertext data in the query result; A decryption module, used to decrypt the ciphertext data in the query result according to the first decryption method to obtain corresponding decrypted data; The replacement module is used to replace the ciphertext data in the query result with the corresponding decrypted data, and send the replaced query result to the initiator of the data request.
9. An electronic device, characterized in that: include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having computer-readable instructions stored thereon, characterized in that: When the computer-readable instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
