Message processing method and device, electronic equipment and storage medium
By intercepting and uniformly processing of business requests and response messages, matching governance rules are obtained, the problem of repeated development at the interface is solved, flexible and efficient data governance is achieved, and data security and system stability are ensured.
Patent Information
- Application Number
- CN202510655532.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-07-25
AI Technical Summary
The existing technology requires the development of data governance logic for each interface, which leads to high development costs and lack of flexibility, making it difficult to adapt to changing needs and scenarios.
By intercepting business requests and response messages, obtaining message governance rules that match the service request side, and managing them in a unified interception and forwarding mechanism to form a centralized processing link to avoid repeated development of data governance logic.
It reduces development costs, improves development efficiency and system flexibility, can quickly respond to changing needs and scenarios, ensures the accuracy and security of data processing, reduces system coupling, and improves stability and maintainability.
Smart Images

Figure CN120378196A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular, to a message processing method, apparatus, electronic device, and storage medium. Background Art
[0002] With the continuous improvement of data security requirements, systems providing data interfaces need to process returned messages in different ways according to actual situations. For example, when a customer queries their own information, it can be returned in plain text, while when a third party queries a customer's information, the information needs to be encrypted, desensitized, or deleted before being returned.
[0003] To implement this function, currently, it is necessary to develop data governance logic separately for each interface, resulting in high development costs; moreover, the data governance logic is fixedly written inside the program, lacking flexibility and making it difficult to adapt to changing requirements and scenarios. Summary of the Invention
[0004] Embodiments of the present invention provide a message processing method, apparatus, electronic device, and storage medium, which can reduce development costs and quickly respond to changing requirements and scenarios.
[0005] In a first aspect, a message processing method provided by an embodiment of the present invention is applied to a message governance component, and includes:
[0006] Intercept a service request message initiated by a service request end, and forward the service request message to a service providing end;
[0007] Intercept an original response message fed back by the service providing end for the service request message, and obtain a message governance rule matching the service request end;
[0008] Govern the original response message according to the message governance rule to obtain a target response message;
[0009] Send the target response message to the service request end.
[0010] In a second aspect, a message processing apparatus provided by an embodiment of the present invention is applied to a message governance component, and includes:
[0011] A first interception module, configured to intercept a service request message initiated by a service request end, and forward the service request message to a service providing end;
[0012] A second interception module, configured to intercept an original response message fed back by the service providing end for the service request message, and obtain a message governance rule matching the service request end;
[0013] A message governance module, configured to govern the original response message according to the message governance rule to obtain a target response message;
[0014] A sending module, configured to send a target response message to a service request end.
[0015] In a third aspect, an electronic device provided by an embodiment of the present invention includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the message processing method according to any embodiment of the present invention.
[0016] In a fourth aspect, a computer-readable storage medium provided by an embodiment of the present invention stores a computer program, and when the program is executed by a processor, it implements the message processing method according to any embodiment of the present invention.
[0017] In the embodiments of the present invention, it is possible to intercept a service request message initiated by a service request end and forward it to a service provider end, and at the same time intercept the original response message feedback by the service provider end. Through a unified interception and forwarding mechanism, the message governance logic is abstracted from each interface to form a centralized processing link, avoiding duplicate development of data governance logic at each interface, greatly reducing the development cost, and improving the development efficiency; after intercepting the original response message, obtain the message governance rule matching the service request end. This rule-based processing method makes the system highly flexible and adaptable, and corresponding message governance rules can be formulated according to different service request ends and different application scenarios. When the service requirements or security policies change, only the rules need to be adjusted, and there is no need to modify the program code, which can quickly respond to changing requirements and scenarios; govern the original response message according to the message governance rule to obtain the target response message, and send the target response message to the service request end, ensuring the consistency and standardization of the message governance process. Whether it is encryption, desensitization, or deletion, etc., it can be executed orderly according to the established rules, improving the accuracy and reliability of data processing, and effectively ensuring the security and compliance of data; the message governance component is independent of the business logic and realizes data governance by intercepting and processing messages, separating the business logic and data governance logic, reducing the coupling degree of the system. Business developers can focus on the implementation of business functions, while the data governance part is uniformly managed and maintained by the message governance component, facilitating the expansion and maintenance of the system, and improving the overall stability and maintainability of the system. Description of the Drawings
[0018] In order to more clearly illustrate the technical solutions of the present invention, the accompanying drawings required for the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0019] Figure 1It is a schematic flowchart of a message processing method provided by an embodiment of the present invention;
[0020] Figure 2 It is another schematic flowchart of a message processing method provided by an embodiment of the present invention;
[0021] Figure 3a It is a schematic structural diagram of a message governance component provided by an embodiment of the present invention;
[0022] Figure 3b It is an example diagram of a request message interception processing function provided by an embodiment of the present invention;
[0023] Figure 3c It is an example diagram of a response message interception processing function provided by an embodiment of the present invention;
[0024] Figure 3d It is an example diagram of a message processing method provided by an embodiment of the present invention;
[0025] Figure 4 It is a schematic structural diagram of a message processing device provided by an embodiment of the present invention;
[0026] Figure 5 It is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners
[0027] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order different from those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0029] Figure 1It is a schematic flowchart of a message processing method provided by an embodiment of the present invention. The message processing method provided by the embodiment of the present invention is applicable to scenarios where business services are provided through interface calls. The message processing method can be executed by a message processing device provided by the embodiment of the present invention, and the device can be implemented in a software and / or hardware manner. In a specific embodiment, the device can be integrated into an electronic device, and the electronic device can be a computer, a server, etc. corresponding to a bank platform. A message governance component can be installed in the electronic device, and the method of the embodiment of the present invention can be executed by the message governance component. The following embodiments will be described by taking the integration of the message processing device into the electronic device as an example. Refer to Figure 1 , the message processing method of this embodiment can include the following steps:
[0030] Step 101, intercept the service request message initiated by the service request end, and forward the service request message to the service providing end.
[0031] Intercepting means setting checkpoints or filters on the message transmission path to obtain the passing messages in real time for operations such as monitoring, analyzing, or processing the messages. It is an active way to obtain and manage message transmission, aiming to centrally manage and process the messages. The service request end is the party that initiates the service request, usually a client or system that needs to obtain certain data or services, which can be a software interface used by users, a mobile application, or other system modules that need to call service interfaces. Its core purpose is to obtain the required business data or services by sending request messages. The service request message is a data packet constructed by the service request end to request specific business data or services, containing the specific content of the request, such as the type of the requested service, the identifier of the required data, the identity information of the requester, etc. Forwarding is the process of resending the intercepted message to a specified target address or system according to certain rules or protocols, aiming to pass the request to a party that can process the request and provide the corresponding service or data. The service providing end is the party that can provide the data or services required by the service request end, usually a backend server, a data center, or other business systems. Its core function is to receive the request message, perform corresponding business processing according to the request content, and return the processing result to the request end in the form of a response message.
[0032] Through the interception operation, the message governance component obtains the service request message sent by the service request end in real time, so as to centrally manage and process the message. Then, the message governance component will forward the intercepted service request message to the service providing end, so that the service providing end can perform corresponding business processing according to the request content and return the result. This process realizes the active acquisition and orderly transfer of the service request message, laying a foundation for subsequent governance of the response message (such as encryption, desensitization, etc.), and ensuring that the system can effectively control and manage the message transmission and processing process.
[0033] Step 102: Intercept the original response message fed back by the service provider for the service request message, and obtain the message governance rules matching the service requestor.
[0034] The original response message is the message returned by the service provider after processing the service request message, which contains the result of the request processing or the required data, and is the initial message without any governance operations. The message governance rules define a series of rules on how to process the message, which may include operations such as encryption, desensitization, deletion, etc. These rules are configured according to different service requestors, service scenarios, and security requirements to ensure the security and compliance of the message.
[0035] The message governance component will intercept the original response message fed back by the service provider, so as to centrally manage and process this message. Obtaining the message governance rules matching the service requestor is to find the corresponding rules according to the identity, service scenario, and security requirements of the service requestor, so as to govern the original response message and ensure that the message returned to the service requestor meets the security and service requirements.
[0036] Step 103: Govern the original response message according to the message governance rules to obtain the target response message.
[0037] The target response message is the response message after governance operations, which meets the requirements of the message governance rules and can be safely returned to the service requestor.
[0038] The message governance component will process the original response message fed back from the service provider according to the pre-defined message governance rules. The processing process may include operations such as encrypting sensitive information, desensitizing data, deleting unnecessary content, etc., to ensure that the finally generated target response message meets the security and service requirements.
[0039] Step 104: Send the target response message to the service requestor.
[0040] After the message governance component performs governance operations (such as encryption, desensitization, deletion, etc.) on the original response message, it will send the finally obtained target response message to the service requestor. This step ensures that the message returned to the service requestor meets the security and service requirements, completes the entire message governance process, and realizes the protection of sensitive information and the adaptation to different service scenarios.
[0041] In this embodiment, it is possible to intercept the service request message initiated by the service request end and forward it to the service provider end. At the same time, intercept the original response message feedback by the service provider end. Through a unified interception and forwarding mechanism, the message governance logic is abstracted from each interface to form a centralized processing link, avoiding repeated development of data governance logic at each interface, greatly reducing the development cost and improving the development efficiency. After intercepting the original response message, obtain the message governance rule that matches the service request end. This rule-based processing method makes the system highly flexible and adaptable. It is possible to formulate corresponding message governance rules according to different service request ends and different application scenarios. When the business requirements or security policies change, only the rules need to be adjusted without modifying the program code, enabling rapid response to changing requirements and scenarios. Govern the original response message according to the message governance rule to obtain the target response message, and send the target response message to the service request end, ensuring the consistency and standardization of the message governance process. Whether it is encryption, desensitization or deletion, etc., all can be executed orderly according to the established rules, improving the accuracy and reliability of data processing, and effectively ensuring the security and compliance of data. The message governance component is independent of the business logic and realizes data governance by intercepting and processing messages, separating the business logic and data governance logic, reducing the coupling degree of the system. Business developers can focus on the implementation of business functions, while the data governance part is uniformly managed and maintained by the message governance component, facilitating the extension and maintenance of the system and improving the overall stability and maintainability of the system.
[0042] The following further describes the message processing method provided by the embodiment of the present invention. As Figure 2 shown, the method of this embodiment includes:
[0043] Step 201, intercept the service request message initiated by the service request end, and parse the service request message to identify the target interface requested by the service request end to access, the identity verification information of the service request end, and the target service scenario requested by the service request end to consume.
[0044] The target interface is a specific interface that the business request side hopes to access through the message. An interface is an entry in the system for providing specific functions or data access. The identity verification information is the information used to verify the identity of the business request side, such as username, password, digital certificate, token, etc. The identity verification information is used to ensure that the request is initiated by a legitimate user or system. The target business scenario refers to the specific business environment and context that the business request side hopes to access or operate in. It defines the business background in which the business request side wants to use the target interface to obtain or process data. For example, in a banking system, when a customer queries their account balance through the mobile banking software, the corresponding business scenario for this operation is "personal self-service query of account balance". When a marketer queries customer information in the marketing management system for marketing campaign planning, the target business scenario at this time is "marketer queries customer information for marketing campaign planning". Different business scenarios have different security requirements and data processing rules. For instance, in the personal self-service query scenario, more detailed account information can be returned; while in the marketer query scenario, some sensitive information needs to be desensitized before being returned.
[0045] The message governance component will intercept the business request message initiated by the business request side, parse the business request message, and extract the key information from it. The key information includes the interface to be accessed, the identity verification information of the business request side, and the target business scenario that the business request side requests to consume. This step realizes the active acquisition and information extraction of the business request message, laying the foundation for subsequent permission verification and message governance operations, ensuring that the system can effectively control and manage the transmission and processing process of the message, and at the same time meeting the personalized needs in different business scenarios.
[0046] Step 202: Determine whether the business request side has the access permission to the target interface, perform identity verification on the business request side based on the identity verification information, and determine whether the business request side has the consumption permission for the target business scenario. If the business request side has the access permission to the target interface, the identity verification of the business request side passes, and the business request side has the consumption permission for the target business scenario, then execute Step 204; otherwise, execute Step 203.
[0047] Regarding access rights, an access control list can be maintained. The access control list defines the access rights of different business requestors to each target interface. When a business request is received, the corresponding access right settings can be looked up in the access control list based on the identity of the requestor (such as user identification, Internet Protocol address, etc.) to determine whether it has the right to access the target interface. Alternatively, different roles can be assigned to different requestors, and each role has a corresponding set of permissions. The access right of the requestor can be determined by checking the match between the role of the requestor and the role required for the target interface. For example, an "administrator" role may have full access rights to all interfaces, while a "regular user" role may only be able to access some interfaces.
[0048] Regarding identity verification, when the requestor sends a business request, it can provide identity information such as a username and password. The provided identity information such as the username and password can be compared with the user credentials stored in the database to verify whether the username and password match the stored information, thereby determining whether the identity of the requestor is legal. Alternatively, after the requestor completes identity authentication for the first time, a token (such as a Token) can be issued to the requestor. In subsequent business requests, the requestor carries this token, and the identity of the requestor is confirmed by verifying the validity of the token (such as checking the signature and expiration time of the token). Alternatively, the requestor can provide its own digital certificate, and it can be verified whether the digital certificate is issued by a trusted certificate authority, whether it is within the validity period, and whether it matches the information of the requestor, etc., to verify the identity of the requestor.
[0049] Regarding scenario consumption rights, one or more scenario configuration tables can be set up to store the corresponding relationship between the requestor and the business scenario consumption rights. Whether the business requestor has the consumption right for the target business scenario can be determined by querying the scenario configuration table. For example, if there is a corresponding relationship between the requestor and the target business scenario in the scenario configuration table, it is determined that the business requestor has the consumption right for the target business scenario.
[0050] Exemplarily, there is an online banking system. A user requests to query the account balance through a mobile banking software (i.e., the business requestor). The operation corresponds to the target interface "Account Balance Query Interface", and the target business scenario is "Personal Self-Service Query of Account Balance". The following judgments and verifications can be carried out:
[0051] Look up in the access control list based on the user's registration information in the system (such as user identification, Internet Protocol address, etc.) to confirm whether the user has the right to access the "Account Balance Query Interface". If the user is a legally registered user and is not restricted from accessing this interface, it is considered that it has the access right.
[0052] When a user logs in to the mobile banking software, they have already passed the identity verification based on the username and password, and a token is issued to the user. During each business request, the software will carry this token, and the validity of the token can be verified to ensure that the request is initiated by an authenticated user.
[0053] It can be determined whether there is a corresponding relationship between the request end and the target business scenario in the scenario configuration table. If it exists, it is determined that the business request end has the consumption permission for the target business scenario.
[0054] Step 203: Feedback a request failure prompt message to the business request end.
[0055] The request failure prompt message can prompt the specific reason for the failure, such as "You have no permission to access this interface", "Identity verification failed", or "You are not allowed to query the account balance in the current business scenario", etc.
[0056] Step 204: Forward the business request message to the service provider.
[0057] That is, if the request end passes all the above judgments and verifications, the business request message will be forwarded to the service provider.
[0058] Step 205: Intercept the original response message feedback by the service provider for the business request message.
[0059] The original response message is the message returned by the service provider after processing the business request message, which contains the result of the request processing or the required data, and is the initial message without any governance operations.
[0060] Step 206: Query the governance rule configuration information based on the target interface and the target business scenario to obtain the message governance rule that matches the business request end. The message governance rule includes governance rules for various modal data.
[0061] The governance rule configuration information is the rule information predefined and stored in the configuration table, which is used to guide how to govern the messages of different business request ends, different business scenarios, and different interfaces. The governance rule configuration information comes from the management end. The management end can be the management interface or module of the system, usually used by the system administrator to configure and manage various rules and parameters in the system.
[0062] The message governance rule defines a series of rules on how to process the message, which can include operations such as encryption, desensitization, and deletion. These rules are configured according to different business request ends, business scenarios, and security requirements to ensure the security and compliance of the message. Various modal data refers to different types of data, such as text, images, audio and video, etc. In message governance, these different types of data need to be governed separately.
[0063] Step 207, parse the original response message to obtain the target modal data.
[0064] The target modal data refers to specific types of data that need to be governed and are extracted from the original response message, such as text, images, audio and video, etc. Modal data refers to different types of data, and each type of data requires different governance methods.
[0065] Step 208, identify the governance rules for the target modal data from the governance rules of multiple modal data.
[0066] Through the identification process, the governance rules that match the current target modal data are found. These rules define how to specifically process the target modal data, such as desensitizing text data, encrypting image data, etc.
[0067] Step 209, provide the governance rules for the target modal data and the target modal data to the artificial intelligence model so that the artificial intelligence model can govern the target modal data based on the governance rules for the target modal data.
[0068] The artificial intelligence model is a model that can learn and process based on input data and rules, and can be used to perform complex data governance tasks. The artificial intelligence model processes the target modal data according to the received governance rules, which can include operations such as desensitizing text data, encrypting image data, transcoding audio and video data, etc. In this way, the artificial intelligence model can be flexibly used to govern different types of data to ensure the security and compliance of the data.
[0069] Step 210, obtain the governed target modal data from the artificial intelligence model.
[0070] The governed target modal data already meets the security and compliance requirements.
[0071] Step 211, generate a target response message based on the governed target modal data.
[0072] The target response message refers to the final message after governance, which contains the governed target modal data and meets the requirements of the service request side and the security standards of the system.
[0073] Step 212, send the target response message to the service request side.
[0074] In addition, the governance rule configuration information can also be updated regularly or in real time according to actual needs. For example, in an online banking system, the system administrator needs to update the message governance rules of the customer information query interface according to new regulations. Then the system administrator can log in to the management terminal and enter the governance rule configuration interface. In this interface, the administrator can view the current governance rule configuration information, including the message governance rules for different interfaces and business scenarios. According to the requirements of the new regulations, the administrator modifies the message governance rules of the "customer information query interface" in the "marketing activity planning" business scenario. For example, the desensitization requirement for the customer's phone number is added. After the administrator saves the modification in the management terminal, the management terminal automatically initiates a configuration update instruction to notify the message governance component that there is new governance rule configuration information to be updated. After receiving the configuration update instruction, the message governance component obtains the new governance rule configuration information from the management terminal and updates the local configuration. In subsequent business requests, the message governance component will govern the original response message according to the new governance rule configuration information. For example, desensitize the customer's phone number and then return it to the business request side. Through this mechanism, it is possible to flexibly adapt to changes in business requirements and new security requirements, ensuring the security and compliance of data.
[0075] The following introduces the message governance component, as Figure 3a shown Figure 3a is a schematic structural diagram of the message governance component provided by an embodiment of the present invention. The message governance component includes a request message interception and processing function, a request message interception configuration management, a response message interception and processing function, a response message interception configuration management, and a request and response message interception configuration file. Among them, the request message interception and processing function is used to intercept and manage the request messages sent by the business request side to ensure that only the requests that have passed the verification can be processed. The request message interception configuration management is responsible for managing the interception rules and configuration information of the request messages to ensure the security and compliance of the system. The response message interception and processing function is used to intercept and manage the response messages returned by the service provider side to ensure that the data returned to the business request side complies with the governance rules. The response message interception configuration management is responsible for managing the interception rules and configuration information of the response messages to ensure the security and compliance of the system. The request and response message interception configuration file stores the interception rules and configuration information of the request and response messages for use by the interception processing function module.
[0076] Figure 3b is an example diagram of the request message interception and processing function provided by an embodiment of the present invention. In Figure 3bIn [the above], the request message interception processing function module sequentially determines whether the service request end has interface access rights, whether the identity verification passes, and whether the scenario verification passes. The request message interception configuration management provides configuration information such as interface access rights, identity verification, and scenario verification for the request message interception processing function to use. The request message interception configuration includes an interface list, a requester list, a requester key list, and a request scenario list, which are used to verify the legality of the service request end.
[0077] Figure 3c is an example diagram of the response message interception processing function provided by an embodiment of the present invention. In Figure 3c In [the above], the response message interception processing function module sequentially formats the response message, processes each field one by one according to the desensitization rules, and then reassembles the message and returns it. The response message interception configuration management provides desensitization rules and response message formatting information for the response message interception processing function to use. The response message interception configuration includes desensitization processing methods for interfaces and scenarios and message format templates, which are used to ensure the security and consistency of the response message.
[0078] Figure 3d is an example diagram of the message processing method provided by an embodiment of the present invention. In Figure 3d In [the above], the interface consumer program is the program of the service request end and is responsible for initiating service requests. The interface service provider program is the program of the service providing end and provides service services and responses. The request message interception processing function sequentially determines whether the service request end has interface access rights, whether the identity verification passes, and whether the scenario verification passes. The request and response message interception configuration file stores the interception rules and configuration information of the request and response messages. The response message interception processing function formats the response message, processes each field one by one according to the desensitization rules, and then reassembles the message and returns it. The interface return message format template defines the format of the response message, which is used to ensure that the message returned to the service request end meets the requirements.
[0079] In this embodiment, it is capable of intercepting the service request messages initiated by the service request end and forwarding them to the service providing end. At the same time, it intercepts the original response messages feedback by the service providing end. Through a unified interception and forwarding mechanism, the message governance logic is abstracted from each interface to form a centralized processing link, avoiding the repeated development of data governance logic at each interface, greatly reducing the development cost and improving the development efficiency. After intercepting the original response message, it obtains the message governance rules that match the service request end. This rule-based processing method makes the system highly flexible and adaptable. It can formulate corresponding message governance rules according to different service request ends and different application scenarios. When the business requirements or security policies change, only the rules need to be adjusted, without modifying the program code, and it can quickly respond to changing requirements and scenarios. The original response message is governed according to the message governance rules to obtain the target response message, and the target response message is sent to the service request end, ensuring the consistency and standardization of the message governance process. Whether it is encryption, desensitization or deletion operations, they can all be executed orderly according to the established rules, improving the accuracy and reliability of data processing and effectively ensuring the security and compliance of data. The message governance component is independent of the business logic and realizes data governance by intercepting and processing messages, separating the business logic and the data governance logic, reducing the coupling degree of the system. Business developers can focus on the implementation of business functions, while the data governance part is uniformly managed and maintained by the message governance component, facilitating the expansion and maintenance of the system and improving the overall stability and maintainability of the system.
[0080] Figure 4 is a structural schematic diagram of a message processing device provided by an embodiment of the present invention, as Figure 4 shown. The device includes:
[0081] A first interception module 401, configured to intercept the service request messages initiated by the service request end and forward the service request messages to the service providing end;
[0082] A second interception module 402, configured to intercept the original response messages feedback by the service providing end for the service request messages and obtain the message governance rules that match the service request end;
[0083] A message governance module 403, configured to govern the original response messages according to the message governance rules to obtain the target response messages;
[0084] A sending module 404, configured to send the target response messages to the service request end.
[0085] In one embodiment, the first interception module 401 is further configured to:
[0086] Parse the service request message to identify the target interface requested by the service request end, the identity verification information of the service request end, and the target service scenario requested by the service request end for consumption;
[0087] Determine whether the service request end has the access right to the target interface, perform identity verification on the service request end based on the identity verification information, and determine whether the service request end has the consumption right to the target service scenario;
[0088] When the service request end has the access right to the target interface, the identity verification of the service request end is passed, and the service request end has the consumption right to the target service scenario, forward the service request message to the service provider end.
[0089] In one embodiment, the sending module 404 is further configured to:
[0090] When at least one of the following situations exists, feedback a request failure prompt message to the service request end;
[0091] The service request end does not have the access right to the target interface;
[0092] The identity verification of the service request end fails;
[0093] The service request end does not have the consumption right to the target service scenario.
[0094] In one embodiment, the second interception module 402 obtains the message governance rule matching the service request end, including:
[0095] Query the governance rule configuration information based on the target interface and the target service scenario to obtain the message governance rule matching the service request end;
[0096] Among them, the governance rule configuration information includes the message governance rules configured for the target interface and the target service scenario.
[0097] In one embodiment, the governance rule configuration information comes from the management end, and the device further includes:
[0098] An update module, configured to update the governance rule configuration information in response to a configuration update instruction initiated by the management end.
[0099] In one embodiment, the message governance rule includes governance rules for multiple modal data, the multiple modal data includes text, image, and audio / video, and the message governance module 403 governs the original response message according to the message governance rule to obtain the target response message, including:
[0100] Parse the original response message to obtain the target modal data;
[0101] Identify the governance rule of the target modal data from the governance rules of the multiple modal data;
[0102] Govern the target modal data according to the governance rules of the target modal data to obtain a target response message.
[0103] In one embodiment, the message governance module 403 governs the target modal data according to the governance rules of the target modal data to obtain a target response message, including:
[0104] Provide the governance rules of the target modal data and the target modal data to an artificial intelligence model so that the artificial intelligence model governs the target modal data based on the governance rules of the target modal data;
[0105] Obtain the governed target modal data from the artificial intelligence model;
[0106] Generate a target response message based on the governed target modal data.
[0107] Those skilled in the art can clearly understand that for the convenience and conciseness of description, only the above division of each functional module is used as an example. In practical applications, the above functions can be assigned to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the above-described functional modules can refer to the corresponding process in the foregoing method embodiments and will not be elaborated herein.
[0108] The device according to the embodiments of the present invention can intercept the service request messages initiated by the service request end and forward them to the service provider end. At the same time, it intercepts the original response messages feedback by the service provider end. Through a unified interception and forwarding mechanism, the message governance logic is separated from each interface, forming a centralized processing link, avoiding the repeated development of data governance logic at each interface, greatly reducing the development cost and improving the development efficiency. After intercepting the original response message, it obtains the message governance rule matching the service request end. This rule-based processing method makes the system highly flexible and adaptable. It can formulate corresponding message governance rules according to different service request ends and different application scenarios. When the business requirements or security policies change, only the rules need to be adjusted, without modifying the program code, and it can quickly respond to changing requirements and scenarios. The original response message is governed according to the message governance rule to obtain the target response message, and the target response message is sent to the service request end, ensuring the consistency and standardization of the message governance process. Whether it is encryption, desensitization or deletion, etc., it can be executed orderly according to the established rules, improving the accuracy and reliability of data processing, and effectively ensuring the security and compliance of data. The message governance component is independent of the business logic and realizes data governance by intercepting and processing messages, separating the business logic and the data governance logic, reducing the coupling degree of the system. Business developers can focus on the implementation of business functions, while the data governance part is uniformly managed and maintained by the message governance component, facilitating the expansion and maintenance of the system and improving the overall stability and maintainability of the system.
[0109] The following refers to Figure 5 , which shows a schematic structural diagram of a computer system 500 of an electronic device suitable for implementing the embodiments of the present invention. Figure 5 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present invention.
[0110] As Figure 5 shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage section 508 into the random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the computer system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other through a bus 504. The input / output (I / O) interface 505 is also connected to the bus 504.
[0111] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as required. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the drive 510 as required so that a computer program read therefrom is installed into the storage section 508 as required.
[0112] Specifically, according to the embodiments disclosed in the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present invention include a computer program product that includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 509, and / or installed from the removable medium 511. When the computer program is executed by a central processing unit (CPU) 501, the above-described functions defined in the system of the present invention are performed.
[0113] It should be noted that the computer-readable medium shown in the present invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium 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 or 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 invention, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination of the above.
[0114] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks can occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0115] The modules and / or units involved in the embodiments of the present invention can be implemented in software or in hardware. The described modules and / or units can also be provided in a processor. For example, it can be described as: a processor includes a first interception module, a second interception module, a message governance module, and a sending module. Among them, the names of these modules do not constitute a limitation to the module itself in some cases.
[0116] As another aspect, the present invention also provides a computer-readable medium, which can be included in the device described in the above embodiments; or it can exist independently without being assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by a device, the device includes:
[0117] Intercept the service request message initiated by the service request end and forward the service request message to the service providing end; intercept the original response message fed back by the service providing end for the service request message, and obtain the message governance rule matching the service request end; govern the original response message according to the message governance rule to obtain the target response message; send the target response message to the service request end.
[0118] The technical solution of the embodiments of the present invention can intercept the service request message initiated by the service request end and forward it to the service providing end, and at the same time intercept the original response message fed back by the service providing end. Through a unified interception and forwarding mechanism, the message governance logic is separated from each interface to form a centralized processing link, avoiding repeated development of data governance logic at each interface, greatly reducing the development cost, and improving the development efficiency; after intercepting the original response message, obtain the message governance rule matching the service request end. This rule-based processing method makes the system highly flexible and adaptable. Corresponding message governance rules can be formulated according to different service request ends and different application scenarios. When the service requirements or security policies change, only the rules need to be adjusted without modifying the program code, and it can quickly respond to changing requirements and scenarios; govern the original response message according to the message governance rule to obtain the target response message and send the target response message to the service request end, ensuring the consistency and standardization of the message governance process. Whether it is encryption, desensitization, or deletion, etc., it can be executed in an orderly manner according to the established rules, improving the accuracy and reliability of data processing, effectively ensuring the security and compliance of data; the message governance component is independent of the business logic and realizes data governance by intercepting and processing messages, separating the business logic and data governance logic, reducing the coupling degree of the system. Business developers can focus on the implementation of business functions, while the data governance part is uniformly managed and maintained by the message governance component, facilitating the expansion and maintenance of the system, and improving the overall stability and maintainability of the system.
[0119] An embodiment of the present invention also provides a computer program product, including a computer program which, when executed by a processor, implements the message processing method provided in any embodiment of the present invention.
[0120] In the process of implementing the computer program product, computer program code for performing the operations of the present invention can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages and also conventional procedural programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network - including a local area network (LAN) or a wide area network (WAN) - or can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0121] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is imposed herein.
[0122] It should be noted that in the technical solution of the present invention, the processing of collection, use, storage, sharing, and transfer of the user's personal information, etc., all comply with the provisions of relevant laws and regulations, and it is necessary to inform the user and obtain the user's consent or authorization. When applicable, technical processing such as de-identification and / or anonymization and / or encryption of the user's personal information is performed. In addition, a corresponding operation entry is also provided for the user to choose to consent to or reject the automated decision result; if the user chooses to reject, the expert decision-making process is entered.
[0123] The above specific embodiments do not constitute a limitation to the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A message processing method, characterized in that, Applied to the message governance component, including: Intercept the service request message initiated by the service request end and forward the service request message to the service providing end; Intercept the original response message feedback by the service providing end for the service request message, and obtain the message governance rule matching the service request end; Govern the original response message according to the message governance rule to obtain the target response message; Send the target response message to the service request end.
2. The method according to claim 1, wherein Before forwarding the service request message to the service providing end, it further includes: Parse the service request message to identify the target interface requested by the service request end to access, the identity verification information of the service request end, and the target service scenario requested by the service request end to consume; Judge whether the service request end has the access right to the target interface, perform identity verification on the service request end based on the identity verification information, and judge whether the service request end has the consumption right to the target service scenario; When the service request end has the access right to the target interface, the identity verification of the service request end is passed, and the service request end has the consumption right to the target service scenario, trigger the execution of forwarding the service request message to the service providing end.
3. The method according to claim 2, wherein After judging whether the service request end has the access right to the target interface, performing identity verification on the service request end based on the identity verification information, and judging whether the service request end has the consumption right to the target service scenario, it further includes: When at least one of the following situations exists, feedback a request failure prompt message to the service request end; The service request end does not have the access right to the target interface; The identity verification of the service request end fails; The service request end does not have the consumption right to the target service scenario.
4. The method according to claim 2, wherein Obtain the message governance rule matching the service request end, including: Query the governance rule configuration information based on the target interface and the target service scenario to obtain the message governance rule matching the service request end; Among them, the governance rule configuration information includes the message governance rules configured for the target interface and the target service scenario.
5. The method according to claim 4, wherein The governance rule configuration information comes from the management end, and it further includes: Respond to the configuration update instruction initiated by the management end and update the governance rule configuration information.
6. The method according to claim 1, characterized in that, The message governance rule includes governance rules for multiple modal data. The multiple modal data includes text, image, and audio / video. Governing the original response message according to the message governance rule to obtain the target response message includes: Parse the original response message to obtain the target modal data; Identify the governance rule of the target modal data from the governance rules of the multiple modal data; Govern the target modal data according to the governance rule of the target modal data to obtain the target response message.
7. The method according to claim 6, characterized in that, Govern the target modal data according to the governance rule of the target modal data to obtain the target response message, including: Provide the governance rule of the target modal data and the target modal data to the artificial intelligence model so that the artificial intelligence model governs the target modal data based on the governance rule of the target modal data; Obtain the governed target modal data from the artificial intelligence model; Generate the target response message based on the governed target modal data.
8. A message processing device, characterized in that, Applied to the message governance component, including: The first interception module is used to intercept the service request message initiated by the service request end and forward the service request message to the service providing end; The second interception module is used to intercept the original response message fed back by the service provider for the service request message, and obtain the message governance rule matching the service request end; The message governance module is used to govern the original response message according to the message governance rule to obtain the target response message; The sending module is used to send the target response message to the service request end.
9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the message processing method described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the message processing method described in any one of claims 1 to 7.