Message processing method and device, computer equipment and storage medium

By determining the configuration file according to the service type for message processing, the problems of low efficiency and insufficient security of traditional message processing methods are solved, and efficient and secure message processing is achieved.

CN119109988AActive Publication Date: 2024-12-10CHINA CONSTRUCTION BANK +1
View PDF 14 Cites 0 Cited by

Patent Information

Application Number
CN202411302224.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2024-12-10
Estimated Expiration
2044-09-18

AI Technical Summary

Technical Problem

Traditional message processing methods are inefficient when processing sensitive data, cannot meet service needs, and have problems such as insufficient processing efficiency and security.

Method used

By determining the request and response configuration file according to the target service type sent by the client, including verification information, decryption verification information and replacement configuration information, perform non-empty verification, decryption verification and data replacement, generate response messages, and cache them Delete the response message after time to ensure the security and accuracy of the data.

Benefits of technology

It improves the efficiency and accuracy of message processing, enhances the verification accuracy of request messages and the security of response messages, and ensures the processing security and accuracy of sensitive data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119109988A_ABST
    Figure CN119109988A_ABST
Patent Text Reader

Abstract

The invention relates to the field of data processing, and particularly discloses a message processing method and device, computer equipment and a storage medium. The method comprises: according to a query request of a target service type sent by a client, determining a request configuration file and a response configuration file stored for the target service type, the request configuration file comprising verification information, verifying a request message in the query request according to the verification information to obtain a verification result of the request message, and sending the verification result to the client, and generating a response message according to the request message and the response configuration file under the condition that the verification result is that the verification is passed. The message is processed through the request configuration file and the response configuration file corresponding to the target service type, the message processing efficiency is improved, the verification accuracy of the request message is improved, the response message is generated according to the request message and the response configuration file under the condition that the verification is passed, the message processing safety is improved, and the user experience is improved. And the accuracy of the response message is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a message processing method, apparatus, computer equipment, and storage medium. Background Technology

[0002] With the development of information technology, various industries no longer need to conduct offline data queries. Typically, the user sends a query request to the server, which then retrieves the corresponding business data, generates a response message, and returns it to the user. However, in scenarios involving the query of sensitive data, this sensitive data cannot be returned to the user. For example, sensitive data could be personal user data or financial data in the financial sector.

[0003] Traditional technologies and message processing methods can no longer meet business needs and suffer from low processing efficiency. Summary of the Invention

[0004] Therefore, it is necessary to provide a message processing method, apparatus, computer equipment, and storage medium that can improve message processing efficiency in response to the above-mentioned technical problems.

[0005] Firstly, this application provides a message processing method, including:

[0006] Based on the query request for the target business type sent by the client, determine the request configuration file and response configuration file stored for the target business type, wherein the request configuration file includes verification information;

[0007] The request message in the query request is verified based on the verification information to obtain the verification result of the request message;

[0008] If the verification result is successful, a response message is generated based on the request message and the response configuration file.

[0009] In one embodiment, the verification information includes non-empty field indication information and decryption verification information. The decryption verification information includes decryption field indication information and decryption method. The step of verifying the request message in the query request based on the verification information to obtain a verification result for the request message includes:

[0010] Perform a non-empty check on the first field indicated by the non-empty field indication information in the request message;

[0011] If the non-empty check passes, the second field indicated by the decryption field indication information in the request message is decrypted and checked according to the decryption method.

[0012] If the decryption verification passes, the verification result is determined to be successful; if the decryption verification fails or the non-empty verification fails, the verification result is determined to be unsuccessful.

[0013] In one embodiment, the request configuration file further includes replacement configuration information, which includes indication information of fields to be replaced and replacement content. The step of generating a response message based on the request message and the response configuration file includes:

[0014] Determine the third field indicated by the field to be replaced indication information in the request message;

[0015] The third field is replaced according to the replacement content to obtain the replaced request message;

[0016] A response message is generated based on the replaced request message and the response configuration file.

[0017] In one embodiment, the request configuration file further includes: cache configuration information; after generating a response message based on the replaced request message and the response configuration file, the method further includes:

[0018] The response message is deleted after the cache time indicated by the cache configuration information.

[0019] In one embodiment, generating a response message based on the replaced request message and the response configuration file includes:

[0020] Based on the replaced request message, read the corresponding response field list;

[0021] The response field list is processed according to the response configuration file to obtain the response message.

[0022] In one embodiment, the response configuration file includes encryption configuration information and de-identification configuration information. The step of processing the response field list according to the response configuration file to obtain the response message includes:

[0023] The fourth field indicated by the encryption configuration information in the response field list is encrypted to obtain the encrypted response field list;

[0024] The fifth field indicated by the desensitization configuration information in the encrypted response field list is desensitized to obtain the desensitized response field list.

[0025] The de-identified response field list is assembled according to a preset assembly logic to obtain the response message. The method further includes:

[0026] The system receives a query request for the target service type sent by the client; the query request also includes identification information.

[0027] The step of determining the request configuration file and response configuration file stored for the target service type based on the query request sent by the client for the target service type includes:

[0028] Based on the identification information, the request configuration file and response configuration file corresponding to the identification information are determined from a preset configuration file library.

[0029] Secondly, this application also provides a message processing apparatus, comprising:

[0030] The determination module is used to determine the request configuration file and response configuration file stored for the target business type based on the query request for the target business type sent by the client, wherein the request configuration file includes verification information;

[0031] The verification module is used to verify the request message in the query request based on the verification information, and obtain the verification result of the request message;

[0032] The generation module is used to generate a response message based on the request message and the response configuration file when the verification result is successful.

[0033] In one embodiment, the verification information includes non-empty field indication information and decryption verification information, wherein the decryption verification information includes decryption field indication information and decryption method, and the verification module includes:

[0034] The first verification unit is used to perform non-empty verification on the first field indicated by the non-empty field indication information in the request message.

[0035] The second verification unit is used to perform decryption verification on the second field indicated by the decryption field indication information in the request message according to the decryption method if the non-empty verification passes.

[0036] The first determining unit is configured to determine that the verification result is successful if the decryption verification is successful, and to determine that the verification result is unsuccessful if the decryption verification fails or the non-empty verification fails.

[0037] In one embodiment, the request configuration file further includes replacement configuration information, which includes indication information of fields to be replaced and replacement content. The generation module includes:

[0038] The second determining unit is used to determine the third field indicated by the field to be replaced indication information in the request message;

[0039] The replacement unit is used to replace the third field according to the replacement content to obtain the replaced request message;

[0040] The generation unit is used to generate a response message based on the replaced request message and the response configuration file.

[0041] In one embodiment, the request configuration file further includes: cache configuration information; the generation module further includes:

[0042] The deletion unit is used to delete the response message after the cache time indicated by the cache configuration information.

[0043] In one embodiment, the generation unit is specifically used for:

[0044] Based on the replaced request message, read the corresponding response field list;

[0045] The response field list is processed according to the response configuration file to obtain the response message.

[0046] In one embodiment, the response configuration file includes encrypted configuration information and de-identified configuration information, and the generation unit is specifically used for:

[0047] The fourth field indicated by the encryption configuration information in the response field list is encrypted to obtain the encrypted response field list;

[0048] The fifth field indicated by the desensitization configuration information in the encrypted response field list is desensitized to obtain the desensitized response field list.

[0049] The desensitized response field list is assembled according to a preset assembly logic to obtain the response message.

[0050] In one embodiment, the device further includes:

[0051] The receiving module is used to receive a query request for the target service type sent by the client; the query request also includes identification information.

[0052] The determining module is specifically used to determine the request configuration file and response configuration file corresponding to the identification information from a preset configuration file library based on the identification information.

[0053] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0054] Based on the query request for the target business type sent by the client, determine the request configuration file and response configuration file stored for the target business type, wherein the request configuration file includes verification information;

[0055] The request message in the query request is verified based on the verification information to obtain the verification result of the request message;

[0056] If the verification result is successful, a response message is generated based on the request message and the response configuration file.

[0057] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0058] Based on the query request for the target business type sent by the client, determine the request configuration file and response configuration file stored for the target business type, wherein the request configuration file includes verification information;

[0059] The request message in the query request is verified based on the verification information to obtain the verification result of the request message;

[0060] If the verification result is successful, a response message is generated based on the request message and the response configuration file.

[0061] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0062] Based on the query request for the target business type sent by the client, determine the request configuration file and response configuration file stored for the target business type, wherein the request configuration file includes verification information;

[0063] The request message in the query request is verified based on the verification information to obtain the verification result of the request message;

[0064] If the verification result is successful, a response message is generated based on the request message and the response configuration file.

[0065] The aforementioned message processing method, apparatus, computer equipment, and storage medium, based on a query request of the target business type sent by the client, determine request configuration files and response configuration files stored for the target business type. The request configuration file includes verification information. The request message in the query request is verified based on the verification information to obtain a verification result. If the verification result is successful, a response message is generated based on the request message and response configuration file. By pre-generating request configuration files and response configuration files for various business types, message processing efficiency is improved through the request configuration files and response configuration files corresponding to the target business type. Furthermore, verifying the request message using the request configuration file corresponding to the target business type improves the accuracy of request message verification. If verification is successful, a response message is generated based on the request message and response configuration file, enhancing both the security of message processing and the accuracy of the response message. Attached Figure Description

[0066] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0067] Figure 1 This is an application environment diagram of a message processing method in one embodiment;

[0068] Figure 2 This is a flowchart illustrating a message processing method in one embodiment;

[0069] Figure 3 This is a flowchart illustrating a message processing method in another embodiment;

[0070] Figure 4 This is a flowchart illustrating a message processing method in another embodiment;

[0071] Figure 5 This is a flowchart illustrating a message processing method in another embodiment;

[0072] Figure 6 This is a flowchart illustrating a message processing method in another embodiment;

[0073] Figure 7 This is a flowchart illustrating a message processing method in another embodiment;

[0074] Figure 8 This is a flowchart illustrating a message processing method in another embodiment;

[0075] Figure 9 This is a flowchart illustrating a message processing method in another embodiment;

[0076] Figure 10 This is a structural block diagram of a message processing apparatus in one embodiment;

[0077] Figure 11 is an internal structure diagram of a computer device in one embodiment. Detailed Implementation

[0078] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. It should be noted that existing industry solutions such as software, components, and models may be mentioned in the embodiments of this application. These should be considered exemplary and are intended only to illustrate the feasibility of implementing the technical solutions of this application, but do not imply that the applicant has already used or necessarily used such solutions.

[0079] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with relevant regulations. The acquisition, storage, use and processing of data in the technical solution of this application all comply with the relevant provisions of national laws and regulations.

[0080] The message processing method provided in this application embodiment can be applied to, for example, Figure 1In the application environment shown, client 102 communicates with server 104 via a network. A data storage system stores the data that server 104 needs to process. This data storage system can be integrated into server 104 or located in the cloud or on other network servers. Server 104 receives query requests from clients for the target business type and determines the request configuration file and response configuration file to be stored for that business type based on the query request. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, and projection devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0081] In one exemplary embodiment, such as Figure 2 As shown, a message processing method is provided, which is applied to... Figure 1 Taking the server-side as an example, the explanation includes:

[0082] S201, Based on the query request for the target business type sent by the client, determine the request configuration file and response configuration file stored for the target business type. The request configuration file includes verification information.

[0083] The request configuration file is used to validate and / or process the request message in the query request, while the response configuration file is used to process the data requested by the client.

[0084] In this embodiment, the server pre-generates a set of request and response configuration files for each type of service; alternatively, the server pre-generates a set of request and response configuration files for each service transaction. When the server receives a query request for the target service type from the client, it determines the request and response configuration files for the target service type from the local storage space based on the query request. Optionally, the request and response configuration files can be JSON format files.

[0085] For example, the request configuration file may include at least one of the following: a list of non-empty field validations, a list of replacement fields, a list of fields to be decrypted, the fully qualified name of the decryption algorithm, a configuration for whether the service is cached, a key-value pair that supports custom caching, the cache validity period, and the actual outbound call service code. Multiple fields in the non-empty field validation list can be separated by commas; the replacement field list includes the field names corresponding to the replacement values ​​of the request message field names, and multiple groups can be separated by commas; the list of fields to be decrypted includes the field name to be decrypted, the decryption method name, and the decryption key flag, and multiple groups are separated by commas. For example, a decryption key flag of 0 indicates decryption using the default key, and a decryption key flag of 1 indicates decryption using a key.

[0086] S202, verify the request message in the query request based on the verification information, and obtain the verification result of the request message.

[0087] In this embodiment of the application, the target field in the request message can be determined first based on the verification information, and then the target field can be verified based on the verification information.

[0088] As an optional implementation, it can be determined whether the data in the target field is the same as the data in the verification information. If they are the same, the verification result of the request message is that the verification is successful; if they are different, the verification result of the request message is that the verification is unsuccessful.

[0089] S203: If the verification result is successful, generate a response message based on the request message and the response configuration file.

[0090] In this embodiment, if the verification result is successful, the data requested by the client is read according to the request message, and then the read data is processed according to the response configuration file to generate a response message. For example, the read data can be sorted, filtered, etc., according to the response configuration file, and the processed read data can be assembled according to the format indicated by the response configuration file to obtain the response message.

[0091] In the above message processing method, based on the query request of the target business type sent by the client, the request configuration file and response configuration file stored for the target business type are determined. The request configuration file includes verification information. The request message in the query request is verified based on the verification information to obtain the verification result of the request message. If the verification result is successful, a response message is generated based on the request message and response configuration file. By pre-generating request configuration files and response configuration files for various business types, message processing is performed using the request configuration file and response configuration file corresponding to the target business type, improving the efficiency of message processing. Furthermore, verifying the request message using the request configuration file corresponding to the target business type improves the accuracy of request message verification. If the verification is successful, a response message is generated based on the request message and response configuration file, improving the security of message processing and the accuracy of the response message.

[0092] In one embodiment, one implementation of S202 above is provided, such as... Figure 3 As shown, the verification information includes non-empty field indication information and decryption verification information. The decryption verification information includes decryption field indication information and decryption method. The above-mentioned "verifying the request message in the query request based on the verification information to obtain the verification result of the request message" includes:

[0093] S301, perform non-empty verification on the first field indicated by the non-empty field indication information in the request message.

[0094] In this embodiment of the application, the first field is read from the request message according to the non-empty field indication information to determine whether the first field is empty. If the first field is empty, the non-empty check fails; if the first field is not empty, the non-empty check passes.

[0095] S302, if the non-empty check passes, perform decryption verification on the second field indicated by the decryption field indication information in the request message according to the decryption method.

[0096] In this embodiment, if the non-empty verification passes, the second field is read from the request message according to the decryption field indication information, and the second field is decrypted according to the decryption method. If decryption is successful, the decryption verification passes; if decryption fails, the decryption verification fails. Optionally, the decryption process can be implemented using reflection. For example, the Class object of the corresponding class can be obtained through the fully qualified name, an object instance can be created based on the Class object, and then the code corresponding to the encryption process can be executed according to the set method name.

[0097] Optionally, the decryption verification information may also include preset decryption data. If the data in the second field after decryption is the same as the preset decryption data, then the decryption is successful; if the data in the second field after decryption is different from the preset decryption data, then the decryption is unsuccessful.

[0098] S303: If the decryption verification passes, the verification result is determined to be successful; if the decryption verification fails or the non-empty verification fails, the verification result is determined to be unsuccessful.

[0099] In this embodiment of the application, if the decryption verification passes, the verification result is determined to be successful, indicating that the source of the query request is secure; if the decryption verification fails or the non-empty verification fails, it indicates that the security of the query request is low, the verification result is determined to be unsuccessful, and a query failure message is returned to the client.

[0100] In this embodiment of the application, the request message is verified by a request configuration file corresponding to the target business type. Since the matching degree between the request configuration file and the request message is high, the efficiency and accuracy of the request message verification are improved. Furthermore, non-empty verification and decryption verification are performed in sequence. Through multi-dimensional verification, the accuracy of the request message verification is further improved.

[0101] In one embodiment, one implementation of S203 above is provided, such as... Figure 4 As shown, the request configuration file also includes replacement configuration information, which includes indications of fields to be replaced and the replacement content. The aforementioned "generating a response message based on the request message and response configuration file" includes:

[0102] S401, Determine the third field indicated by the field to be replaced indication information in the request message.

[0103] In this embodiment of the application, the third field is determined and read from the request message according to the field to be replaced indication information. The third field can be the user information corresponding to the client.

[0104] S402, replace the third field according to the replacement content to obtain the replaced request message.

[0105] In this embodiment of the application, the replacement content is the user information preset in the replacement configuration information. The third field in the request message is replaced with the replacement content in the replacement configuration information to form the replaced request message.

[0106] Optionally, the replacement content can be user information with data access permissions; or, the replacement content can be user data that does not involve sensitive user data.

[0107] S403 generates a response message based on the replaced request message and response configuration file.

[0108] In this embodiment, the data requested by the client is read according to the converted request message, and then the read data is processed according to the response configuration file to generate a response message. For example, the read data can be sorted, filtered, etc., according to the response configuration file, and the processed read data can be assembled according to the format indicated by the response configuration file to obtain the response message.

[0109] In the above application embodiment, the third field in the request message is replaced to obtain the replaced request message, which enables the data requested by the user to be successfully read based on the replaced request message, thereby making the accuracy and success rate of the response message generated based on the replaced request message higher.

[0110] In one embodiment, such as Figure 5 As shown, the request configuration file also includes: cache configuration information; after generating the response message based on the replaced request message and response configuration file, the above message processing method also includes:

[0111] S404, delete the response message after the cache time indicated by the cache configuration information.

[0112] In this embodiment of the application, the caching time of the response message is determined according to the caching configuration information, and the caching time of the response message is stored locally on the server. After the time after the response message is generated reaches the caching time, the response message is deleted. That is, the response message is deleted after the time difference between the time when the response message is generated and the current time reaches the caching time.

[0113] In the above application embodiments, after the caching time indicated by the caching configuration information, the response message is deleted. This can not only quickly respond to the same query requests within the caching time, but also avoid the response message occupying the server's storage space for a long time.

[0114] In one embodiment, one implementation of S403 described above is provided, such as... Figure 6 As shown, the above "generating a response message based on the replaced request message and response configuration file" includes:

[0115] S501: Based on the replaced request message, read the corresponding response field list.

[0116] In this embodiment of the application, parsing the replaced request message can yield the target service type, user information, user permission information, etc., thereby determining the initial response field list in the local storage space based on the target service type and user information. Furthermore, the initial field list can be filtered based on the user permission information to determine the response field list corresponding to the user permission information.

[0117] S502 processes the response field list according to the response configuration file to obtain the response message.

[0118] In this embodiment, the response field list is processed according to the response configuration file to generate a response message. For example, the response field list can be sorted, filtered, etc., according to the response configuration file, and the processed response field list can be assembled according to the format indicated by the response configuration file to obtain the response message.

[0119] In the above application embodiments, the corresponding response field list is read according to the replaced request message. Under the condition that the certificate processing response field list matches the request message, the security of the response field list is improved. Furthermore, the response field list is processed according to the response configuration file, which improves the efficiency of message processing.

[0120] In one embodiment, one implementation of S502 described above is provided, such as... Figure 7 As shown, the response configuration file includes encryption configuration information and de-identification configuration information. The above-mentioned "processing the response field list according to the response configuration file to obtain the response message" includes:

[0121] S601, encrypt the fourth field indicated by the encrypted configuration information in the response field list to obtain the encrypted response field list.

[0122] The encryption configuration information may include encryption field indication information and encryption method.

[0123] In this embodiment of the application, the fourth field is determined in the response field list according to the encryption field indication information in the encryption configuration information. Further, the fourth field is encrypted according to the encryption method in the encryption configuration information, and the fourth field in the response field list is replaced with the encrypted fourth field to obtain the encrypted response field list.

[0124] For example, the encryption method can be any of the following: symmetric encryption, asymmetric encryption, hash algorithm, or other methods that can encrypt data.

[0125] S602, perform desensitization processing on the fifth field indicated by the desensitization configuration information in the encrypted response field list to obtain the desensitized response field list.

[0126] The desensitization configuration information may include desensitization field indication information and desensitization method.

[0127] In this embodiment of the application, the fifth field is determined from the encrypted response field list according to the desensitization field indication information in the desensitization configuration information. Further, the fifth field is desensitized according to the desensitization method in the desensitization configuration information, and the fifth field in the encrypted response field list is replaced with the desensitized fifth field to obtain the desensitized response field list.

[0128] For example, the desensitization method can be any of the following: invalidation, randomization, data replacement, averaging and offset rounding, or other methods that can desensitize data.

[0129] S603, assemble the de-identified response field list according to the preset assembly logic to obtain the response message.

[0130] The preset assembly logic can be a preset response message format.

[0131] In this embodiment of the application, the fields in the desensitized response field list are sorted according to the assembly logic, and then the sorted response field list is encapsulated to obtain a response message.

[0132] In the above application embodiments, the encryption method and desensitization method corresponding to the response field list are determined according to the response configuration file, thereby encrypting and desensitizing the response field list. While ensuring the matching degree between the response message and the request message, user information leakage is effectively prevented.

[0133] In one embodiment, such as Figure 8 As shown, the above message processing method also includes:

[0134] S204, Receive a query request for the target service type sent by the client; the query request also includes identification information.

[0135] In this embodiment, the client can generate a query message based on the user's trigger operation, determine the identification information based on the target service type and client address corresponding to the query message, encapsulate the query message and identification information into a query request, and send the query request to the server.

[0136] Based on the above S204, the above S201 "determines the request configuration file and response configuration file stored for the target service type according to the query request for the target service type sent by the client", including:

[0137] S205, Based on the identification information, determine the request configuration file and response configuration file corresponding to the identification information from the preset configuration file library.

[0138] In this embodiment, the server pre-generates a set of request configuration files and response configuration files for each type of service; alternatively, the server pre-generates a set of request configuration files and response configuration files for each service and generates a configuration file library. When the server receives a query request for the target service type from the client, it determines the request configuration file and response configuration file for the target service type from the configuration file library based on the query request.

[0139] In the above application embodiments, the identification information in the query requests at each level determines the request configuration file and the response configuration file, which improves the accuracy of determining the request configuration file and the response configuration file. Moreover, the determination method is simple and effective, and can quickly determine the request configuration file and the response configuration file corresponding to the identification information.

[0140] In summary, based on all the above embodiments, a message processing method is also provided, such as... Figure 9 As shown, the method includes:

[0141] S1 receives a query request for the target service type sent by the client; the query request includes identification information and a request message.

[0142] S2, based on the identification information, determine the request configuration file and response configuration file corresponding to the identification information from the preset configuration file library. The request configuration file includes verification information.

[0143] S3 performs a non-empty check on the first field indicated by the non-empty field indication information in the request message.

[0144] S4. If the non-empty check passes, then the second field indicated by the decryption field indication information in the request message is decrypted and checked according to the decryption method.

[0145] S5. If the non-empty validation fails, the validation result is determined to be validation failure.

[0146] S6. If the decryption verification passes, the verification result is confirmed as successful.

[0147] S7. If the decryption verification fails, the verification result is determined to be verification failure.

[0148] S8, if the verification result is successful, determine the third field indicated by the field to be replaced indication information in the request message.

[0149] S9, replace the third field according to the replacement content to obtain the replaced request message.

[0150] S10: Read the corresponding response field list based on the replaced request message.

[0151] S11, encrypt the fourth field indicated by the encrypted configuration information in the response field list to obtain the encrypted response field list.

[0152] S12, perform desensitization processing on the fifth field indicated by the desensitization configuration information in the encrypted response field list to obtain the desensitized response field list.

[0153] S13, assemble the de-identified response field list according to the preset assembly logic to obtain the response message.

[0154] S14. After the cache time indicated by the cache configuration information, delete the response message.

[0155] In the above message processing method, based on the query request of the target business type sent by the client, the request configuration file and response configuration file stored for the target business type are determined. The request configuration file includes verification information. The request message in the query request is verified based on the verification information to obtain the verification result of the request message. If the verification result is successful, a response message is generated based on the request message and response configuration file. By pre-generating request configuration files and response configuration files for various business types, message processing is performed using the request configuration file and response configuration file corresponding to the target business type, improving the efficiency of message processing. Furthermore, verifying the request message using the request configuration file corresponding to the target business type improves the accuracy of request message verification. If the verification is successful, a response message is generated based on the request message and response configuration file, improving the security of message processing and the accuracy of the response message.

[0156] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0157] Based on the same inventive concept, this application also provides a message processing apparatus for implementing the message processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more message processing apparatus embodiments provided below can be found in the limitations of the message processing method described above, and will not be repeated here.

[0158] In one embodiment, such as Figure 10 As shown, a message processing apparatus is provided, comprising: a determining module 10, a verifying module 11, and a generating module 12, wherein:

[0159] The determination module 10 is used to determine the request configuration file and response configuration file stored for the target business type based on the query request for the target business type sent by the client. The request configuration file includes verification information.

[0160] The verification module 11 is used to verify the request message in the query request based on the verification information, and obtain the verification result of the request message;

[0161] The generation module 12 is used to generate a response message based on the request message and the response configuration file if the verification result is successful.

[0162] In one embodiment, the verification information includes non-empty field indication information and decryption verification information, wherein the decryption verification information includes decryption field indication information and decryption method. The verification module includes: a first verification unit, a second verification unit, and a first determination unit, wherein:

[0163] The first verification unit is used to perform non-empty verification on the first field indicated by the non-empty field indication information in the request message.

[0164] The second verification unit is used to perform decryption verification on the second field indicated by the decryption field indication information in the request message according to the decryption method if the non-empty verification passes.

[0165] The first determining unit is used to determine the verification result as successful if the decryption verification is successful, and to determine the verification result as unsuccessful if the decryption verification fails or the non-empty verification fails.

[0166] In one embodiment, the request configuration file further includes replacement configuration information, which includes indication information of the field to be replaced and replacement content. The aforementioned generation module includes: a second determining unit, a replacement unit, and a generation unit, wherein:

[0167] The second determining unit is used to determine the third field indicated by the field to be replaced indication information in the request message;

[0168] The replacement unit is used to replace the third field according to the replacement content to obtain the replaced request message;

[0169] The generation unit is used to generate a response message based on the replaced request message and response configuration file.

[0170] In one embodiment, the request configuration file further includes: cache configuration information; the above-mentioned generation module further includes:

[0171] The deletion unit is used to delete response messages after the cache time indicated by the cache configuration information.

[0172] In one embodiment, the above-mentioned generation unit is specifically used to: read the corresponding response field list according to the replaced request message; process the response field list according to the response configuration file to obtain the response message.

[0173] In one embodiment, the response configuration file includes encrypted configuration information and desensitized configuration information. The generation unit is specifically used to: encrypt the fourth field indicated by the encrypted configuration information in the response field list to obtain an encrypted response field list; desensitize the fifth field indicated by the desensitized configuration information in the encrypted response field list to obtain a desensitized response field list; and assemble the desensitized response field list according to a preset assembly logic to obtain a response message.

[0174] In one embodiment, the apparatus further includes:

[0175] The receiving module is used to receive query requests for the target business type sent by the client; the query request also includes identification information.

[0176] The determination module is specifically used to determine the request configuration file and response configuration file corresponding to the identification information from a preset configuration file library based on the identification information.

[0177] Each module in the aforementioned message processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0178] In one embodiment, a computer device, which may be a server, is provided, and its internal structure is shown in Figure 11. The computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is connected to the system bus via the I / O interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores message processing data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a message processing method.

[0179] Those skilled in the art will understand that the structure shown in Figure 11 is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0180] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0181] Based on the query request for the target business type sent by the client, determine the request configuration file and response configuration file stored for the target business type. The request configuration file includes verification information.

[0182] The request message in the query request is verified based on the verification information to obtain the verification result of the request message;

[0183] If the verification result is successful, a response message is generated based on the request message and the response configuration file.

[0184] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0185] Perform a non-empty check on the first field indicated by the non-empty field indication information in the request message;

[0186] If the non-empty check passes, the second field indicated by the decryption field indication information in the request message is decrypted and verified according to the decryption method.

[0187] If the decryption verification passes, the verification result is determined to be successful; if the decryption verification fails or the non-empty verification fails, the verification result is determined to be unsuccessful.

[0188] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0189] Determine the third field indicated by the field to be replaced indicator information in the request message;

[0190] The third field is replaced according to the replacement content to obtain the replaced request message;

[0191] Generate a response message based on the replaced request message and response configuration file.

[0192] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0193] Delete the response message after the cache time indicated in the cache configuration information.

[0194] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0195] Based on the replaced request message, read the corresponding list of response fields;

[0196] The response field list is processed according to the response configuration file to obtain the response message.

[0197] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0198] Encrypt the fourth field of the encrypted configuration information in the response field list to obtain the encrypted response field list;

[0199] Perform desensitization processing on the fifth field indicated by the desensitization configuration information in the encrypted response field list to obtain the desensitized response field list;

[0200] The de-identified response field list is assembled according to a preset assembly logic to obtain the response message.

[0201] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0202] Receive a query request from the client for the target service type; the query request also includes identification information.

[0203] Based on the query request sent by the client for the target business type, determine the request configuration file and response configuration file stored for the target business type, including:

[0204] Based on the identification information, the request configuration file and response configuration file corresponding to the identification information are determined from the preset configuration file library.

[0205] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0206] Based on the query request for the target business type sent by the client, determine the request configuration file and response configuration file stored for the target business type. The request configuration file includes verification information.

[0207] The request message in the query request is verified based on the verification information to obtain the verification result of the request message;

[0208] If the verification result is successful, a response message is generated based on the request message and the response configuration file.

[0209] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0210] Perform a non-empty check on the first field indicated by the non-empty field indication information in the request message;

[0211] If the non-empty check passes, the second field indicated by the decryption field indication information in the request message is decrypted and verified according to the decryption method.

[0212] If the decryption verification passes, the verification result is determined to be successful; if the decryption verification fails or the non-empty verification fails, the verification result is determined to be unsuccessful.

[0213] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0214] Determine the third field indicated by the field to be replaced indicator information in the request message;

[0215] The third field is replaced according to the replacement content to obtain the replaced request message;

[0216] Generate a response message based on the replaced request message and response configuration file.

[0217] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0218] Delete the response message after the cache time indicated in the cache configuration information.

[0219] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0220] Based on the replaced request message, read the corresponding list of response fields;

[0221] The response field list is processed according to the response configuration file to obtain the response message.

[0222] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0223] Encrypt the fourth field of the encrypted configuration information in the response field list to obtain the encrypted response field list;

[0224] Perform desensitization processing on the fifth field indicated by the desensitization configuration information in the encrypted response field list to obtain the desensitized response field list;

[0225] The de-identified response field list is assembled according to a preset assembly logic to obtain the response message.

[0226] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0227] Receive a query request from the client for the target service type; the query request also includes identification information.

[0228] Based on the query request sent by the client for the target business type, determine the request configuration file and response configuration file stored for the target business type, including:

[0229] Based on the identification information, the request configuration file and response configuration file corresponding to the identification information are determined from the preset configuration file library.

[0230] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0231] Based on the query request for the target business type sent by the client, determine the request configuration file and response configuration file stored for the target business type. The request configuration file includes verification information.

[0232] The request message in the query request is verified based on the verification information to obtain the verification result of the request message;

[0233] If the verification result is successful, a response message is generated based on the request message and the response configuration file.

[0234] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0235] Perform a non-empty check on the first field indicated by the non-empty field indication information in the request message;

[0236] If the non-empty check passes, the second field indicated by the decryption field indication information in the request message is decrypted and verified according to the decryption method.

[0237] If the decryption verification passes, the verification result is determined to be successful; if the decryption verification fails or the non-empty verification fails, the verification result is determined to be unsuccessful.

[0238] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0239] Determine the third field indicated by the field to be replaced indicator information in the request message;

[0240] The third field is replaced according to the replacement content to obtain the replaced request message;

[0241] Generate a response message based on the replaced request message and response configuration file.

[0242] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0243] Delete the response message after the cache time indicated in the cache configuration information.

[0244] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0245] Based on the replaced request message, read the corresponding list of response fields;

[0246] The response field list is processed according to the response configuration file to obtain the response message.

[0247] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0248] Encrypt the fourth field of the encrypted configuration information in the response field list to obtain the encrypted response field list.

[0249] Perform desensitization processing on the fifth field indicated by the desensitization configuration information in the encrypted response field list to obtain the desensitized response field list;

[0250] The de-identified response field list is assembled according to a preset assembly logic to obtain the response message.

[0251] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0252] Receive a query request from the client for the target service type; the query request also includes identification information.

[0253] Based on the query request sent by the client for the target business type, determine the request configuration file and response configuration file stored for the target business type, including:

[0254] Based on the identification information, the request configuration file and response configuration file corresponding to the identification information are determined from the preset configuration file library.

[0255] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0256] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0257] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A message processing method, characterized in that: The method comprises: Determine, according to a query request of a target business type sent by a client, a request configuration file and a response configuration file stored for the target business type, wherein the request configuration file includes verification information; Verifying the request message in the query request according to the verification information to obtain a verification result of the request message; When the verification result is that the verification is passed, a response message is generated according to the request message and the response configuration file.

2. The method according to claim 1, characterized in that The verification information includes non-empty field indication information and decryption verification information, the decryption verification information includes decryption field indication information and a decryption method, and the request message in the query request is verified according to the verification information to obtain a verification result of the request message, including: Performing a non-empty check on the first field indicated by the non-empty field indication information in the request message; If the non-empty check passes, performing a decryption check on the second field indicated by the decryption field indication information in the request message according to the decryption method; If the decryption check passes, the verification result is determined to be verification passed; if the decryption check fails or the non-empty check fails, the verification result is determined to be verification failed.

3. The method according to claim 1, characterized in that: The request configuration file further includes replacement configuration information, wherein the replacement configuration information includes to-be-replaced field indication information and replacement content, and the generating a response message according to the request message and the response configuration file includes: Determine a third field indicated by the to-be-replaced field indication information in the request message; Replace the third field according to the replacement content to obtain a replaced request message; A response message is generated according to the replaced request message and the response configuration file.

4. The method according to claim 3, characterized in that: The request configuration file further includes: cache configuration information; after generating a response message according to the replaced request message and the response configuration file, the method further includes: After the cache time indicated by the cache configuration information, the response message is deleted.

5. The method according to claim 3, characterized in that: The generating a response message according to the replaced request message and the response configuration file includes: According to the replaced request message, read the corresponding response field list; The response field list is processed according to the response configuration file to obtain the response message.

6. The method according to claim 5, characterized in that The response configuration file includes encryption configuration information and desensitization configuration information, and the processing of the response field list according to the response configuration file to obtain the response message includes: Encrypt the fourth field indicated by the encryption configuration information in the response field list to obtain an encrypted response field list; Perform desensitization processing on the fifth field indicated by the desensitization configuration information in the encrypted response field list to obtain a desensitized response field list; The desensitized response field list is assembled according to a preset assembly logic to obtain the response message.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Receiving a query request for the target service type sent by the client; the query request also includes identification information; The step of determining, according to a query request of a target business type sent by a client, a request configuration file and a response configuration file stored for the target business type comprises: According to the identification information, a request configuration file and a response configuration file corresponding to the identification information are determined from a preset configuration file library.

8. A message processing device, characterized in that: The device comprises: A determination module, configured to determine a request configuration file and a response configuration file stored for a target business type according to a query request of the target business type sent by a client, wherein the request configuration file includes verification information; A verification module, used to verify the request message in the query request according to the verification information, and obtain a verification result of the request message; A generating module is used to generate a response message according to the request message and the response configuration file when the verification result is that the verification is passed.

9. The device according to claim 8, characterized in that The verification information includes non-empty field indication information and decryption verification information, the decryption verification information includes decryption field indication information and a decryption method, and the verification module includes: A first verification unit, configured to perform a non-empty check on a first field indicated by the non-empty field indication information in the request message; A second verification unit is used to perform a decryption check on the second field indicated by the decryption field indication information in the request message according to the decryption method if the non-empty check passes; The first determination unit is used to determine that the verification result is a passed verification if the decryption check passes; and to determine that the verification result is a failed verification if the decryption check fails or the non-empty check fails.

10. The device according to claim 8, characterized in that The request configuration file also includes replacement configuration information, wherein the replacement configuration information includes to-be-replaced field indication information and replacement content, and the generation module includes: A second determining unit, configured to determine a third field indicated by the to-be-replaced field indication information in the request message; A replacement unit, configured to replace the third field according to the replacement content to obtain a replaced request message; A generating unit is used to generate a response message according to the replaced request message and the response configuration file.

11. The device according to claim 10, characterized in that The request configuration file also includes: cache configuration information; the generation module also includes: A deleting unit is used to delete the response message after the cache time indicated by the cache configuration information.

12. The device according to claim 10, characterized in that The generating unit is specifically used for: According to the replaced request message, read the corresponding response field list; The response field list is processed according to the response configuration file to obtain the response message.

13. The device according to claim 12, characterized in that The response configuration file includes encryption configuration information and desensitization configuration information, and the generating unit is specifically used for: Encrypt the fourth field indicated by the encryption configuration information in the response field list to obtain an encrypted response field list; Perform desensitization processing on the fifth field indicated by the desensitization configuration information in the encrypted response field list to obtain a desensitized response field list; The desensitized response field list is assembled according to a preset assembly logic to obtain the response message.

14. The device according to any one of claims 8 to 13, characterized in that The device also includes: A receiving module, configured to receive a query request for the target service type sent by the client; the query request also includes identification information; The determining module is specifically configured to determine, according to the identification information, a request configuration file and a response configuration file corresponding to the identification information from a preset configuration file library.

15. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Business processing method and device, terminal and server

    CN104901936A

  • Business processing method, terminal, server and system

    CN105450582A

  • Service processing method, service processing device, storage medium and electronic device

    CN110728455A

  • Data desensitization system and data desensitization method

    CN111488604A

  • Query condition configuration method and device, computer equipment and readable storage medium

    CN112035515A